1

I am installing racer, rustfmt & rustsym

cargo install racer
cargo install rustfmt
cargo install rustsym

The packages are being installed in C:\Users\<UserName>\.cargo, but I want it to be C:\Rust\.cargo.

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
Ahmad Ismail
  • 11,636
  • 6
  • 52
  • 87
  • 2
    http://stackoverflow.com/questions/38050995/how-can-the-location-of-cargos-configuration-directory-be-overridden – Harsha W Mar 30 '17 at 05:54

1 Answers1

2

The easiest way is via --root:

cargo install --root C:\Rust.cargo racer

CARGO_HOME and others can be set to override this too. Consult the documentation or How can the location of cargo's configuration directory be overridden?.

Community
  • 1
  • 1
Tatsuyuki Ishi
  • 3,883
  • 3
  • 29
  • 41
  • My Appologies, a little mistake in the question. Fixed it. The solution would be - cargo install --root C:\Rust\.cargo racer – Ahmad Ismail Mar 30 '17 at 11:11