pixels/examples/minimal-web
David Cristofaro e8d5cf3ebc
Bump wgpu from 0.13 to 0.14 (#320)
* feat(wgpu): upgrade wgpu from 13 to 14

* Address feedback

* Bump tao in `minimal-tao` example

* Bump fltk in `minimal-fltk` example

* Bump egui in `minimal-egui` example

* Bump MSRV to `1.65`

* Bump crates in `imgui-winit` example

* Delete `minimal-sdl2` example

* Fix clippy lints

* Update examples/minimal-egui/src/gui.rs

Co-authored-by: Zageron <hello@zageron.ca>
Co-authored-by: Jay Oster <jay@kodewerx.org>
2022-12-17 13:50:11 -08:00
..
src Allow accessing frame on immutable buffer (#288) 2022-08-14 15:44:23 -07:00
Cargo.toml Bump wgpu from 0.13 to 0.14 (#320) 2022-12-17 13:50:11 -08:00
README.md Replace just with cargo-run-wasm (#310) 2022-10-02 21:13:48 -07: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 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 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.