Monday, November 1, 2010

Emscripten 0.5!

Another Emscripten release has arrived, this time the focus was on building a large real-world library: Bullet Physics. For those unfamiliar with it, Bullet is an awesome physics library written in C++, which has been used in many places, including commercial games and movies.

Here is the demo for this release:

Ran 168 tests in 1060.329s


:P Just kidding, a real demo will follow. I'm working on something with Bullet and WebGL, but didn't want to delay the release for it.

About the work in this release: Bullet is much larger than other projects Emscripten was tested on before, and a large part of the work was to speed up the compiler. The result is that Emscripten now takes a reasonable amount of time - if it takes 10 minutes to build the Bullet C++ sources into LLVM bitcode, then it takes a similar amount of time to convert that into JavaScript using Emscripten (and it takes an even longer amount of time to run that through the Closure Compiler for additional optimization). So at this point there isn't much more reason to optimize for speed of compilation - it's in very good shape, fitting into the build process without slowing things down noticeably.

As expected, various small bugs were found while building Bullet, and a few additional tests were added to check for specific issues. There is also an automatic test for Bullet as a whole.

Overall, at this point Emscripten is capable of compiling large projects effectively; quite a lot of the original goals of this project have been achieved. Still lots of cool stuff left, though! More about plans for the near future in another blog post very soon.

No comments:

Post a Comment