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 7623/week @ 2018-05-27 9219/week @ 2018-06-03 8550/week @ 2018-06-10 7060/week @ 2018-06-17 7561/week @ 2018-06-24 9692/week @ 2018-07-01 8950/week @ 2018-07-08 9842/week @ 2018-07-15 10461/week @ 2018-07-22 9800/week @ 2018-07-29 10877/week @ 2018-08-05 10375/week @ 2018-08-12 9731/week @ 2018-08-19

32,734 downloads per month
Used in 28 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

~559KB

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