soa-derive
soa-derive copied to clipboard
Const array SoA variant
I think it would be nice to generate a type like:
pub struct FooArray<const N: usize> {
pub f1: [f32; N],
pub f2: [u8; N],
...
}
This would allow you to do stuff like core::alloc::Layout::new::<FooArray<128>>() for free.
Agrees that this could be nice to do, but I don't have time to implement this myself. If someone wants to contribute this, I can take some time to review PR.
Sadly this particular feature ended up being a mismatch for my problem, so I don't have a good reason to implement it.