> where you’d have to specify the target CPU model
I would be wary of doing this unless you're sure your executable will only ever run on that CPU model.
> This would work best in a high level language where the specific bit layout of struct types is not defined (by default). Rust is one such language
Note that Rust does leak some implicit assumption about struct layouts. For example you can always get a pointer to a struct field, meaning a field can't be e.g. a single bit, it must be an non-negative amount of bytes (so for example the 32-bit number as product type of 32 1-bit numbers would not work if you use a struct as the product type).
> or aligned non-null pointers on some architectures would be “0 < x << 3”.
I wonder which architecture requires all pointers to have an alignment of 8.