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_compat;

shader_layout_compat! {
    pub struct S1 {
        a1: [f32; 1],
        //~^ ERROR: the trait bound `f32: ShaderLayoutCompatArrayElement` is not satisfied
    }
}