Skip to main content

mln_webgpu/
lib.rs

1//! Ports the C++ WebGPU backend (`src/mln/webgpu`, `include/mln/webgpu`,
2//! `include/mln/shaders/webgpu`, `src/mln/shaders/webgpu`, and the headless
3//! backend from platform/default) onto the `wgpu` crate.
4//!
5//! The C++ backend runs on Dawn or wgpu-native through the WebGPU C API; this
6//! port makes the same calls through wgpu's Rust API. Raw `WGPU*` handles
7//! become wgpu objects (reference counted, so "release" is a drop), and the
8//! `Context&` members of resources become `Rc<Context>`.
9//!
10//! The WGSL comes unchanged from the C++ headers: `//crates/mln_webgpu:wgsl_sources`
11//! runs `tools/extract_wgsl.rs` over them at build time and generates
12//! `shaders::wgsl_sources`.
13
14pub mod buffer_resource;
15pub mod command_encoder;
16pub mod context;
17pub mod drawable;
18pub mod drawable_builder;
19pub mod headless_backend;
20pub mod layer_group;
21pub mod offscreen_texture;
22pub mod render_pass;
23pub mod renderable_resource;
24pub mod renderer_backend;
25pub mod shaders;
26pub mod surface_backend;
27pub mod texture2d;
28pub mod tile_layer_group;
29pub mod uniform_buffer;
30pub mod upload_pass;
31pub mod vertex_buffer_resource;
32
33pub use context::Context;
34pub use headless_backend::HeadlessBackend;
35pub use renderer_backend::RendererBackend;
36pub use surface_backend::SurfaceBackend;