Skip to content
Joshua Granick edited this page Jan 1, 2014 · 1 revision

Compatibility

Lime is compatible with current versions of Emscripten. The resulting output requires WebGL, and may be too heavy for some mobile WebGL devices to support.

Dependencies

In addition to installing Emscripten, you will need to have LLVM, clang, python and Node.js installed. The Emscripten documentation details how you can install them.

You can use "lime setup" to open the documentation page, and optionally to point to where Emscripten is located, if it is not in your PATH (for access to "emcc", "em++", etc)

lime setup emscripten

Targets

Emscripten targets LLVM bytecode, which in turn becomes JavaScript for use in a browser. You can also target ASM.js (rather than standard JavaScript), though we have encountered some problems with this.

Components

Emscripten includes support for SDL-similar calls. We use this both for windowing, input and events, and for audio. Unlike other platforms, we use the Emscripten SDL_image support for loading images. Other dependencies include Freetype, cURL support is currently disabled.

Future

The resulting output from Emscripten can be large, but with server-side compression, is not unlike the size of Flash output. We are very interested in the future of the project, with continued improvements in Emscripten, we believe this can be a compelling way to bring rich content to the web browser, or to new platforms such as Firefox OS.

We are currently using the "i386-pc-linux-gnu" LLVM target, which works as expected but seems to be less supported (and is no longer default) for Emscripten, which uses "le32-unknown-nacl" instead. Some unusual behaviors occurred with this target, which appeared to be issues with size of certain data types being different. ASM.js support for the le32 target appeared to be stable, so it may be worth investigating if the codebase could be made compatible with le32.

Compiling

You may use the "emscripten" target when using "lime" commands:

lime test emscripten

You can also use "-asm" to test ASM.js output:

lime test emscripten -asm
Clone this wiki locally