3 ms·
AFAIK, WebAssembly is based on asm.js, which can be compiled from any LLVM language, not only C, using Emscripten. There are full implementations of Lua (https:
by niutech 9y ago
AFAIK, WebAssembly is based on asm.js, which can be compiled from any LLVM language, not only C, using Emscripten. There are full implementations of Lua (https://daurnimator.github.io/lua.vm.js/lua.vm.js.html https://daurnimator.github.io/lua.vm.js/lua.vm.js.html), Python (http://pypyjs.org http://pypyjs.org) and even Java (http://teavm.org/ http://teavm.org/) in asm.js. You don't need to write in the C language at all.
- mike_hearn 9y agoYes, I'm using C as shorthand for "C and C-like languages", i.e. ahead of time compiled with manual memory management. It can do C++ too if you ship your own STL. TeaVM has some sort of experimental wasm backend. Presumably it has to ship its own GC and can't do any kind of runtime profiling, which turns out to be a 20% win for Java and far, far more for other languages (like scripting languages). My view is: if you were looking to bring to the web better performance and higher productivity, let alone more security, why would you combine low performance with low level languages? That's the worst of all worlds! And WebAssembly will be low performance for a while - they have to redo all the work done so far on optimising JIT compilers.
- krapp 9y agoIt's better than pretending Javascript is a "bytecode for the web," and transpiling to that. It's better than Flash or Java applets. If we want to consider the long-term archiving of software and keeping it runnable through the web (and I think we really really should consider that), we need something better than what we have, and WebAssembly seems like a step in the right direction.