[Pre-Pre-RFC] Dynamic library proposal
LouChiSoft:
No fixed ABI here, just the one that toolchain used at the time it was compiled.
This doesn't work very well the moment you have some kind of indirection. If your function accepts a &Foo then the ABI of the function cannot dictacte how to pass the Foo behind the reference. This in turns means that either the caller's Foo is the same as the dynamic library's or they are different Foos.
Now imagine if Foo is a stdlib type. The suddently you and the dynamic library are basically speaking two different dialects of Rust!
This is also missing some safety measures at linking time. Are you just trusting that the library loaded at runtime will be ABI-compatible with the .lib provided? What about ABI-compatible changes though?
Note that even if the Rust-level ABI is the same that doesn't mean a type cannot change (and in turn change its ABI) across different versions of a library!
Finally, I assume this doesn't aim to handle generics. This should be noted somewhere since generics always come up when talking about dynamic loading.
Discussion in the ATmosphere