Live data from Hacker News

WebAssembly is more than the web

words.steveklabnik.com

81–83 of 83 posts

Re: WebAssembly is more than the web

#81
>So, WebAssembly itself, the core, is completely independent of the web. The web is a particular environment that Wasm is embedded in, but not actually required to use wasm. Other embedding APIs can be created, with their own interfaces, to do various things.

Does that mean one could e.g. create Node.js modules in Wasm, like we also have the C++ modules? That could give a nice boost to certain kinds of code like text processing and math (e.g. a big integer or matrix algebra library).

(Perhaps this is already a thing).

Re: WebAssembly is more than the web

#82
post #81

> So, WebAssembly itself, the core, is completely independent of the web. The web is a particular environment that Wasm is embedded in, but not actually required to use wasm. Other embedding APIs can be created, with their own interfaces, to do various things. Does that mean one could e.g. create Node.js modules in Wasm, like we also have the C++ modules? That could give a nice boost to certain kinds of code like tex…

It's already a thing. In node you by default have a WebAssembly object giving you access to the necessary features.

Here's an example (untested, just found it via Google) https://gist.github.com/kanaka/3c9caf38bc4da2ecec38f41ba24b7...

Re: WebAssembly is more than the web

#83
post #35

One thing I am concerned about is startup performance. On my (slow) Chromebook, some of my multi-megabyte WASM files take 10 seconds to compile. Seems we need either faster CPU cores, faster code generation, or some kind of staged JIT compile -- though I guess the latter could be accomplished today with sufficiently clever tooling.

Think about if the same codebase were in JS, it would definitely be slower. But like others are saying, streaming is one of the main features of wasm.
Post reply on HN