| WASM is a language. By itself, it's not very useful because you're limited to what language constructs provide - not much. There are extensions to the core spec for embedding wasm. For example, there is "WebAssembly JavaScript Interface" for working with wasm inside JavaScript, which is what used by browsers today. Spec we use in browser today is really just about how to interact with JS, so JS must provide everything that isn't in core: want to make an http request, then you need to call JavaScript (i.e. Fetch API) and so on. People wanted to run WASM outside the browser because it's a neat abstraction - compile one of the many languages to WASM and run it "anywhere" (yay java). Since outside the browser, we can't lean on JS for providing access to the outside world, plus that bridge has an overhead, so no bueno. WASI extends core spec with interface to outside system: - files i/o - network i/o - etc In addition, WASI has a built-in capability framework (a la Capsicum in FreeBSD which it drew inspiration from). So WASI is a interface to a host system with security and isolation in mind. |