waterui_graphics/lib.rs
1#![doc = "Graphics primitives for `WaterUI`."]
2#![allow(clippy::multiple_crate_versions)]
3
4extern crate alloc;
5
6/// High-performance GPU rendering surface using wgpu (advanced API).
7#[cfg(feature = "wgpu")]
8pub mod gpu_surface;
9
10/// Simplified shader-based GPU surface (intermediate API).
11#[cfg(feature = "wgpu")]
12pub mod shader_surface;
13
14// Canvas for 2D vector graphics using Vello (beginner-friendly API).
15// #[cfg(feature = "canvas")]
16//pub mod canvas;
17//pub use canvas::{Canvas, DrawingContext};
18// Canvas is not available on main branch yet
19
20// Re-export key types for user convenience.
21#[cfg(feature = "wgpu")]
22pub use gpu_surface::{GpuContext, GpuFrame, GpuRenderer, GpuSurface};
23
24#[cfg(feature = "wgpu")]
25pub use shader_surface::ShaderSurface;
26
27// Re-export wgpu and bytemuck for users to access GPU types directly.
28#[cfg(feature = "wgpu")]
29pub use wgpu;
30
31/// Re-export bytemuck for safe byte conversions in GPU programming.
32#[cfg(feature = "wgpu")]
33pub use bytemuck;