pub fn restore(
view_root: &Path,
store_root: &Path,
unit_filter: Option<&str>,
dry_run: bool,
) -> Result<RestoreReport>Expand description
Link matching unit groups from the vault into a working dir.
deps/ link outputs (.rlib, proc-macro .so) are hard-linked — rustc
only ever replaces those atomically. Fingerprint state, build-script
trees and deps/*.rmeta become private writable copies: rustc writes
.rmeta in place, so a read-only link turns any rebuild of that unit
into output file … .rmeta is not writeable. Hard links share the
store’s canonical stamp; private copies are stamped after copying. Never
overwrites a file that already exists, never touches sources, and a
partial vault is fine: Cargo recompiles whatever is missing.