No Description 941B



A Game

ensure that the correct toolchain is installed

$ rustup update
$ rustup install nightly
$ rustup target add wasm32-unknown-unknown --toolchain nightly
$ cargo +nightly install wasm-bindgen-cli

$ npm install
$ npm run build:server

during dev

$ npm run build:dev:wasm
$ npm run build:dev
$ npm run serve:dev

can now visit http://localhost:8080

for ‘release’

$ npm run build:release
$ npm run serve:release

can now visit http://localhost:3000

misc. notes


  • origin is in the bottom left
  • rendering order for a square is: bl, br, tl, tr

file structure

/dist -> destination directory for webpack output (npm run build) index.html /src -> rust source for top-level program + wasm declarations /target -> destination directory for rust /web -> destination for wasm-bindgen generated files (*.js, *.ts, *.wasm) /web/js -> js files