cargo add <DEP_ID...>

Add dependencies to a Cargo.toml manifest file




--no-default-featuresDisable the default features
--default-featuresRe-enable the default features
-F, --featuresSpace or comma separated list of features to activate
--optionalMark the dependency as optional
-v, --verboseUse verbose output
--no-optionalMark the dependency as required
--color <WHEN>
--rename <NAME>Rename the dependency
--frozenRequire Cargo.lock and cache are up to date
--manifest-pathPath to Cargo.toml
--lockedRequire Cargo.lock is up to date
-p, --package <SPEC>Package to modify
--offlineRun without accessing the network
-q, --quietDo not print cargo log messages
--dry-runDon't actually write the manifest
-h, --helpPrint help information
--path <PATH>Filesystem path to local crate to add
--git <URI>Git repository location
--branch <BRANCH>Git branch to download the crate from
--tag <TAG>Git tag to download the crate from
--rev <REV>Git reference to download the crate from
--registry <NAME>Package registry for this dependency
--devAdd as development dependency
--buildAdd as build dependency
--target <TARGET>Add as dependency to the given target platform