pub fn rust_runtime_identity(
dirs: &Dirs,
platform: Platform,
version: &str,
) -> Result<String>Expand description
Content identity for the build-critical portion of an exact managed Rust
toolchain. The compiler payload comes from rustup’s manifest-rustc-*, and
every regular file below the selected target’s lib directory is included.
Symlinks and non-regular payloads fail closed.
Hashing a target sysroot can read hundreds of MiB, so the managed runtime’s adjacent marker directory holds an atomic receipt. Its full sorted path/size/mtime inventory is checked on every call; unchanged metadata lets us reuse the content identity, while any drift triggers a full rehash. The receipt is an integrity-checked cache for osdk-managed, immutable runtimes, not a same-user security boundary (a process able to rewrite both payload timestamps and osdk state is outside this boundary).