https://github.com/wumpf/minifb_wgpu_web_and_desktop
Minimal example for wgpu + minifb, targeting both native & web
https://github.com/wumpf/minifb_wgpu_web_and_desktop
webgpu wgpu
Last synced: 10 months ago
JSON representation
Minimal example for wgpu + minifb, targeting both native & web
- Host: GitHub
- URL: https://github.com/wumpf/minifb_wgpu_web_and_desktop
- Owner: Wumpf
- License: mit
- Created: 2024-09-08T19:29:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-19T08:46:23.000Z (over 1 year ago)
- Last Synced: 2025-01-19T09:29:01.609Z (over 1 year ago)
- Topics: webgpu, wgpu
- Language: Rust
- Homepage:
- Size: 96.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Minimal [`wgpu`](https://github.com/gfx-rs/wgpu) and [`minifb`](https://github.com/emoon/rust_minifb) example for web & desktop
================================================
This is a minimal example of how to use [`wgpu`](https://github.com/gfx-rs/wgpu) and [`minifb`](https://github.com/emoon/rust_minifb) to render a triangle on the screen.

Run on desktop
--------------
```sh
cargo run
```
Run on web
----------
```sh
cargo xtask run-wasm
```
This executes an xtask that builds the wasm binary and launches a web server.
Known issues & limitations
--------------------------
* A bunch of fixes to `minifb` are required which haven't been released yet (as of writing). This project therefore depends on a specific commit of `minifb` for now.