Emscripten: Running C++/LLVM Code in Browsers!

Some time ago I’ve been impressed by the Emscripten project [https://github.com/kripken/emscripten/wiki].

It is a LLVM compiler to JavaScript! It means that you can take a C/C++ project, compile it with CLang (or another LLVM code generator), use Emscripten to convert it into JavaScript, and voilà: it runs into your browser.

There are plenty of examples, among them also a full-featured 3D FPS: BananaBread.

I still have to investigate how it manages to convert C++ calls to OpenGL to “native” JavaScript calls to WebGL. I’ll investigate it sooner or later…

Can this be a real alternative to Javascript+HTML5?

C++, which was stuck to its 2003 standard, ran through an update in 2011 [ C++11]. It now presents a more simplified syntax to handle containers and plenty of new built-in features. Will it be able to keep the pace of high-level non-native interpreted languages?

Posted in Programming | Tagged as: , | Leave a comment

Leave a Reply