2 ms·
WASM is tied to existing JavaScript engines and their constraints. For example, WASM doesn't support more efficient control flow because of the design of V8 (an
by wahern 7y ago
WASM is tied to existing JavaScript engines and their constraints. For example, WASM doesn't support more efficient control flow because of the design of V8 (and possibly SpiderMonkey):
http://troubles.md/posts/why-do-we-need-the-relooper-algorithm-again/ http://troubles.md/posts/why-do-we-need-the-relooper-algorit...
https://news.ycombinator.com/item?id=19997091 https://news.ycombinator.com/item?id=19997091
- bcheung 7y agoTied to the engine is orthogonal to tied to the language. You can compile C, C++, and Rust to WebAssembly. But you still can't compile JS to WebAssembly. Given the large amount of code in JS and the number of JS developers, not being able to support a major general purpose language rules out WASM as a cross platform target in my book.
- sroussey 7y agoYou can compile a subset. See AssemblyScript. Actually more like a subset of TypeScript.