This is a highly opinionated template for writing projects using TypeScript and WebAssembly.
yarn build
: builds your rust package, adds it to the npm dependencies, and builds the application using webpackyarn dev
: does two things:- starts a
nodemon
process that watches your rust files, and automatically re-adds the package to the npm dependencies - starts a the
webpack-dev-server
- starts a
yarn test
: run jest to test TypeScript files
wasm-pack build
: builds your rust packagewasm-pack test --headless --firefox
: test your rust code in a headless browser
Learn more about cargo generate
here.
cargo generate --git https://github.com/CarsonMcKinstry/rust-ts-template.git --name my-project
cd my-project
yarn install