3 ms·
I linked the official webassembly design page where the authors said compiling from JavaScript to WASM is not possible now. "jfbastien commented on Jun 24, 201
by hun-nemethpeter 11y ago
I linked the official webassembly design page where the authors said compiling from JavaScript to WASM is not possible now.
"jfbastien commented on Jun 24, 2015
JS → wasm will only really make sense once wasm supports GC, and most likely JIT compilation too, which is still quite a while away. This would basically be equivalent to implementing the JS engine in wasm! I mentioned this recently and @BrendanEich accused me of having been taken over by horse_js.
To be clear, wasm's goal isn't to replace JavaScript, it's to supplement it. It's therefore not really a goal at the moment to support JS → wasm, but the features we want to implement will make it possible. I'm not sure it'll be that useful from a developer's perspective, though. You may get some size reduction, but that's about it. From a browser's perspective it may be interesting to have the JS engine implemented in wasm from a pure security perspective."