When can we have rdylib?

There is already a topic discussing ABI issues, along with a project wiki, so people are aware of (some) of the issues. Unfortunately, while lots of people seem to be interested in this problem (me included), none of us have sufficient time to actually work on it. If you do have time, please update the wiki with your thoughts and comments!

As a note, what you want to do is hard. The issue is that what I think we're all after is a safe ABI, one that allows a linker/loader to decide if the semantics of a library have changed between versions. If the entire planet perfectly followed semver.org requirements, and if all compiled binaries that used the ABI also ensured that all of Rust's safety guarantees were met, then we could possibly do this just by requiring all binaries expose an interface that included a machine-readable version string. However, I think this may not be sufficient, it may actually be an undecideable problem. E.g., as the maintainer of some library, I may notice some function has a bug in it that I consider to be small, so I fix it, bump the patch version number, and make a release. Package maintainers look at the change logs, release version number, etc., and agree that it was a small fix, so the next time you update your system, your libraries also get updated. Well, it turns out that some binary that depends on the library depended on the 'buggy' behavior to operate correctly, so now it's broken. So, was the fix small, or did it warrant a major version number bump? Eye of the beholder... More importantly, what information could we have encoded into the binary that would have allowed a loader to decide that the change in functionality would have an effect on the behavior of the binary?

1 Like