@dsyx Well, you can limit compiler dependencies by using explicitly-sized types (which you are already doing). You can control the remaining dependencies by using compiler specific methods (
pragma pack
) that are widely supported though; and you can assert that a port leads to the expected layout by asserting sizes at compile time and offsets (I think only at run time).