Implementation of the WebGL Cube demo using Rust + WASM. This code is very messy. I didn't try to write idiomatic rust but instead provide as close to a 1:1 implementation of the original demo.
Follow the offical rustwasm book for good instructions on getting your environment configured
-
Clone the project
git clone https://github.com/maspe36/rust-webgl-cube-demo.git
-
Compile the Rust code into a wasm package
cd rust-webgl-cube-demo/ wasm-pack build
-
Install dependencies
cd www/ npm install
-
Start the local server
npm run start
CTRL + C
to stop -
Navigate to the URL NPM is serving. Defaults to http://localhost:8080/