#wgpu #web-gpu #vulkan #metal

sys dawn-sys

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

4 stable releases

Uses new Rust 2024

1.0.3 Jun 10, 2025
1.0.2 Jun 8, 2025
0.4.2 Jun 2, 2025
0.4.1 May 22, 2025
0.1.2 May 19, 2025

#238 in Graphics APIs

Download history

744 downloads per month

BSD-3-Clause

9MB
12K SLoC

Contains (Windows DLL, 8.5MB) bin/webgpu_dawn.dll, (static library, 105KB) bin/webgpu_dawn.lib

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.

Dependencies