Shamelessly stolen from tomaka. Doesn't really do anything interesting, but does illustrate how to build Cargo projects for the web.
See cargo-build for instructions on how to get the environment set up.
cargo-build --sysroot some/rust/sysroot --target i386-unknown-emscripten --emit em-html