4 ms·
Could anyone speak to the core differences between Web Assembly (Wasm) and WebAssembly System Interface (WASI)? I noticed Go 1.21 supports WASI as a target, and
by jmorgan 3y ago
Could anyone speak to the core differences between Web Assembly (Wasm) and WebAssembly System Interface (WASI)? I noticed Go 1.21 supports WASI as a target, and given how new that is, I haven't seen many example projects that use it yet. Hoping it could make deploying to places like Cloudflare workers more feasible for Go projects now.
- WhiteNoiz3 3y agoOut of the box WASM programs cannot interact with anything outside of the WebAssembly sandbox. It can only call functions that the host (whatever is running your WASM) has declared.. WASI is a standard set of functions that you can call from your WASM program so that you can interact with the host machine's file system, network and other things. It is modelled after POSIX. It provides some standardization for WASM programs for doing these types of things and guarantees some basic level of support. Otherwise, each host WASM program could implement them differently and WASM programs wouldn't really be portable.
- jmorgan 3y agoThanks! This is really helpful.