Shared libraries
Shared libraries
Posted Nov 25, 2025 14:32 UTC (Tue) by khim (subscriber, #9252)In reply to: Shared libraries by farnz
Parent article: APT Rust requirement raises questions
> Option and Result can be fully monomorphized in your API
Yes. But not with Rust as it exists today.
> in which case there's no polymorphic parts (even though pubstruct Foo<T>(Option<T>) is polymorphic, pub struct Foo(Result<u32, MyError&ht;) is not).
Even pub struct Foo(Result<u32, MyError>) is polymorphic because it depends on a compiler version. Compile is free to change the representation of pub struct Foo(Result<u32, MyError>) at any time, in fact nightly have a flag to do that and stable does it from time, to time, too.
Well… compiler upgrade [potentially] break ABI which means you would have to specify precisely which version of the compiler defines it… and never upgrade.
RenderScript tried that and died as a result, Apple ended up in the exact same potion, etc.
You couldn't build a stable platform on a quicksand.
