home

Crates.iohome
lib.rshome
version
sourcesrc
created_at2017-07-18 23:38:10.759249
updated_at2024-12-16 15:41:39.426215
descriptionShared definitions of home directories.
homepagehttps://github.com/rust-lang/cargo
repositoryhttps://github.com/rust-lang/cargo
max_upload_size
id24000
Cargo.toml error:TOML parse error at line 26, column 1 | 26 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(rust-lang-owner)

documentation

https://docs.rs/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 library's definition - they use the definition here.

Note: This has been fixed in Rust 1.85 to no longer use the HOME environment variable on Windows. If you are still using this crate for the purpose of getting a home directory, you are strongly encouraged to switch to using the standard library's home_dir instead. It is planned to have the deprecation notice removed in 1.86.

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.

This crate is maintained by the Cargo team, primarily for use by Cargo and Rustup and not intended for external use. This crate may make major changes to its APIs or be deprecated without warning.

License

MIT OR Apache-2.0

Commit count: 19402

cargo fmt