Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Indeed, some people are doing this:

- WASI once had an official polyfill https://wasi.dev/polyfill/, now apparently succeeded by https://github.com/bjorn3/browser_wasi_shim

- wasmer-js provides a JS polyfill for WASI https://docs.wasmer.io/integrations/js/wasi

- Cloudflare has a WIP polyfill https://github.com/cloudflare/workers-wasi

I'm generally leery of non-temporary polyfills, so I'm not sure that any of these feel like a long-term viable option for me.



Wasmer's one in theory works in the browser but I've yet to have it work. You have to polyfill some stuff like Buffer and even then you run into some annoying runtime Wasm errors.


> non-temporary polyfill

Isn’t that what the compiler generated shim is that something like Emscripten emits? The Emscripten wrapper code is… frustrating.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: