Problem
When developing Rust projects using Git Worktree + Agent, the default target path causes Cargo's build cache (target/ + .cargo-lock) to be globally mutually exclusive.**
-
e.g
Multiple worktrees/multiple agents in the same workspace/create
simultaneously building with Cargo**
will cause contention for:**
target/ directory** cargo/.package-cache/registry cache file lock (target/.cargo-lock)
Solution
We encapsulated Cargo-Worktree, allowing each worktree to have its own independent target path.
https://crates.io/crates/cargo-worktree/1.0.0
Demo

Welcome to use it!