Minimal example for WebGL2.
Install the WASM32 target:
rustup target add wasm32-unknown-unknown
Build the project and start a local server to host it:
cargo run-wasm --release --package minimal-web
Open http://localhost:8000/ in your browser to run the example.
To build the project without serving it:
cargo run-wasm --release --build-only --package minimal-web
The build files are stored in ./target/wasm-examples/minimal-web/
.
cargo run --release --package minimal-web
This example is based on minimal-winit
, demonstrating how to build your app for WebGL2 targets.