Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ~/.cargo to ~/.cache/cargo? #210

Closed
SimonSapin opened this issue Jul 17, 2014 · 4 comments
Closed

Move ~/.cargo to ~/.cache/cargo? #210

SimonSapin opened this issue Jul 17, 2014 · 4 comments

Comments

@SimonSapin
Copy link
Contributor

I see that Cargo creates a .cargo directory in my home directory, containing git repositories and checkouts of dependencies I use. These files seem "non-essential": if removed, Cargo will just download dependencies again and recreate them.

At least Linux, the best practice here seems to be to follow the XDG Base Directory Specification and have these files in $XDG_CACHE_HOME/cargo, falling back on ~/.cache/cargo if the variable is not set, empty, or not an absolute path.

@netvl
Copy link

netvl commented Jul 17, 2014

I'd like to note that ~/.cargo can also contain a configuration file, though it is not widely advertised now (I don't know its full abilities, but it currently can override paths to various packages system-wise).

Also Windows does not have anything like XDG specification.

@tomjakubowski
Copy link
Contributor

this is #148

@huonw
Copy link
Member

huonw commented Jul 17, 2014

(Closing as a dupe, thanks for filing!)

@huonw huonw closed this as completed Jul 17, 2014
@SimonSapin
Copy link
Contributor Author

@netvl Yeah, that should go into ~/.config/cargo, or whatever the XDG variable is. I’ll comment on #148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants