File: README.md

package info (click to toggle)
rust-home 0.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 84 kB
  • sloc: makefile: 2
file content (24 lines) | stat: -rw-r--r-- 921 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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].

[rust-lang/rust#43321]: https://github.com/rust-lang/rust/issues/43321

## License

MIT/Apache-2.0