
This is to bring us into conformance with the [Rust crate ownership policy](https://forge.rust-lang.org/policies/crate-ownership.html). Items of note - `cargo-credential-1password` is declared as Experimental as it is intended for the community but I was unsure if we wanted to commit to full support for it. In my mind, the ideal thing to do would be to expatriate this to 1password. - `home` is declared as Internal despite its wide use within the ecosystem. - `cargo-credential` is declared as Intentional as its an API intended for the wider ecosystem and I didn't see a reason to declare it experimental. - `cargo-platform`, `cargo-util-schemas`, and `crates-io` are declared as Intentional as they are both used internally and intended for others to use for logic that integrates with cargo/registries. I wondered about these being Experimental or Internal instead.
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.
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