2 ms·
> someone mentioned the spec for WebAssembly is generic enough to apply outside of the web Absolutely. The spec provides a set of instructions and their semant
by JoshTriplett 7y ago
> someone mentioned the spec for WebAssembly is generic enough to apply outside of the web
Absolutely. The spec provides a set of instructions and their semantics. Browsers provide a set of common runtime APIs. Non-browser environments can provide the sandbox with any API surface area they want.
> in any runtime this includes NodeJS but also excludes it as we see future runtimes
node.js is working on WASI support, and I'd also expect to see versions of JavaScript that run inside the WebAssembly sandbox. When we say "any language", that includes people who want to run JavaScript.
> Aside from WebAssembly being in every modern browser what do you think will be the next killer feature for WebAssembly?
Shared-nothing linking; libraries that don't have to trust each other with their entire address space. I see WebAssembly as the future plugin interface for any software that wants to be extensible.
> It would also be interesting to have an embedded WebAssembly plugin runtime, much like Lua is used all over now that you mention all those examples.
wasmtime is easy to embed; it only takes a handful of lines to load a WebAssembly file, hand it a few functions of your choice, and run it.
See https://github.com/bytecodealliance/wasmtime-demos https://github.com/bytecodealliance/wasmtime-demos for various demos of how to embed wasmtime.
- syrusakbary 7y agoFollowing up from your comment, if you want to start running WASI modules on Node.js (or in the Browser) today, you can use this npm package! (same API as future Node WASI integration) https://www.npmjs.com/package/@wasmer/wasi https://www.npmjs.com/package/@wasmer/wasi