3 ms·
Am not expert, but here's the understanding I've picked up: When you use JavaScript through Node, your JS gets the ability to open files and make network socke
by cjbprime 3y ago
Am not expert, but here's the understanding I've picked up:
When you use JavaScript through Node, your JS gets the ability to open files and make network sockets and so on, because there are a set of APIs implemented by Node and exposed to your JS code, like so:
JS <-> native APIs <-> Node implementation of platform-specific operations
WASI applies to WebAssembly instead of JS. So again if we're on Node:
wasm <-> native APIs (WASI) <-> Node implementation of platform-specific operations
But WASI is much more general than Node's APIs, and meant to be used by different engines in different environments (browsers, native bindings, etc).