You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.The text was updated successfully, but these errors were encountered: