const_shader_layout 0.3.3

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

shader_layout! {
    //~^ ERROR: Failed to implement `ShaderLayout`: struct `SizeUnaligned` size (12) must be equal to its shader size (16), i.e. rounded up to its `ALIGN` (16)
    pub struct SizeUnaligned {
        a4: glam::Vec3,
    }
}