https://github.com/matthewjberger/wgpu-example
A minimal example of using Rust, wgpu, and egui without using eframe
https://github.com/matthewjberger/wgpu-example
egui graphics-programming rust wgpu-rs winit
Last synced: 5 months ago
JSON representation
A minimal example of using Rust, wgpu, and egui without using eframe
- Host: GitHub
- URL: https://github.com/matthewjberger/wgpu-example
- Owner: matthewjberger
- Created: 2024-08-19T10:59:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-06T00:40:23.000Z (5 months ago)
- Last Synced: 2025-06-06T01:34:20.568Z (5 months ago)
- Topics: egui, graphics-programming, rust, wgpu-rs, winit
- Language: Rust
- Homepage: https://matthewjberger.github.io/wgpu-example/
- Size: 1.4 MB
- Stars: 48
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust / Winit / Egui / Wgpu Triangle
This project demonstrates how to setup a [rust](https://www.rust-lang.org/) project
that uses [wgpu](https://wgpu.rs/) to render a spinning triangle, supporting
both webgl and webgpu [wasm](https://webassembly.org/) as well as native.
> If you're looking to use vulkan directly instead, check out this [rust + vulkan example](https://github.com/matthewjberger/vulkan-example)
## Quickstart
```
# native
cargo run -r
# webgpu
trunk serve --features webgpu --open
# webgl
trunk serve --features webgl --open
```
> Firefox is still [working on wgpu support](https://news.ycombinator.com/item?id=41157383)
> but chromium-based browsers like Brave, Vivaldi, Chrome, etc will work
## Prerequisites (web)
* [trunk](https://trunkrs.dev/)
## Screenshots

