Module cargo_add

Source
Expand description

Core of cargo-add command

Modulesยง

crate_spec ๐Ÿ”’
Crate name parsing.

Structsยง

AddOptions
Information on what dependencies should be added
DepOp
Dependency entry operation
DependencyUI
Track presentation-layer information with the editable representation of a [dependencies] entry (Dependency)

Constantsยง

MAX_FEATURE_PRINTS ๐Ÿ”’

Functionsยง

add
Add dependencies to a manifest
check_invalid_ws_keys ๐Ÿ”’
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, or package. You can also not define default-features.
check_rust_version_for_optional_dependency ๐Ÿ”’
When the --optional option is added using cargo add, we need to check the current rust-version. As the dep: syntax is only available starting with Rust 1.60.0
find_workspace_dep ๐Ÿ”’
format_features_version_suffix ๐Ÿ”’
fuzzy_lookup ๐Ÿ”’
get_existing_dependency ๐Ÿ”’
Provide the existing dependency for the target table
get_latest_dependency ๐Ÿ”’
infer_package_for_git_source ๐Ÿ”’
latest_compatible ๐Ÿ”’
Of MSRV-compatible summaries, find the highest version
populate_available_features ๐Ÿ”’
Lookup available features
populate_dependency ๐Ÿ”’
precise_version ๐Ÿ”’
Convert a semver::VersionReq into a rendered semver::Version if all fields are fully specified.
print_action_msg ๐Ÿ”’
print_dep_table_msg ๐Ÿ”’
resolve_dependency ๐Ÿ”’
select_package ๐Ÿ”’