hom
home
cargo install home
hom

home

Canonical definitions of home_dir, CARGO_HOME, and RUSTUP_HOME

by Brian Anderson

0.5.3 (see all)License:MIT OR Apache-2.0
cargo install home
Readme

Documentation Crates.io

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 OR Apache-2.0

GitHub Stars

24

LAST COMMIT

2yrs ago

MAINTAINERS

3

CONTRIBUTORS

8

OPEN ISSUES

1

OPEN PRs

1
VersionTagPublished
0.5.3
2yrs ago
0.5.2
2yrs ago
0.5.1
3yrs ago
0.5.0
3yrs ago
No alternatives found
No tutorials found
Add a tutorial