Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.14 KB

README.md

File metadata and controls

44 lines (31 loc) · 1.14 KB

rust-todomvc

The TodoMVC app implemented entirely in Rust using emscripten.

Built on top of the rust-webplatform library.

Compilation

Compiling rust-todomvc for the browser requires a nightly Rust.

rustup install nightly
rustup override set nightly
rustup target add asmjs-unknown-emscripten
rustup target add wasm32-unknown-emscripten

You should also set up emscripten:

curl -O https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
tar -xzf emsdk-portable.tar.gz
source emsdk_portable/emsdk_env.sh
emsdk update
emsdk install sdk-incoming-64bit
emsdk activate sdk-incoming-64bit

Then you're ready to build:

cargo build --target=asmjs-unknown-emscripten
cp target/asmjs-unknown-emscripten/debug/todomvc.js static
cd static; python -m SimpleHTTPServer

Open http://localhost:8000/. There you go!

See brson's post on Rust and emscripten for more installation details.

License

MIT or Apache-2.0, at your option.