Emscripten: Compiling C++ to JavaScript

Wednesday, September 19, 2012 - 16:30
TH 331
Alon Zakai (Researcher, Mozilla)

The web is one of the largest and most attractive software platforms, and it runs code in one language: JavaScript. However, some people prefer other languages for code reuse, familiarity, or language features, which has led in recent years to much work on compiling various languages to JavaScript. This is slightly odd as JavaScript is a high-level language - not the typical compiler target! This brings challenges that are in many ways more similar to decompiling than compiling. We will present several of those challenges as well as how they are solved in Emscripten, an open source C/C++ to JavaScript compiler, and show examples of projects ported using it from 3D game engines to language runtimes to databases.


Alon Zakai is a researcher at Mozilla, focusing primarily on compiling code into JavaScript and on Emscripten in particular. Alon has a Ph.D. in Neural Computation from the Hebrew University of Jerusalem during which his work involved the theoretical analysis of machine learning on high-dimensional datasets.