warning: took more than an hour on my machine, because it had to compile fastcomp
xcode-select --install
- make sure,
python
in your$PATH
is 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/env
to your$PATH
(set -U fish_user_paths …
) rustup install nightly
rustup default nightly
rustup target add asmjs-unknown-emscripten
rustup target add wasm32-unknown-emscripten
bash
source ./emsdk-portable/emsdk_env.sh
emsdk update
emsdk install sdk-incoming-64bit
emsdk activate sdk-incoming-64bit
source ./emsdk-portable/emsdk_env.sh
emcc --version
– should work
bash
source ./emsdk-portable/emsdk_env.sh
rustc --target=asmjs-unknown-emscripten lib/main.rs -o demo.html