Add the following dependencies to your Cargo.toml
:
[target.'cfg(target_os = "emscripten")'.dependencies]
emscripten-sys = "0.3"
. <path to emsdk>/emsdk_env.sh
cargo build --target asmjs-unknown-emscripten
cargo test --target asmjs-unknown-emscripten --no-run
node target/asmjs-unknown-emscripten/debug/emscripten_sys-*.js