Mapping [64]u8 buffer to a struct

But apparently it is possible with so called extern structs, thanks to @IntegratedQuantum.
For example

const S = extern struct {
    a: u8 align(1),
    b: u8,
    c: u8,
};

has size 3 and alignment 1.

2 Likes