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
Download history 13025/week @ 2019-01-21 11511/week @ 2019-01-28 12943/week @ 2019-02-04 11993/week @ 2019-02-11 11056/week @ 2019-02-18 12145/week @ 2019-02-25 10462/week @ 2019-03-04 11410/week @ 2019-03-11 9604/week @ 2019-03-18 10743/week @ 2019-03-25 11268/week @ 2019-04-01 12828/week @ 2019-04-08 10891/week @ 2019-04-15 11323/week @ 2019-04-22 10501/week @ 2019-04-29

48,256 downloads per month
Used in 56 crates (9 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

~541KB