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

Off topic but is there a good way of running wasi on browser?


There are multiple ways! I'd recommend `@wasmer/wasi` since it uses the same WASI implementation as Wasmer (compiled from Rust to Wasm using wasm-bindgen):

https://www.npmjs.com/package/@wasmer/wasi


wasi-js is another one I’m actively supporting that is in pure JavaScript (hence small and easily hackable): https://www.npmjs.com/package/wasi-js

This is based on what wasmer used to provide for wasi in the browser before they did their major rewrite in rust mentioned above. I personally find the JavaScript version more useful for my projects so I revived their old project and am maintaining it.


Thanks for this info! I have a terminal on my website that was still using the old version and I've been wanting to upgrade it and get better input/blocking support. I will give this a try.


I have added some new ad hoc hooks for blocking io. You can see how they are used in https://CoWasm.org and https://CoWasm.sh


I started digging into it, looks promising indeed. I may have to go the service worker route, or perhaps a web worker if possible.

Nothings exploded so far: https://github.com/DustinBrett/daedalOS/commit/eb958836f1f5e...




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

Search: