• Stars
    star
    242
  • Rank 167,048 (Top 4 %)
  • Language
    CSS
  • Created about 9 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rust implementation of TodoMVC + Emscripten

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.