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
9
10
11
12
13
14
15
16
error[E0080]: evaluation panicked: Failed to implement `ShaderLayout`: struct `SizeUnaligned` size (12) must be equal to its shader size (16), i.e. rounded up to its `ALIGN` (16)
 --> tests/compile_fail/struct_size_unaligned.rs:3:1
  |
3 | / shader_layout! {
4 | |
5 | |     pub struct SizeUnaligned {
6 | |         a4: glam::Vec3,
7 | |     }
8 | | }
  | |_^ evaluation of `_` failed here
  |
  = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `shader_layout` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0080`.