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