Rearranging across the interface
Rearranging across the interface
Posted Feb 27, 2025 10:44 UTC (Thu) by farnz (subscriber, #17727)In reply to: Rearranging across the interface by Wol
Parent article: Rewriting essential Linux packages in Rust
But then you're getting into a mess around defining what is, and is not, a safe code change inside the ABI boundary. If you do make the internals of a crate (not the exported interface) the ABI boundary, you're now in a position where the compiler has to make a judgement call - "is this change inside the internals of a library a bad change, or a good change?".
Note that when making this judgement call, it can't just look at things like "is this moving a check across an internal boundary", since some moves across an internal boundary are safe, nor can you condition it on removing a check from inside the boundary (since I may remove an internal check that is guaranteed to be true since all the inline functions that can call this have always done an equivalent check, and I'm no longer expecting more inline functions without the check).
