Re:Elixir v1.4.0 released
by pmarreck on Wednesday January 04, 2017 @07:28PM
(#13323581)
What's stopping a compile of Erlang to JS via LLVM and Emscripten and just taking the expected performance hit?
[ Parent
| on HN ]
Erlang doesn't compile to machine code, but to bytecode that runs into the Erlang VM. So you would probably have to run the Erlang VM on top of javascript... I'm not sure whether it's possible, but it sure sounds heavy.
With WebAssembly, you should be able to compile the Erlang VM itself to it.
There is the LLVM backend in Erlang as of version 17. I haven't seen much info on it. I haven't seen anyone try to go the whole process from Erlang code to LLVM to Emscripten to JavaScript. I am interested to know what hurdles there might be, performance, etc.