Saturday, April 6, 2013

Emscripten: From C to Javascript.

From the emscripten wiki:

Emscripten is an LLVM to JavaScript compiler. It takes LLVM bitcode (which can be generated from C/C++ using Clang, or any other language that can be converted into LLVM bitcode) and compiles that into JavaScript, which can be run on the web (or anywhere else JavaScript can run).

Using Emscripten, you can

  • Compile C and C++ code into JavaScript and run that on the web 
  • Run code in languages like Python as well, by compiling CPython from C to JavaScript and interpreting code in that on the web

The list of ported C/C-- software is impresive. Even complex OpenGL software ports looks no problem for Emscripten (by translating to the equivalent WebGL).

Basically that means we can know use static compiled languages to generate complex (millions of lines of code) Web pages.

¡¡¡ And this technology works now !!!