How does Rust handle multiple object files and dynamic linking? It seems to me that pretty much all of these guarantees break down if the compiler can't see the source code for the whole program at once.
I'm skeptical. Did they really make the type information stored in the ABI that advanced? Storing that kind of information outside of name mangling is a nontrivial feat (i.e. they'd need to rewrite the linker) and there's not a whole lot of information you can pack into name mangling.
It basically generates a header file from the source code and then stores it alongside the object data containing the type information of all public items.
So there's no run-time dynamic linking? Or is it possible, but only with additional metadata files present? Or maybe the assumptions are statically verified according to the interface and it is assumed that they are never broken by clients?