This is a base project setup for React and WebAssembly using Rust and Javascript.
- Rust
- Cargo
- wasm-pack
- NodeJs
npm run setup
npm run install <command>
Where <command>
is the regular command after npm install
. It is recommended to use this script to install new node modules as it automatically links the wasm package after installation and does not require to run npm run link
afterwards.
// build all wasm and react packages in development mode
npm run build
// builds only react bundle in development mode
npm run build-react
// builds only wasm package in development mode
npm run build-wasm
// builds all wasm and react packages in production mode
npm run build-prod
npm run link-wasm
npm run serve
- wasm-bindgen
- console_error_panic_hook
- wee_alloc
- React
- React Router Dom
- Styled Components
- PropTypes
- Babel
- File Loader
- HTML Webpack Plugin
- Webpack
- Webpack Dev Server