Emscripten: Bang Out JavaScript From LLVM Bitcode

Written by Michael Larabel in LLVM on 20 December 2011 at 08:40 AM EST. 8 Comments
LLVM
There's an interesting new open-source LLVM-using project called Emscripten. Emscripten allows JavaScript to be automatically generated from LLVM bit-code. In other words, you can take C/C++ code-bases and easily translate them into JavaScript.

Emscripten takes LLVM bitcode and from that turns it into JavaScript that can be executed from the web-browser. The LLVM bit-code can be generated from the Clang C/C++ compiler or any other LLVM front-end that ends up being lowered down into LLVM bit-code.

This translator doesn't work only for trivial projects, but large code-bases like Python, Bullet, and Poppler have been converted from their C/C++ code into working JavaScript using Emscripten. This project was brought up by Alon Zakai of Mozilla to the LLVM developers' list.

Other code-bases that have been changed into JavaScript for demo purposes include Lua, FreeType, eSpeak text synthesis, a ray-tracing engine, Python, and Ruby.

For those interested in learning more about this neat LLVM project, visit the GitHub project page.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week