Expand description
Core of cargo-add command
Modulesยง
- crate_spec ๐Crate name parsing.
Structsยง
- Information on what dependencies should be added
- Dependency entry operation
- Track presentation-layer information with the editable representation of a
[dependencies]
entry (Dependency)
Functionsยง
- Add dependencies to a manifest
- When { workspace = true } you cannot define other keys that configure the source of the dependency such as
version
,registry
,registry-index
,path
,git
,branch
,tag
,rev
, orpackage
. You can also not definedefault-features
. - When the
--optional
option is added usingcargo add
, we need to check the current rust-version. As thedep:
syntax is only available starting with Rust 1.60.0 - find_workspace_dep ๐
- Provide the existing dependency for the target table
- latest_compatible ๐Of MSRV-compatible summaries, find the highest version
- Lookup available features
- populate_dependency ๐
- precise_version ๐Convert a
semver::VersionReq
into a renderedsemver::Version
if all fields are fully specified. - print_action_msg ๐
- print_dep_table_msg ๐
- resolve_dependency ๐
- select_package ๐