A simple boilerplate to get WebAssembly (WASM) code generated by Rust and bundled by Webpack!
This project now uses the awesome rust-native-wasm-loader 🚀.
To get started, we need to install rustup, the Rust toolchain installer:
curl https://sh.rustup.rs -sSf | shPlease refer to its documentation.
First, install the necessary NodeJS dependencies:
yarnThe next step will update to the latest Rust nightly, add the wasm32-unknown-unknown toolchain and install wasm-gc from git. The latter is a small command to clean a wasm module and remove all unneeded exports, imports, functions, etc.
yarn setupYou can skip this step and directly launch the dev server.
yarn buildyarn startGo to http://localhost:9000/ and enjoy!
Released under the MIT license by Davy Duperron.