pub fn cargo_build_output_lock_root() -> Result<PathBuf>Expand description
Host-global coordination namespace for wrapper-owned Cargo output locks.
Output ownership follows the canonical Cargo target directory, not the
caller’s artifact-cache selection. Two invocations which deliberately use
different KTSTR_CACHE_DIRs can still write the same CARGO_TARGET_DIR;
placing this lock below either cache root would let both writers enter
Cargo’s artifact lock while holding separate ktstr build reservations.
KTSTR_LOCK_DIR is the existing machine-wide coordination namespace for
ktstr participants, with /tmp as its normal fallback.
The version is intentionally part of the directory name. Every ktstr writer participating in this protocol acquires the same per-target-dir lock before spawning Cargo and retains it until emitted artifacts are pinned. There is no lookup of an older cache-rooted namespace.