wgsl_bindgen 0.22.0

Type safe Rust bindings workflow for wgsl shaders in wgpu
Documentation
1
2
3
4
5
6
7
8
9
10
use proc_macro2::Ident;

/// This mod is used such that all the mods in the out can reference this from anywhere
pub(crate) const MOD_REFERENCE_ROOT: &str = "_root";
pub(crate) const MOD_STRUCT_ASSERTIONS: &str = "layout_asserts";
pub(crate) const MOD_BYTEMUCK_IMPLS: &str = "bytemuck_impls";

pub(crate) fn mod_reference_root() -> Ident {
  unsafe { syn::parse_str(MOD_REFERENCE_ROOT).unwrap_unchecked() }
}