While I see and agree with your point in spirit, I do not know of any currently existing, safe, Rust-specific ABIs that can deal with dynamic linking.
With that in mind, the only real option is the C ABI I think. That said, it’s not that bad, since access through
libloading is safe, in the sense that pointers into the dynamic lib are pretty much guaranteed to be valid.
In addition, you get the option of adding code written in other languages and/or by other people, as long as those languages can compile into dynamic libraries. This may not matter to you, but I’m just throwing it out there.
Other than the understandable wish to do better than the
C ABI status quo, is there a specific reason for wanting a Rust ABI?