Shared libraries
Shared libraries
Posted Nov 26, 2025 15:40 UTC (Wed) by khim (subscriber, #9252)In reply to: Shared libraries by farnz
Parent article: APT Rust requirement raises questions
> In an ideal world, there would be tooling that told people working on Vulkan "hey, you've changed this structure in such a way that it now has different size/alignment. You can't do that!"
That tool is called Libabigail. And yes, it's used when Vulkan is upgraded.
> That's a lightweight object being exposed - and thus needs a stable ABI.It just needs stable layout. But yes, it's an interesting dilemma there: if you just freeze the layout someone still needs to ensure that said Option<&str> would be valid when it crosses library boundary.
Whether this needs to be exposed to developers as some kind of universally accessible tooling or kept to the standard library is an interesting question. Today there are a lot of things that standard library does yet regular programs can not do. Providing inlining for methods of Option<str> without giving such ability to third-party library could be a good first step.
After all it's not possible to take self: Foo<Bar<Self>> today as target for the method, but only self: Rc<Self> or self: Arc<Self>… and sky haven't fallen on earth.
