Emscripten: an LLVM to JavaScript compiler(code.google.com)
code.google.com
Emscripten: an LLVM to JavaScript compiler
http://code.google.com/p/emscripten/
6 comments
I'm tempted to compile node.js to LLVM bitcode, then compile it to JavaScript and then run it with node.js. Self-hosting!
This is cool for porting existing C/C++ libraries to the web without actually having to rewrite it in Javascript.
Similar project for Flash is Alchemy: http://labs.adobe.com/technologies/alchemy/
Similar project for Flash is Alchemy: http://labs.adobe.com/technologies/alchemy/
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.
One interesting hacks to be build on this would be to optimize the resulting javascript so it can be compressed the best.
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.
It would be much better to have a variety of languages as front-ends and a real assembly language as a back-end.
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.
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.