Re:Wasmer – Run, Publish and Deploy any code, anywhere
by jmorgan on Monday September 18, 2023 @07:10AM
(#37554677)
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.
[ Parent
| on HN ]
Re:Wasmer – Run, Publish and Deploy any code, anywhere
by WhiteNoiz3 on Monday September 18, 2023 @07:19AM
(#37554739)
Out 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.