making a repr(c) struct will work IF you ALWAYS get ALL of the following correct: * you NEVER deal with different endianness (or ALWAYS do appropriate swaps) * you NEVER have implicit padding, and ALWAYS have correct alignment for all targets; OR * you use repr(packed), and you NEVER take references to unaligned fields * you NEVER rearrange fields or use enums with incorrect variants if you EVER break any of those rules, over time, you will have subtle UB.