Short starter project using Webpack 4, Rust, and Wasm, based on the example at https://github.com/yamafaktory/rust-wasm-webpack and documentation at https://github.com/dflemstr/rust-native-wasm-loader
See https://github.com/creationix/nvm#installation
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup toolchain install nightly
rustup default nightly
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
cargo install --force --git https://github.com/alexcrichton/wasm-gc
npm install
Run a development build, and start webpack-dev-server (which will launch a browser):
npm start
Alternatively, run a production build:
npm build
The output will be in the dist
directory.
This project is licensed under the MIT License - see LICENSE file for details.