This cargo extension is for developing front end applications in WebAssembly.
Install with the following command:
cargo install cargo-webassembly
cargo webassembly new my_project
This will initialize a Rust WebAssembly project completely setup to run in the browser.
Go into your projects root directory (e.g. cd my_project)
cargo webassembly run
This will compile and start a server by default on port 8080, you can change the port with the -p option.
This server is setup for single-page apps where all non-static file routes redirect to the root index.html.
cargo webassembly build
This command will just compile your WebAssembly and place everything you need for your web app in the dist folder.