| Crates.io | dawn-sys |
| lib.rs | dawn-sys |
| version | 1.0.3 |
| created_at | 2025-05-16 17:41:36.062273+00 |
| updated_at | 2025-06-10 16:27:39.834456+00 |
| description | Unsafe Rust bindings for Dawn, the open-source and cross-platform implementation of the WebGPU standard that powers Google Chrome, Microsoft Edge and other Chromium browsers. |
| homepage | |
| repository | https://github.com/Nekomaru-PKU/dawn-rs |
| max_upload_size | |
| id | 1676757 |
| size | 9,230,128 |
dawn-sys provides unsafe Rust bindings for Dawn, the open-source and cross-platform implementation of the WebGPU standard that powers Google Chrome, Microsoft Edge, and other Chromium-based browsers. It also provides Pre-built Dawn binaries (webgpu_dawn.dll), kindly provided by Mārtiņš Možeiko's build-dawn automation on GitHub Actions that rebuilds the Dawn binaries once per week. This crate contains a build script that handles chores like copying necessary binaries to the output directory, making everything ready out of the box.
examples/hello-triangle.rs demonstrates how to set up WebGPU rendering on Windows using this crate. It is a Rust port of Mārtiņš Možeiko's win32_webgpu.c.
This crate does not provide rustdoc for its public APIs. Most of the APIs are defined in WebGPU-Headers, and documentation for them can be found at https://webgpu-native.github.io/webgpu-headers/index.html.
This crate currently only provides pre-built binaries for x64 Windows, and it contains only the Direct3D 12 Backend. Requesting an adapter of unavailable backends will fail. Note that this is a limitation of build-dawn, and we plan to set up a custom GitHub Action to provide more backend options on prebuilt binaries in the near future. Furthermore, given the cross-platform capabilities of Dawn, it is possible to eventually support macOS, Linux and web in the long term, but it is not currently a key focus of the maintainer of this crate.
This crate is licensed under the BSD-3-Clause license, aligning to Dawn and WebGPU-Headers.