Wednesday, June 01, 2011

Low Level Virtual Machine (LLVM)

LLVM is a really interesting alternative to java and it's bytecode jvm.
What's interesting is it can be run in the web browsers Javascript enterpreter allow this to run on web site.

So you can compile C & C++ code to run on the web in a javascript VM.

> Deepak Apple is funding the project.llvm-gcc is the default compiler which is shipped with Mac OS and IOS SDK.


http://llvm.org/

Low Level Virtual Machine (LLVM) is a compiler infrastructure, written in C++, which is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs written in arbitrary programming languages. Originally implemented for C/C++, the language-independent design (and the success) of LLVM has since spawned a wide variety of front ends, including Objective-C, Fortran, Ada, Haskell, Java bytecode, Python, Ruby, ActionScript, GLSL, and others.



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



From Slashdot: Doom Ported To the Web
"Ever since Id Software released the Doom source code under the GPL, it's been ported to platform after platform. Now, you can play Doom compiled to JavaScript on the web, using standard web technologies like Canvas and without any plugins. If your browser has trouble running it, here's a screencast." The translation was accomplished using Emscripten, a Javascript backend for LLVM. As per the GPL, full source code is available. Pretty neat.

2 comments:

TheMysticRiddler said...
This comment has been removed by the author.
Deepak Narayan said...

Apple is funding the project.llvm-gcc is the default compiler which is shipped with Mac OS and IOS SDK.