2 releases

new 0.1.0-alpha.3 May 5, 2025
0.1.0-alpha.1 Mar 21, 2025

#1108 in Graphics APIs

Download history 121/week @ 2025-03-19 9/week @ 2025-03-26 1/week @ 2025-04-02 1/week @ 2025-04-16 108/week @ 2025-04-30

109 downloads per month
Used in awsm-renderer

MIT license

120KB
3K SLoC

Renderer core

This is a core crate for the awsm renderer.

At this level, it's just a thin wrapper around the WebGPU API. It is intended to be used as a low-level primitive, without the headache of dealing with the raw web-sys bindings directly.

The overall approach is to allow native web-sys types throughout the main methods, but have Rust-friendly data types that can be used to create all the descriptors, pipelines, etc. These Rust-friendly data types impl Into<web_sys::...> and so they can be passed like foo.into(). This allows for a more idiomatic Rust API for all the heavy lifting, while still allowing for the raw web-sys types to be used when needed.

In some cases like the command encoder, the custom type holds an inner raw web-sys type, and impls Deref to it, so you get a mixture of the original methods and nicer new ones as they are added.

Dependencies

~15MB
~244K SLoC