pub fn run_descriptor_cargo_cached(
request: &DescriptorCargoRequest,
cache_directory: &Path,
) -> Result<CachedDescriptorCargoLease, DescriptorCacheError>Expand description
Run Cargo’s descriptor compilation and reuse exact units from an explicit persistent cache when Cargo reports artifacts as fresh.
request.staging_directory remains fresh and invocation-local during
ordinary builds. Crash recovery instead resumes only the exact
marker-owned staging root named by the target journal and gives each retry
a fresh child writer directory. The current Cargo JSON stream authorizes
every cache hit, whose object is then validated in place and retained under
the returned cache lease.