I’ve been working on an emscripten port since December and have finally landed most of it. The in-tree work, when paired with an LLVM upgrade to the emscripten-fastcomp/incoming LLVM branch and the
sdk-incoming-64bit emscripten sdk is enough to get hello.rs and 2000 run-pass tests working. My emscripten branch of Rust, contains the LLVM patches.
Unfortunately, I don’t have a great deal of time to continue working on this right now, so I’m interested in help. Fortunately, the immediate way ahead is clear: run the test suite in my branch against the asmjs-unknown-emscripten target, fix them, and submit patches (either to rust-lang or my fork).
Here’s how to do it, more or less:
$ curl -O https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz $ tar -xzf emsdk-portable.tar.gz $ source emsdk_portalbl/emsdk_env.h $ emsdk update $ emsdk install sdk-incoming-64bit $ emsdk activate sdk-incoming-64bit $ git clone git://github.com/brson/rust $ (cd rust/src/llvm && git remote add kripken https://github.com/kripken/emscripten-fastcomp && git fetch kripken) $ cd rust $ git reset origin/emscripten --hard $ ./configure --target=asmjs-unknown-emscripten $ make check-stage2-T-asmjs-unknown-emscripten-H-x86_64-unknown-linux-gnu-rpass-exec
That will run just the rpass tests, crossing from 64-bit linux to asmjs. There are other sets of tests to run as well, but rpass are the biggest.