Note however the SAFETY comment - it's essential here, since for repr(Rust) structs their layout is unspecified, and you can't know whether this blob of bytes does match it. If you just want to include some complex data into binary at compile-time, you might want to look for something like databake, for more convenience.