Description
After a lot of work from a number of people, including @badboy and @tomaka it looks like we're home free. Here's a recent summary. And we still need help, and fast. If you want to volunteer, either say which of these you want to tackle here or on the irlo thread and I'll mark you down.
Immediate tasks to get preliminary asmjs support:
- ignore-emscripten failing tests
- Merge the fastcomp squash into the rust llvm fork. It may be worth pushing this to a temporary branch on the assumption that it's not going to land easily in Rust, but I actually think this will go pretty smoothly. Squash of fastcomp commit 4105790f1549808c1f1daa5250b4ada5f41a5c02 llvm#50
- Land PR in Rust that adds asmjs support with new llvm branch and remaining Rust patches
- Fix jemalloc being disabled when asmjs is enabled. This causes test failures. liballoc_jemalloc needs to only be disabled for targets that don't support it.
- Add an auto- builder that builds the asmjs target. We probably won't start testing it right away because testing this target is quite slow.
- Add a dist- builder to create the asmjs target packages.
The first three here somebody else can pick up. I'll probably need to do the last two.
Remaining tasks:
- Fix failing tests.
- Fix compiletest targetting wasm Running wasm output via node does not work when in a different directory emscripten-core/emscripten#4542
- Fix the unwinder - the "Patch panic_unwind to compile, but this is surely broken" commit. It's likely this code will look like 32-bit ARM on musl. Unwinding is just completely broken for Rust+emscripten - lots of unimplemented symbols on emscripten side. Fix unwinding on emscripten #36514
- Error on unimplemented symbols Pass ERROR_ON_UNDEFINED_SYMBOLS=1 to emcc for asm/wasm targets #36515
- Enable broken std::num tests Missing functions in numeric Rust code emscripten-core/emscripten#4543
- Enable test_estimate_scaling_factor Runtime is missing the llvm_ceil_f64 intrinsic emscripten-core/emscripten#4563
- Enable checked_next_power of two tests Missing leading zero intrinsics emscripten-core/emscripten#4545
- Add the wasm32-unknown-emscripten target to rustc. It will be almost the same as the asmjs target (you can literally just grep for "asmjs" and "emcripten" and duplicate the various cfgs). Start with the target specs in mk/cfg and in rustc. For the initial implementation we will not use the wasm llvm backend, but instead use the asmjs backend and ask emcc to convert the asmjs IR to wasm (I don't know how to do this offhand but it's possible - ask in #emscripten). Thusly we will have wasm support.
- Get asmjs backend working without fastcomp patches Does our LLVM need the fastcomp backend for emscripten? #36356
- Test various cargo projects and report/fix bugs.
- Create compelling Rust-on-wasm demos. Need to brainstorm here.
Many of the failing tests are for multithreading. Let's not try to tackle that, but there are probably plenty that can be fixed. Adding the wasm target is probably the most fun. Ask in emscripten about how to test it. Having a mind-blowing demo is going to be important for us to bring the thunder alongside the wasm launch.