cargo-edit
cargo-edit copied to clipboard
read cargo configs with/without .toml extension + make public API clearer
The goal for my series of commits is to consolidate repeated functionality and make this crate easier to use for those using it's public Rust API.
commit ff1e158:
- prevents
cargo_edit::registry::cargo_homefrom unnecessarily getting $HOME, or checking UTF8 compliance.
commit 03f6d74: introduce new structs to drive a new public, programmable API
- supports reading both bare
.cargo/configand.cargo/config.tomlfiles - added documentation
- puts some of the public API into new
RegistryReqandRegistryIndexstructs, and attaches many of the freestanding functions incargo_edit::registryinto those.-
RegistryReqnotably allows a new user of the public API to more easily figure out the latest dependency of a crate without supplying a project directory.
-
commit 1c986a6:
- rolls back changed public signatures, to forward to the new functions, with deprecation warnings
- moves implementations to their respective
RegistryReqandRegistryIndexstructs
commit 933ebfe:
- bakes in the generated binary paths (cargo-add/cargo-rm/cargo-update) for testing purposes
- also enables testing this crate within a cargo workspace, as the target/ dir is not in the expected crate root or CWD location for those.
I plan to do a major bump once I am done editing the public API, if that is welcomed :)