cargo-sweep icon indicating copy to clipboard operation
cargo-sweep copied to clipboard

Support shared target directory

Open inodentry opened this issue 1 year ago • 1 comments

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.

inodentry avatar Oct 09 '22 13:10 inodentry