Using cargo-web
Cargo web is a cargo subcommand for building client web apps. It makes building and deploying web applications incredibly easy. It is also the only toolchain that supports Emscripten targets. Read more here.
Install
1. cargo install cargo-web
Build
1. cargo web build
Run
1. cargo web start
Supported Targets
wasm32-unknown-unknownwasm32-unknown-emscriptenasmjs-unknown-emscripten

note
For *-emscripten targets, you’ll need to install the Emscripten SDK
