First you'll need a new(ish) version of the rust toolchain. For that you can visit https://rustup.rs/ and follow the installation instructions.
Then you'll need wasm-pack.
The easiest way to get hacking is to use the wonderful
can be installed using
cargo install cargo-generate.
cargo generate --git https://github.com/schell/mogwai-template.git
and give the command line a project name. Then
cd into your sparkling new
wasm-pack build --target web
Then, if you don't already have it,
cargo install basic-http-server or use your
favorite alternative to serve your app:
basic-http-server -a 127.0.0.1:8888