**`dawn-sys` provides unsafe Rust bindings for [Dawn](https://github.com/google/dawn)**, the open-source and cross-platform implementation of the [WebGPU](https://webgpu.dev/) 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`](https://github.com/mmozeiko/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`](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`](https://gist.github.com/mmozeiko/4c68b91faff8b7026e8c5e44ff810b62).
**This crate does not provide rustdoc for its public APIs. Most of the APIs are defined in [WebGPU-Headers](https://github.com/webgpu-native/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`](https://github.com/mmozeiko/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](../LICENSE), aligning to [Dawn](https://github.com/google/dawn) and [WebGPU-Headers](https://github.com/webgpu-native/webgpu-headers).