4 releases (2 breaking)

0.3.2 Mar 19, 2018
0.3.0 Jul 19, 2017
0.2.0 Jul 19, 2017
0.1.0 Jul 18, 2017

#5 in Embedded development

Download history 8486/week @ 2018-07-06 9166/week @ 2018-07-13 9915/week @ 2018-07-20 9988/week @ 2018-07-27 11133/week @ 2018-08-03 10727/week @ 2018-08-10 10056/week @ 2018-08-17 10315/week @ 2018-08-24 9484/week @ 2018-08-31 10072/week @ 2018-09-07 14487/week @ 2018-09-14 12324/week @ 2018-09-21 10217/week @ 2018-09-28

32,734 downloads per month
Used in 35 crates (4 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

~558KB

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