const_shader_layout 0.2.1

Compile-time checks for whether structs conform to WGSL's memory layout rules
Documentation
1
2
3
4
5
6
7
8
9
10
11
use const_shader_layout::shader_layout;

// Succeeds because it is correctly aligned in `repr`.
shader_layout! {
    #[repr(align(16))]
    pub struct MyUniform2 {
        a1: glam::Vec3,
    }
}

fn main() {}