pixels/examples/minimal-web
Jay Oster 3891192796
Update dependencies (#337)
Breaking changes:

- Updates `wgpu` to 0.16
2023-06-11 21:25:25 -07:00
..
src Update dependencies (#337) 2023-06-11 21:25:25 -07:00
Cargo.toml Update dependencies (#337) 2023-06-11 21:25:25 -07:00
README.md Update cargo-run-wasm (#329) 2023-01-07 15:18:09 -08:00

Hello Pixels + Web

Hello Pixels + Web

Minimal example for WebGL2.

Install build dependencies

Install the WASM32 target:

rustup target add wasm32-unknown-unknown

Running on the Web

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/.

Running on native targets

cargo run --release --package minimal-web

About

This example is based on minimal-winit, demonstrating how to build your app for WebGL2 targets.