3 ms·
It seems like it's headed that way. At the moment, it's only really practical to generate WASM from compiled languages, or really small languages, like Lua. An
by tyingq 6y ago
It seems like it's headed that way. At the moment, it's only really practical to generate WASM from compiled languages, or really small languages, like Lua. And your interfaces to the browser (and thus, the outside world) itself are pretty limited, so still lots of javascript involved.
- vvanders 6y agoCan confirm that Lua does run in WASM in the browser: https://github.com/vvanders/wasm_lua https://github.com/vvanders/wasm_lua I sometimes wonder what the world would be like if Lua had zero based indices and saw a bit broader adoption. It's such an easy language to embed/extends although QuickJS looks like it's going to give it a run for the money in the long term given the similar goals on ease of embedding. I wonder if anyone has compiled QuickJS to WASM and run it in the browser.
- nathcd 6y ago> I wonder if anyone has compiled QuickJS to WASM and run it in the browser. Fabrice Bellard actually did it himself here: http://numcalc.com/ http://numcalc.com/
- heavyset_go 6y agoIf your language is supported by LLVM, then Emscripten can compile it to WASM.
- tyingq 6y agoYes, but for interpreted language 'X', are the created artifacts of a practical size to send down the wire for an actual production site? The idea being that as WASM adds higher level primitives, that size gets smaller.
- heavyset_go 6y agoSorry, I misread your comment. I thought you wrote that only "small languages", or Lua, can be compiled to WASM.