News for hackers. Stuff that matters.
Re:The x86 architecture is the weirdo (2004) by ncmncm on Tuesday April 19, 2022 @10:25PM (#31092075)
People arguing against changing struct layout rules are probably mainly interested, then, in maintaining backward compatibility with older Rust, itself.

Anyway, same policy applies: annotate your structs "packed" anywhere performance matters and bitwise compatibility with other stuff doesn't.

Re:The x86 architecture is the weirdo (2004) by zozbot234 on Wednesday April 20, 2022 @04:26AM (#31094181)
Rust does not keep backward compatibility like that. In the absence of any statement forcing a specific ABI, the only guaranteed compatibility is with code that's part of the same build, or else part of the current Rust runtime and being linked into said build.
Re:The x86 architecture is the weirdo (2004) by ncmncm on Wednesday April 20, 2022 @12:34PM (#31099480)
Even in Rust, mapping memory between processes, or via files between past and future processes, happens. Although structure-blasting is frowned upon in some circles, it is very fast where allowed.

But... when you are structure-blasting, you are probably also already paying generous attention to layout issues.