6 releases

0.3.4 Jan 15, 2019
0.3.3 May 11, 2018
0.3.2 Mar 19, 2018
0.3.0 Jul 19, 2017
0.1.0 Jul 18, 2017

#20 in Filesystem

Download history 10769/week @ 2018-11-08 10844/week @ 2018-11-15 10569/week @ 2018-11-22 11341/week @ 2018-11-29 13002/week @ 2018-12-06 11958/week @ 2018-12-13 10129/week @ 2018-12-20 11931/week @ 2018-12-27 12130/week @ 2019-01-03 10801/week @ 2019-01-10 12541/week @ 2019-01-17 12063/week @ 2019-01-24 12301/week @ 2019-01-31 13092/week @ 2019-02-07 10865/week @ 2019-02-14

49,032 downloads per month
Used in 49 crates (6 directly)

MIT/Apache

12KB
163 lines

Canonical definitions of home_dir, cargo_home, and rustup_home.

This provides the definition of home_dir used by Cargo and rustup, as well functions to find the correct value of CARGO_HOME and RUSTUP_HOME.

The definition of home_dir provided by the standard library is incorrect because it considers the HOME environment variable on Windows. This causes surprising situations where a Rust program will behave differently depending on whether it is run under a Unix emulation environment like Cygwin or MinGW. Neither Cargo nor rustup use the standard libraries definition - they use the definition here.

This crate further provides two functions, cargo_home and rustup_home, which are the canonical way to determine the location that Cargo and rustup store their data.

See rust-lang/rust#43321.

License

MIT/Apache-2.0

Dependencies

~532KB

  • windows scopeguard 0.3
  • windows winapi 0.3+errhandlingapi+handleapi+processthreadsapi+std+winerror+winnt+userenv