3 ms·
You could also change $CARGO_HOME per project, to get a per-project cache.
by steveklabnik 11y ago
You could also change $CARGO_HOME per project, to get a per-project cache.
- BenTheElder 11y agoI actually do this with one project, with a very small script that wraps cargo and sets $CARGO_HOME to a project local path before actually calling cargo. I keep a very short cargo.py and cargo.sh with my project. I've experimented with using this to "vendor" dependencies in a local .cargo and so far that seems to work. An early example with discussion of the python version is here: https://www.reddit.com/r/rust/comments/3ea6je/is_there_a_better_way_to_vendor_dependencies/ https://www.reddit.com/r/rust/comments/3ea6je/is_there_a_bet...
- SimonSapin 11y agoServo does this by default. (People who tried Servo but don’t otherwise develop in Rust didn’t like having random files in their home directory.)