External Publication
Visit Post

Stable type identifiers: a missing piece for crABI and export

Rust Internals [Unofficial] March 19, 2026
Source

I have reviewed issues #1849 and #129014. It seems to me that there is a clear consensus that the current type_id (based on SipHash-1-3) is not sufficiently collision-resistant, which poses a real security risk (unsoundness).

My proposal to use a 128-bit identifier (or even extend it to 256 bits, as suggested in RalfJung’s thread), divided into a Stable Identity and a Layout Fingerprint, seems to align with the “Possible Solutions” that the compiler team itself is currently discussing. If we implement a scheme based on pointers or a longer hash, we could ultimately have a Typeld that is:

Stable across compiler versions (via the Path identity). Secure (using a cryptographic fingerprint such as BLAKE3). Flexible, allowing structures to be moved between modules without breaking compatibility, provided that the compiler always manages the mapping from the path to the identity.

Given that the team is already considering a meeting to design this feature, don’t you think it’s time to reconsider the 64-bit limit and seek the most robust solution for ABI stability in Rust? I am aware that the ABI is intentionally unstable, but I have decided to ask this question.

Discussion in the ATmosphere

Loading comments...