External Publication
Visit Post

[Pre-Pre-RFC] Dynamic library proposal

Rust Internals [Unofficial] April 5, 2026
Source

Good news: these files already exist. They are called metadata files, with extension .rmeta. They contain exactly the information that the compiler of some dependent code needs in order to compile against the library.

Hey that's cool to know. I assume that maybe some additional information would be needed. But in either case having these files in place is a good start

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.

Not sure I follow, if the compiler has the ABI of Foo in the .rimport file and it also has the ABI of the struct at the callsite then surely it could compare the two and error out if they don't match? Isn't this how Stabby does it's compatability checks between libraries?

Discussion in the ATmosphere

Loading comments...