https://github.com/brson/home
Canonical definitions of home_dir, CARGO_HOME, and RUSTUP_HOME
https://github.com/brson/home
Last synced: 10 months ago
JSON representation
Canonical definitions of home_dir, CARGO_HOME, and RUSTUP_HOME
- Host: GitHub
- URL: https://github.com/brson/home
- Owner: brson
- License: apache-2.0
- Created: 2017-07-18T23:28:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-18T18:47:06.000Z (over 3 years ago)
- Last Synced: 2024-12-24T02:50:25.473Z (over 1 year ago)
- Language: Rust
- Size: 71.3 KB
- Stars: 63
- Watchers: 8
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
[](https://docs.rs/home)
[](https://crates.io/crates/home)
__NOTE:__ This repository has been moved into [rust-lang/cargo].
[rust-lang/cargo]: https://github.com/rust-lang/cargo/tree/master/crates/home
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 OR Apache-2.0