Sunday, August 29, 2010

Emscripten

As mentioned in the last post, I am checking out ways to bring Syntensity to the web. As part of that, I just put up Emscripten on Google Code. Emscripten is an LLVM-to-JavaScript compiler. Combined with llvm-gcc, it lets you compile C/C++ code into JavaScript, and run that on the web.

Emscripten is still in an early stage, but can already compile some benchmarks. At this point I think I will start to try to port code I am interested in, and fix bugs along the way as I find them. I'll probably begin with a tiny subset of sauerbraten (probably one out of command.cpp, rendermodel.cpp, or physics.cpp) and see how that works, then continue from there.

The long-term goal is to run Syntensity, or a smaller version of it, on the web. Aside from Emscripten this will require some other tools, and probably a lot of hard work, so I can't say when I expect this to be done. Also I am working on it in my spare time, so that will vary depending on other stuff I'm doing. But now that Emscripten is in good enough shape to start using, the fun part can begin.

Side note: I'll post updates on this blog regarding using Emscripten for porting Syntensity to the web. I'll probably post stuff about Emscripten itself, that isn't related just to Syntensity, on my more general blog, here.

No comments:

Post a Comment