fork/cargo
git clone https://git.julia.blue/fork/cargo
8364f7b68
0.91.0
1< svg width = " 860px " height = " 2612px " xmlns = " http://www.w3.org/2000/svg "> 2< style > 3 .fg { fill: #AAAAAA } 4 .bg { background: #000000 } 5 .fg-cyan { fill: #00AAAA } 6 .fg-green { fill: #00AA00 } 7 .container { 8 padding: 0 10px; 9 line-height: 18px; 10 } 11 .bold { font-weight: bold; } 12 tspan { 13 font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; 14 white-space: pre; 15 line-height: 18px; 16 } 17</ style > 18 19< rect width = " 100% " height = " 100% " y = " 0 " rx = " 4.5 " class = " bg " /> 20 21< text xml:space = " preserve " class = " container fg "> 22< tspan x = " 10px " y = " 28px ">< tspan > Add dependencies to a Cargo.toml manifest file</ tspan > 23</ tspan > 24< tspan x = " 10px " y = " 46px "> 25</ tspan > 26< tspan x = " 10px " y = " 64px ">< tspan class = " fg-green bold "> Usage:</ tspan >< tspan > </ tspan >< tspan class = " fg-cyan bold "> cargo add</ tspan >< tspan class = " bold "> </ tspan >< tspan class = " fg-cyan bold "> [OPTIONS]< DEP> [@< VERSION> ] ...</ tspan > 27</ tspan > 28< tspan x = " 10px " y = " 82px ">< tspan class = " bold "> </ tspan >< tspan class = " fg-cyan bold "> cargo add</ tspan >< tspan class = " bold "> </ tspan >< tspan class = " fg-cyan bold "> [OPTIONS]</ tspan >< tspan class = " bold "> </ tspan >< tspan class = " fg-cyan bold "> --path</ tspan >< tspan class = " bold "> </ tspan >< tspan class = " fg-cyan bold "> < PATH> ...</ tspan > 29</ tspan > 30< tspan x = " 10px " y = " 100px ">< tspan class = " bold "> </ tspan >< tspan class = " fg-cyan bold "> cargo add</ tspan >< tspan class = " bold "> </ tspan >< tspan class = " fg-cyan bold "> [OPTIONS]</ tspan >< tspan class = " bold "> </ tspan >< tspan class = " fg-cyan bold "> --git</ tspan >< tspan class = " bold "> </ tspan >< tspan class = " fg-cyan bold "> < URL> ...</ tspan > 31</ tspan > 32< tspan x = " 10px " y = " 118px "> 33</ tspan > 34< tspan x = " 10px " y = " 136px ">< tspan class = " fg-green bold "> Arguments:</ tspan > 35</ tspan > 36< tspan x = " 10px " y = " 154px ">< tspan > </ tspan >< tspan class = " fg-cyan "> [DEP_ID]...</ tspan > 37</ tspan > 38< tspan x = " 10px " y = " 172px ">< tspan > Reference to a package to add as a dependency</ tspan > 39</ tspan > 40< tspan x = " 10px " y = " 190px ">< tspan > </ tspan > 41</ tspan > 42< tspan x = " 10px " y = " 208px ">< tspan > You can reference a package by:</ tspan > 43</ tspan > 44< tspan x = " 10px " y = " 226px ">< tspan > - `< name> `, like `cargo add serde` (latest version will be used)</ tspan > 45</ tspan > 46< tspan x = " 10px " y = " 244px ">< tspan > - `< name> @< version-req> `, like `cargo add serde@1` or `cargo add serde@=1.0.38`</ tspan > 47</ tspan > 48< tspan x = " 10px " y = " 262px "> 49</ tspan > 50< tspan x = " 10px " y = " 280px ">< tspan class = " fg-green bold "> Options:</ tspan > 51</ tspan > 52< tspan x = " 10px " y = " 298px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --no-default-features</ tspan > 53</ tspan > 54< tspan x = " 10px " y = " 316px ">< tspan > Disable the default features</ tspan > 55</ tspan > 56< tspan x = " 10px " y = " 334px "> 57</ tspan > 58< tspan x = " 10px " y = " 352px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --default-features</ tspan > 59</ tspan > 60< tspan x = " 10px " y = " 370px ">< tspan > Re-enable the default features</ tspan > 61</ tspan > 62< tspan x = " 10px " y = " 388px "> 63</ tspan > 64< tspan x = " 10px " y = " 406px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> -F</ tspan >< tspan > ,</ tspan >< tspan class = " fg-cyan bold "> --features</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < FEATURES> </ tspan > 65</ tspan > 66< tspan x = " 10px " y = " 424px ">< tspan > Space or comma separated list of features to activate</ tspan > 67</ tspan > 68< tspan x = " 10px " y = " 442px "> 69</ tspan > 70< tspan x = " 10px " y = " 460px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --optional</ tspan > 71</ tspan > 72< tspan x = " 10px " y = " 478px ">< tspan > Mark the dependency as optional</ tspan > 73</ tspan > 74< tspan x = " 10px " y = " 496px ">< tspan > </ tspan > 75</ tspan > 76< tspan x = " 10px " y = " 514px ">< tspan > The package name will be exposed as feature of your crate.</ tspan > 77</ tspan > 78< tspan x = " 10px " y = " 532px "> 79</ tspan > 80< tspan x = " 10px " y = " 550px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --no-optional</ tspan > 81</ tspan > 82< tspan x = " 10px " y = " 568px ">< tspan > Mark the dependency as required</ tspan > 83</ tspan > 84< tspan x = " 10px " y = " 586px ">< tspan > </ tspan > 85</ tspan > 86< tspan x = " 10px " y = " 604px ">< tspan > The package will be removed from your features.</ tspan > 87</ tspan > 88< tspan x = " 10px " y = " 622px "> 89</ tspan > 90< tspan x = " 10px " y = " 640px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --public</ tspan > 91</ tspan > 92< tspan x = " 10px " y = " 658px ">< tspan > Mark the dependency as public (unstable)</ tspan > 93</ tspan > 94< tspan x = " 10px " y = " 676px ">< tspan > </ tspan > 95</ tspan > 96< tspan x = " 10px " y = " 694px ">< tspan > The dependency can be referenced in your library's public API.</ tspan > 97</ tspan > 98< tspan x = " 10px " y = " 712px "> 99</ tspan > 100< tspan x = " 10px " y = " 730px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --no-public</ tspan > 101</ tspan > 102< tspan x = " 10px " y = " 748px ">< tspan > Mark the dependency as private (unstable)</ tspan > 103</ tspan > 104< tspan x = " 10px " y = " 766px ">< tspan > </ tspan > 105</ tspan > 106< tspan x = " 10px " y = " 784px ">< tspan > While you can use the crate in your implementation, it cannot be referenced in your public</ tspan > 107</ tspan > 108< tspan x = " 10px " y = " 802px ">< tspan > API.</ tspan > 109</ tspan > 110< tspan x = " 10px " y = " 820px "> 111</ tspan > 112< tspan x = " 10px " y = " 838px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --rename</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < NAME> </ tspan > 113</ tspan > 114< tspan x = " 10px " y = " 856px ">< tspan > Rename the dependency</ tspan > 115</ tspan > 116< tspan x = " 10px " y = " 874px ">< tspan > </ tspan > 117</ tspan > 118< tspan x = " 10px " y = " 892px ">< tspan > Example uses:</ tspan > 119</ tspan > 120< tspan x = " 10px " y = " 910px ">< tspan > - Depending on multiple versions of a crate</ tspan > 121</ tspan > 122< tspan x = " 10px " y = " 928px ">< tspan > - Depend on crates with the same name from different registries</ tspan > 123</ tspan > 124< tspan x = " 10px " y = " 946px "> 125</ tspan > 126< tspan x = " 10px " y = " 964px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> -n</ tspan >< tspan > ,</ tspan >< tspan class = " fg-cyan bold "> --dry-run</ tspan > 127</ tspan > 128< tspan x = " 10px " y = " 982px ">< tspan > Don't actually write the manifest</ tspan > 129</ tspan > 130< tspan x = " 10px " y = " 1000px "> 131</ tspan > 132< tspan x = " 10px " y = " 1018px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> -v</ tspan >< tspan > ,</ tspan >< tspan class = " fg-cyan bold "> --verbose</ tspan >< tspan class = " fg-cyan "> ...</ tspan > 133</ tspan > 134< tspan x = " 10px " y = " 1036px ">< tspan > Use verbose output (-vv very verbose/build.rs output)</ tspan > 135</ tspan > 136< tspan x = " 10px " y = " 1054px "> 137</ tspan > 138< tspan x = " 10px " y = " 1072px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> -q</ tspan >< tspan > ,</ tspan >< tspan class = " fg-cyan bold "> --quiet</ tspan > 139</ tspan > 140< tspan x = " 10px " y = " 1090px ">< tspan > Do not print cargo log messages</ tspan > 141</ tspan > 142< tspan x = " 10px " y = " 1108px "> 143</ tspan > 144< tspan x = " 10px " y = " 1126px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --color</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < WHEN> </ tspan > 145</ tspan > 146< tspan x = " 10px " y = " 1144px ">< tspan > Coloring</ tspan > 147</ tspan > 148< tspan x = " 10px " y = " 1162px ">< tspan > </ tspan > 149</ tspan > 150< tspan x = " 10px " y = " 1180px ">< tspan > [possible values: auto, always, never]</ tspan > 151</ tspan > 152< tspan x = " 10px " y = " 1198px "> 153</ tspan > 154< tspan x = " 10px " y = " 1216px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --config</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < KEY=VALUE|PATH> </ tspan > 155</ tspan > 156< tspan x = " 10px " y = " 1234px ">< tspan > Override a configuration value</ tspan > 157</ tspan > 158< tspan x = " 10px " y = " 1252px "> 159</ tspan > 160< tspan x = " 10px " y = " 1270px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> -Z</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < FLAG> </ tspan > 161</ tspan > 162< tspan x = " 10px " y = " 1288px ">< tspan > Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details</ tspan > 163</ tspan > 164< tspan x = " 10px " y = " 1306px "> 165</ tspan > 166< tspan x = " 10px " y = " 1324px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> -h</ tspan >< tspan > ,</ tspan >< tspan class = " fg-cyan bold "> --help</ tspan > 167</ tspan > 168< tspan x = " 10px " y = " 1342px ">< tspan > Print help (see a summary with '-h')</ tspan > 169</ tspan > 170< tspan x = " 10px " y = " 1360px "> 171</ tspan > 172< tspan x = " 10px " y = " 1378px ">< tspan class = " fg-green bold "> Manifest Options:</ tspan > 173</ tspan > 174< tspan x = " 10px " y = " 1396px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --manifest-path</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < PATH> </ tspan > 175</ tspan > 176< tspan x = " 10px " y = " 1414px ">< tspan > Path to Cargo.toml</ tspan > 177</ tspan > 178< tspan x = " 10px " y = " 1432px "> 179</ tspan > 180< tspan x = " 10px " y = " 1450px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --lockfile-path</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < PATH> </ tspan > 181</ tspan > 182< tspan x = " 10px " y = " 1468px ">< tspan > Path to Cargo.lock (unstable)</ tspan > 183</ tspan > 184< tspan x = " 10px " y = " 1486px "> 185</ tspan > 186< tspan x = " 10px " y = " 1504px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --ignore-rust-version</ tspan > 187</ tspan > 188< tspan x = " 10px " y = " 1522px ">< tspan > Ignore `rust-version` specification in packages</ tspan > 189</ tspan > 190< tspan x = " 10px " y = " 1540px "> 191</ tspan > 192< tspan x = " 10px " y = " 1558px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --locked</ tspan > 193</ tspan > 194< tspan x = " 10px " y = " 1576px ">< tspan > Assert that `Cargo.lock` will remain unchanged</ tspan > 195</ tspan > 196< tspan x = " 10px " y = " 1594px "> 197</ tspan > 198< tspan x = " 10px " y = " 1612px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --offline</ tspan > 199</ tspan > 200< tspan x = " 10px " y = " 1630px ">< tspan > Run without accessing the network</ tspan > 201</ tspan > 202< tspan x = " 10px " y = " 1648px "> 203</ tspan > 204< tspan x = " 10px " y = " 1666px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --frozen</ tspan > 205</ tspan > 206< tspan x = " 10px " y = " 1684px ">< tspan > Equivalent to specifying both --locked and --offline</ tspan > 207</ tspan > 208< tspan x = " 10px " y = " 1702px "> 209</ tspan > 210< tspan x = " 10px " y = " 1720px ">< tspan class = " fg-green bold "> Package Selection:</ tspan > 211</ tspan > 212< tspan x = " 10px " y = " 1738px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> -p</ tspan >< tspan > ,</ tspan >< tspan class = " fg-cyan bold "> --package</ tspan >< tspan class = " fg-cyan "> [</ tspan >< tspan class = " fg-cyan "> < SPEC> </ tspan >< tspan class = " fg-cyan "> ]</ tspan > 213</ tspan > 214< tspan x = " 10px " y = " 1756px ">< tspan > Package to modify</ tspan > 215</ tspan > 216< tspan x = " 10px " y = " 1774px "> 217</ tspan > 218< tspan x = " 10px " y = " 1792px ">< tspan class = " fg-green bold "> Source:</ tspan > 219</ tspan > 220< tspan x = " 10px " y = " 1810px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --path</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < PATH> </ tspan > 221</ tspan > 222< tspan x = " 10px " y = " 1828px ">< tspan > Filesystem path to local crate to add</ tspan > 223</ tspan > 224< tspan x = " 10px " y = " 1846px "> 225</ tspan > 226< tspan x = " 10px " y = " 1864px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --base</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < BASE> </ tspan > 227</ tspan > 228< tspan x = " 10px " y = " 1882px ">< tspan > The path base to use when adding from a local crate (unstable).</ tspan > 229</ tspan > 230< tspan x = " 10px " y = " 1900px "> 231</ tspan > 232< tspan x = " 10px " y = " 1918px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --git</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < URI> </ tspan > 233</ tspan > 234< tspan x = " 10px " y = " 1936px ">< tspan > Git repository location</ tspan > 235</ tspan > 236< tspan x = " 10px " y = " 1954px ">< tspan > </ tspan > 237</ tspan > 238< tspan x = " 10px " y = " 1972px ">< tspan > Without any other information, cargo will use latest commit on the main branch.</ tspan > 239</ tspan > 240< tspan x = " 10px " y = " 1990px "> 241</ tspan > 242< tspan x = " 10px " y = " 2008px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --branch</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < BRANCH> </ tspan > 243</ tspan > 244< tspan x = " 10px " y = " 2026px ">< tspan > Git branch to download the crate from</ tspan > 245</ tspan > 246< tspan x = " 10px " y = " 2044px "> 247</ tspan > 248< tspan x = " 10px " y = " 2062px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --tag</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < TAG> </ tspan > 249</ tspan > 250< tspan x = " 10px " y = " 2080px ">< tspan > Git tag to download the crate from</ tspan > 251</ tspan > 252< tspan x = " 10px " y = " 2098px "> 253</ tspan > 254< tspan x = " 10px " y = " 2116px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --rev</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < REV> </ tspan > 255</ tspan > 256< tspan x = " 10px " y = " 2134px ">< tspan > Git reference to download the crate from</ tspan > 257</ tspan > 258< tspan x = " 10px " y = " 2152px ">< tspan > </ tspan > 259</ tspan > 260< tspan x = " 10px " y = " 2170px ">< tspan > This is the catch all, handling hashes to named references in remote repositories.</ tspan > 261</ tspan > 262< tspan x = " 10px " y = " 2188px "> 263</ tspan > 264< tspan x = " 10px " y = " 2206px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --registry</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < NAME> </ tspan > 265</ tspan > 266< tspan x = " 10px " y = " 2224px ">< tspan > Package registry for this dependency</ tspan > 267</ tspan > 268< tspan x = " 10px " y = " 2242px "> 269</ tspan > 270< tspan x = " 10px " y = " 2260px ">< tspan class = " fg-green bold "> Section:</ tspan > 271</ tspan > 272< tspan x = " 10px " y = " 2278px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --dev</ tspan > 273</ tspan > 274< tspan x = " 10px " y = " 2296px ">< tspan > Add as development dependency</ tspan > 275</ tspan > 276< tspan x = " 10px " y = " 2314px ">< tspan > </ tspan > 277</ tspan > 278< tspan x = " 10px " y = " 2332px ">< tspan > Dev-dependencies are not used when compiling a package for building, but are used for</ tspan > 279</ tspan > 280< tspan x = " 10px " y = " 2350px ">< tspan > compiling tests, examples, and benchmarks.</ tspan > 281</ tspan > 282< tspan x = " 10px " y = " 2368px ">< tspan > </ tspan > 283</ tspan > 284< tspan x = " 10px " y = " 2386px ">< tspan > These dependencies are not propagated to other packages which depend on this package.</ tspan > 285</ tspan > 286< tspan x = " 10px " y = " 2404px "> 287</ tspan > 288< tspan x = " 10px " y = " 2422px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --build</ tspan > 289</ tspan > 290< tspan x = " 10px " y = " 2440px ">< tspan > Add as build dependency</ tspan > 291</ tspan > 292< tspan x = " 10px " y = " 2458px ">< tspan > </ tspan > 293</ tspan > 294< tspan x = " 10px " y = " 2476px ">< tspan > Build-dependencies are the only dependencies available for use by build scripts</ tspan > 295</ tspan > 296< tspan x = " 10px " y = " 2494px ">< tspan > (`build.rs` files).</ tspan > 297</ tspan > 298< tspan x = " 10px " y = " 2512px "> 299</ tspan > 300< tspan x = " 10px " y = " 2530px ">< tspan > </ tspan >< tspan class = " fg-cyan bold "> --target</ tspan >< tspan class = " fg-cyan "> </ tspan >< tspan class = " fg-cyan "> < TARGET> </ tspan > 301</ tspan > 302< tspan x = " 10px " y = " 2548px ">< tspan > Add as dependency to the given target platform</ tspan > 303</ tspan > 304< tspan x = " 10px " y = " 2566px "> 305</ tspan > 306< tspan x = " 10px " y = " 2584px ">< tspan > Run `</ tspan >< tspan class = " fg-cyan bold "> cargo help add</ tspan >< tspan class = " bold "> ` for more detailed information.</ tspan > 307</ tspan > 308< tspan x = " 10px " y = " 2602px "> 309</ tspan > 310</ text > 311 312</ svg >