dawn-sys

Crates.iodawn-sys
lib.rsdawn-sys
version1.0.3
created_at2025-05-16 17:41:36.062273+00
updated_at2025-06-10 16:27:39.834456+00
descriptionUnsafe 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
repositoryhttps://github.com/Nekomaru-PKU/dawn-rs
max_upload_size
id1676757
size9,230,128
Nekomaru (Nekomaru-PKU)

documentation

README

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.

Commit count: 20

cargo fmt