dawn-sys 0.2.0

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.
Documentation
dawn-sys-0.2.0 has been yanked.

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.

If you are looking for safe and idiomatic Rust wrappers for Dawn or webgpu.h, you should consider dawn-rs instead of this crate, which provides higher-level and more "Rust-style" abstractions based on this crate. If you are just looking for a higher-level graphics API wrapper and guarenteed consistent behavior and performance with mainstream browsers (Google Chrome, Microsoft Edge, ...) isn't one your major concerns, please also try wgpu before reaching for dawn-rs or dawn-sys. wgpu is another open source and cross-platform implementation of the WebGPU specification that is fully written in Rust and is used in Mozilla Firefox, Servo and Deno for WebGPU support. It also serves as the de-facto standard of high-level, cross-platform graphics development in the Rust ecosystem.

This crate is still a work in progress. USE AT YOUR OWN RISK. It should serve in most common cases but may lack certain APIs or fail on corner cases. The aforementioned wgpu crate is way more mature and should always be considered ahead of this crate.

This crate is currently Windows-only. Given the cross-platform capabilities of Dawn, it is planned 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. If you'd like to help, you are welcome to open an issue for further discussion.

This crate assumes your familiarity with GPU development using the Dawn C API. This crate is not providing rustdoc for its exported items and those that are re-exported in dawn-rs. Completing the missing docs 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. This whole repository, including the code generator, is licensed under the GNU General Public License, Version 3.0, see README.md at the repository root.

This crate welcomes all kind of contributions. Open an issue or PR at any time for bugfixes or feature requests.