cargo-sweep
cargo-sweep copied to clipboard
Support shared target directory
I (and many other people) configue cargo to use a single target
dir shared between all projects, by putting something like this in ~/.cargo/config
:
[build]
target-dir = "/Users/iyes/.cargo/target"
That way all projects put their build artifacts in the same place, allowing dependencies to be reused, etc. shortening clean build times.
However, currently there is no nice way to remove only outdated build artifacts from it (say, when updating a nightly toolchain), without outright deleting everything. cargo sweep
could be the perfect tool for this. However, it is currently unsupported, as the tool expects to be run on project dirs.