top | item 2038276

Emscripten: an LLVM to JavaScript compiler

71 points| stephenjudkins | 15 years ago |code.google.com

6 comments

order
[+] jrockway|15 years ago|reply
I'm tempted to compile node.js to LLVM bitcode, then compile it to JavaScript and then run it with node.js. Self-hosting!
[+] icefox|15 years ago|reply
This is really really cool. I have ported various c/c++ code based to javascript and have thought about doing this myself. No doubt some really cool demos will come out of this.

One interesting hacks to be build on this would be to optimize the resulting javascript so it can be compressed the best.

[+] jhuni|15 years ago|reply
Right now we take JavaScript code and we compile it to ObfuScript (obfuscated JavaScript).

It would be much better to have a variety of languages as front-ends and a real assembly language as a back-end.

[+] DrJosiah|15 years ago|reply
The quality of the output is quite good, considering the intermediate representation. Also, I am totally blown away that there are Lua and CPython demos.
[+] kls|15 years ago|reply
I would like to see one that goes the other way.I would love to be able to write JavaScript and compile it to run via the LLVM.