Stable type identifiers: a missing piece for crABI and export
Rust Internals [Unofficial]
March 18, 2026
Thanks, this is awesome. It's useful and clarifies something for me (I didn't know this before).
My understanding of what you said is that StableCrateId includes the unique id of a crate, which includes its origin, version, and what it depends on. Also, DefPath and its disambiguator(s) are already established mechanisms for establishing unique types in a crate.
Would combining StableCrateId with DefPath make a practical basis for stable type identifiers? The one real question remaining is whether or not this can be made stable between compiler versions, as opposed to them being implementation details of rustc.
Discussion in the ATmosphere