wgpu

0 0 48
2 months ago
Share: 

wgpu

Matrix Space Dev Matrix  User Matrix Build Status codecov.io

wgpu is a cross-platform, safe, pure-rust graphics API. It runs natively on Vulkan, Metal, D3D12, and OpenGL; and on top of WebGL2 and WebGPU on wasm.

The API is based on the WebGPU standard. It serves as the core of the WebGPU integration in Firefox and Deno.

Repo Overview

The repository hosts the following libraries:

  • Crates.io docs.rs - User facing Rust API.
  • Crates.io docs.rs - Internal safe implementation.
  • Crates.io docs.rs - Internal unsafe GPU API abstraction layer.
  • Crates.io docs.rs - Rust types shared between all crates.
  • Crates.io docs.rs - Stand-alone shader translation library.
  • Crates.io docs.rs - Collection of thin abstractions over d3d12.
  • Crates.io - WebGPU implementation for the Deno JavaScript/TypeScript runtime

The following binaries:

  • Crates.io - Tool for translating shaders between different languages using naga.
  • Crates.io - Tool for getting information on GPUs in the system.
  • cts_runner - WebGPU Conformance Test Suite runner using deno_webgpu.
  • player - standalone application for replaying the API traces.

For an overview of all the components in the gfx-rs ecosystem, see the big picture.

Getting Started

Rust

Rust examples can be found at wgpu/examples. You can run the examples on native with cargo run --bin wgpu-examples . See the list of examples.

To run the examples in a browser, run cargo xtask run-wasm. Then open http://localhost:8000 in your browser, and you can choose an example to run. Naturally, in order to display any of the WebGPU based examples, you need to make sure your browser supports it.

If you are looking for a wgpu tutorial, look at the following:

No reviews found!

No comments found for this product. Be the first to comment!