6 releases

new 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

#9 in Hardware support

Download history 10223/week @ 2018-10-27 12412/week @ 2018-11-03 10902/week @ 2018-11-10 10595/week @ 2018-11-17 10856/week @ 2018-11-24 10670/week @ 2018-12-01 12046/week @ 2018-12-08 12970/week @ 2018-12-15 11739/week @ 2018-12-22 10804/week @ 2018-12-29 11626/week @ 2019-01-05 10806/week @ 2019-01-12 11450/week @ 2019-01-19

49,032 downloads per month
Used in 44 crates (5 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

~535KB

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