This template demonstrates the minimum code and tooling necessary for a frontend web app with simple deployable artifacts consisting of one HTML file, one JavaScript file, and one WebAssembly file, using Yew
, wasm-bindgen
, and wasm-pack
.
Note: yew-wasm-pack-template
is the full-featured counterpart to this template, integrating many common web technologies.
- Rust:
https://rustup.rs
- wasm-pack:
cargo install wasm-pack
- miniserve:
cargo +nightly install miniserve
- cargo-generate
cargo install cargo-generate
- node/npm:
https://nodejs.org/
- Use
cargo generate --git https://github.com/j4ng5y/yew-wasm-pack-minimal
to generate your new project.
- Once in your new repository, run
npm install
, this will install rollup and the associated plugins.
- Simply run
rollup -c
to run the dev-mode application.
- Access your generated build artifacts,
bundle.js
andyew_wasm_pack_minimal_bg.wasm
, in ./pkg from your project's root directory.