Rust does not compile the whole world at once. Each crate is compiled separately, and then they’re all linked together at the end.
Yeah, I know, but I mean that it's normal to link together crates compiled with the same compiler, unlike with C, where ABIs are stabler and binary dependencies are more common.