Hacker News new | ask | show | jobs
by tialaramex 1108 days ago
> ABI stability implies API stability

Yes, but not vice versa. Rust's language and standard library for example promises API stability, but not ABI stability. Since it doesn't promise ABI stability, the actual implementation can be radically different so long as the API you were promised still works and nobody has to go around "changing every single project" because there aren't any changes, for source code nothing changed.

2 comments

I believe Rust guarantees ABI stability through the C FFI, what it doesn’t guarantee is a Rust <—> Rust stable ABI (unless you use Rust <-> C <-> Rust).
Rust basically doesn't have dynamic linking though and is relying on underlying platforms having stable ABIs.
It does have dynamic linking, --crate-type=dylib.
Sure, but the ABI isn't stable and you're expected to recompile all your dependencies in one go. You can make a C-style ABI for your crate but that's not very common.
That is another matter.