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 `f32` is aligned in `repr(C)`.
shader_layout! {
    pub struct MyUniform2 {
        a4: half::f16,
        a1: f32,
    }
}

fn main() {}