Thursday, January 20, 2011

Emscripten Overview Writeup

If you're interested in how Emscripten works, then this writeup I am working on may interest you. It is currently the best explanation of the underlying techniques Emscripten uses to compile LLVM to JavaScript, including the memory model, the Relooper algorithm, etc.

It isn't meant to be a manual or a practical guide. For that, as always see the wiki.

1 comment:

  1. Section 4.1:

    "Emscripten and the Closure Compiler, the generated JavaScript code is approximately 2.76MB in size. For comparison, a native binary version of CPython is approxiately 2.28MB in size, so the two di er by only 21%."

    RE the native binary, is that with or without symbols removed (gcc -s, or running "strip" on the resulting binary)?