Emscripten: Porting Native C/C++ Code to Javascript

von Manuel Schlling (keine)

Mozilla's Emscripten Project [1] enables developers to port their existing C and C++ source code to web applications automatically. It utilizes the LLVM [2] compiler suite to compile the existing code base to javascript that runs in the browser. Emscripten includes support for WebGL (by using a OpenGL shim) that allows porting of 3D-rich applications in HTML5 (e.g. [3]).

This goal of this talk is to describe how this transcompilation is achieved and what new possibilities are opened up by Emscripten. A short walk through is presented to guide developers in the process of porting their existing application to javascript. Also some common pitfalls are discussed that might arise while porting applications from C/C++ to javascript.

Furthermore, some examples of ported programs are given that enable web developers to utilize their embosomed UNIX tools in their webpages [4]. Another topic in the presentation is how Emscripten in cooperation with Unhosted [5] can help to protect the users privacy by decreasing the amount of private data transmitted over the wire [6].

[1] www.emscripten.org
[2] www.llvm.org
[3] www.unrealengine.com/html5
[4] manuels.github.io/unix-toolbox.js
[5] unhosted.org
[6] manuels.github.io/texlive.js

Über den Autor Manuel Schlling:

Manuel Schlling is a physicist working in the field of image and data analysis at a German bioresearch center. He came accross Linux 10 years ago and since then, he is developing small free, open source software projects. Manuel joined the developer team the social network Diaspora in 2011 and contributed to its code base for one year. Since he is working full-time, he is publishing his small projects on Github.