tl;dr Want to be able to globally configure cargo to build everything on a ram drive; getting tired of typing
--target-dir and/or adding wrapper scripts to repos.
I build as much as I can on ram drives to limit wear and tear on my persistent storage. I type
--target-dir a lot, to the point where I've started adding
run.ps1 scripts to most larger projects. But lately I've had to add additional scripts or make them more elaborate because I'm running other
cargo commands that depend on the build target directory.
I'm wondering if there' s a way this could be done globally, on a user/machine basis. Say a "WorkBaseDir" was added to
$CARGO_HOME/config. This has the obvious problem that it may case collisions for build directories. One idea to solve this could be to use the taget directory
$UniqueString expands to a hash of the directory of the source code root directory (or whatever that is deterministic and not very likely to collide).
Is there any way to accomplish this already? If not, is this something anyone else wants?