Snowpack CSA Template for Rust and WebAssembly
npm install snowpack-template-ts-rust-wasm> ✨ Bootstrapped with Create Snowpack App (CSA).
Ensure Rust is installed on your machine. For more information, check out the Rust docs.
``Pull template into a working directory
npx create-snowpack-app my-awesome-app --template snowpack-template-ts-rust-wasm --use-yarn
$3
- Typescript Support
- Building and testing Rust/WebAssembly modules
- Uses snowpack-plugin-wasm-pack for HMR
- Prettier for code linting and formatting
$3
- Rust and WebAssembly (book)
- wasm-bindgen (docs)
- WebAssembly By Example (examples)
Available Scripts
$3
Changes into Rust crate and builds WebAssembly into
pkg/ and target/ directories.$3
Executes Rust tests bound to the WebAssembly module. Configured to run in a node environment.
Note: Modify the directories in the scripts above after creating your own crate.
$3
Runs the app in the development mode.
Open http://localhost:8080 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
$3
Builds a static copy of your site to the
build/ folder.
Your app is ready to be deployed!For the best production performance: Add a build bundler plugin like @snowpack/plugin-webpack or snowpack-plugin-rollup-bundle to your
snowpack.config.mjs` config file.No eject needed! Snowpack guarantees zero lock-in, and CSA strives for the same.