warning: took more than an hour on my machine, because it had to compile fastcomp
xcode-select --install- make sure,
pythonin your$PATHis Python 2, not 3 brew install cmake- follow "install Rust" and "install Emscripten" from https://davidmcneil.gitbooks.io/the-rusty-web/setup-and-hello-world.html
- curl https://sh.rustup.rs -sSf | sh
- add
$HOME/.cargo/envto your$PATH(set -U fish_user_paths …) rustup install nightlyrustup default nightlyrustup target add asmjs-unknown-emscriptenrustup target add wasm32-unknown-emscriptenbashsource ./emsdk-portable/emsdk_env.shemsdk updateemsdk install sdk-incoming-64bitemsdk activate sdk-incoming-64bitsource ./emsdk-portable/emsdk_env.shemcc --version– should work
bashsource ./emsdk-portable/emsdk_env.shrustc --target=asmjs-unknown-emscripten lib/main.rs -o demo.html