Shared libraries
Shared libraries
Posted Nov 26, 2025 22:20 UTC (Wed) by ralfj (subscriber, #172874)In reply to: Shared libraries by ballombe
Parent article: APT Rust requirement raises questions
> C++ support shared libraries and rust could in principle support them too.
Not sure if you are trolling or just ignorant, but the reasons are entirely technical. Supporting shared libraries properly is really, really hard. C++ barely supports them, but only if you avoid templates and are extremely careful -- doing the same in Rust (in particular, foregoing the use of generics in library API surfaces) would give up almost all the benefits Rust brings, so it's pointless. Swift supports them through a metric ton of engineering work: https://faultlore.com/blah/swift-abi/ .
I'd love to see a stable ABI that actually supports Rust-style APIs. I am certain it's the same for many of my colleagues on the Rust compiler team. But the engineering required for that far exceeds any single new feature that Rust has gained since version 1.0. So please don't go around claiming that Rust does not support shared libraries for non-technical reasons, implying that we somehow have a political agenda to oppose shared libraries or something like that.
