1 [![Documentation](https://docs.rs/home/badge.svg)](https://docs.rs/home)
2 [![Crates.io](https://img.shields.io/crates/v/home.svg)](https://crates.io/crates/home)
4 Canonical definitions of `home_dir`, `cargo_home`, and `rustup_home`.
6 This provides the definition of `home_dir` used by Cargo and rustup,
7 as well functions to find the correct value of `CARGO_HOME` and
10 The definition of `home_dir` provided by the standard library is
11 incorrect because it considers the `HOME` environment variable on
12 Windows. This causes surprising situations where a Rust program will
13 behave differently depending on whether it is run under a Unix
14 emulation environment like Cygwin or MinGW. Neither Cargo nor rustup
15 use the standard libraries definition - they use the definition here.
17 This crate further provides two functions, `cargo_home` and
18 `rustup_home`, which are the canonical way to determine the location
19 that Cargo and rustup store their data.
21 See [rust-lang/rust#43321].
23 [rust-lang/rust#43321]: https://github.com/rust-lang/rust/issues/43321