wgpu-rust-renderer
wgpu-rust-renderer
is a tiny WebGPU Renderer written in Rust.
Demo
Rust code is compiled to WebAssembly with wasm-bindgen and it runs even in web browsers.
Screenshots
Desktop application.
Web application.
Features
- Tiny WebGPU Renderling library
- Easy to use
- Memory safe with Rust
- Web application compatible by compiling to WebAssembly
Documents
T.B.D.
Sample Code
T.B.D.
How to import
T.B.D.
How to build the library locally
$ git clone https://github.com/takahirox/wgpu-rust-renderer.git
$ cd wgpu-rust-renderer
$ cargo build
How to run desktop examples locally
$ cd wgpu-rust-renderer
$ cargo run --example example_name
How to run web examles locally
Prerequirements
- Install wasm-bindgen client
- Install Rust wasm32-unknown-unknown target with
$ rustup target add wasm32-unknown-unknown
- Install
http-server
with$ npm install -g http-server
, or other local servers
$ cd wgpu-rust-renderer/web
$ bash build_examples.sh
$ http-server . -p 8080 -c-1
# Access http://localhost:8080/examples/index.html on your web browser
How to run tests
T.B.D.