by ComputerGuru · 2y ago · 0 comments
> Unfortunately this meant some of the performance wins needed to be sacrificed to avoid an increased memory footprint.
https://doc.rust-lang.org/reference/type-layout.html#the-ali...
That would mean taking a reference of any field of that struct is undefined behavior, unless the compiler does some special magic for this specific case.
> Using `[repr(align(8))]` on the field
I don't think you can do that directly. You would need to use a newtype that specified the alignment, and use that type for the field.