This project demonstrates how to setup a rust project that uses wgpu to render a spinning triangle, supporting both webgl and webgpu wasm as well as native.
# native
cargo run -r
# webgpu
trunk serve --features webgpu --open
# webgl
trunk serve --features webgl --open
Firefox is still working on wgpu support but chromium-based browser like Brave, Vivaldi, Chrome, etc will work
On Macbooks, the web application's UI scaling will be incorrect if not running at the laptop screen's native resolution.
To run the app in the web browser properly, set your laptop's resolution to it's highest possible option.
On a Macbook M2 Air
:
Option + F2
-> Show All Resolutions
-> 2880 x 1864
(highest resolution)