{"owner":"rust-lang","repo":"cargo","hasSkills":true,"totalSkillsCount":48,"totalTokensCount":135460,"categories":["command-prompt"],"hasMcp":false,"mcpConfig":null,"found":["doc/book/src/commands/build-commands.md","doc/book/src/commands/cargo-add.md","doc/book/src/commands/cargo-bench.md","doc/book/src/commands/cargo-build.md","doc/book/src/commands/cargo-check.md","doc/book/src/commands/cargo-clean.md","doc/book/src/commands/cargo-clippy.md","doc/book/src/commands/cargo-doc.md","doc/book/src/commands/cargo-fetch.md","doc/book/src/commands/cargo-fix.md","doc/book/src/commands/cargo-fmt.md","doc/book/src/commands/cargo-generate-lockfile.md","doc/book/src/commands/cargo-help.md","doc/book/src/commands/cargo-info.md","doc/book/src/commands/cargo-init.md","doc/book/src/commands/cargo-install.md","doc/book/src/commands/cargo-locate-project.md","doc/book/src/commands/cargo-login.md","doc/book/src/commands/cargo-logout.md","doc/book/src/commands/cargo-metadata.md","doc/book/src/commands/cargo-miri.md","doc/book/src/commands/cargo-new.md","doc/book/src/commands/cargo-owner.md","doc/book/src/commands/cargo-package.md","doc/book/src/commands/cargo-pkgid.md","doc/book/src/commands/cargo-publish.md","doc/book/src/commands/cargo-remove.md","doc/book/src/commands/cargo-report-future-incompatibilities.md","doc/book/src/commands/cargo-report.md","doc/book/src/commands/cargo-run.md","doc/book/src/commands/cargo-rustc.md","doc/book/src/commands/cargo-rustdoc.md","doc/book/src/commands/cargo-search.md","doc/book/src/commands/cargo-test.md","doc/book/src/commands/cargo-tree.md","doc/book/src/commands/cargo-uninstall.md","doc/book/src/commands/cargo-update.md","doc/book/src/commands/cargo-vendor.md","doc/book/src/commands/cargo-version.md","doc/book/src/commands/cargo-yank.md","doc/book/src/commands/cargo.md","doc/book/src/commands/deprecated-and-removed.md","doc/book/src/commands/general-commands.md","doc/book/src/commands/index.md","doc/book/src/commands/manifest-commands.md","doc/book/src/commands/package-commands.md","doc/book/src/commands/publishing-commands.md","doc/book/src/commands/report-commands.md"],"skills":{"doc/book/src/commands/build-commands.md":"# Build Commands\n* [cargo bench](cargo-bench.md)\n* [cargo build](cargo-build.md)\n* [cargo check](cargo-check.md)\n* [cargo clean](cargo-clean.md)\n* [cargo clippy](cargo-clippy.md)\n* [cargo doc](cargo-doc.md)\n* [cargo fetch](cargo-fetch.md)\n* [cargo fix](cargo-fix.md)\n* [cargo fmt](cargo-fmt.md)\n* [cargo miri](cargo-miri.md)\n* [cargo run](cargo-run.md)\n* [cargo rustc](cargo-rustc.md)\n* [cargo rustdoc](cargo-rustdoc.md)\n* [cargo test](cargo-test.md)\n","doc/book/src/commands/cargo-add.md":"# cargo-add(1)\n## NAME\n\ncargo-add --- Add dependencies to a Cargo.toml manifest file\n\n## SYNOPSIS\n\n`cargo add` [_options_] _crate_...\\\n`cargo add` [_options_] `--path` _path_\\\n`cargo add` [_options_] `--git` _url_ [_crate_...]\n\n\n## DESCRIPTION\n\nThis command can add or modify dependencies.\n\nThe source for the dependency can be specified with:\n\n* _crate_`@`_version_: Fetch from a registry with a version constraint of \"_version_\"\n* `--path` _path_: Fetch from the specified _path_\n* `--git` _url_: Pull from a git repo at _url_\n\nIf no source is specified, then a best effort will be made to select one, including:\n\n* Existing dependencies in other tables (like `dev-dependencies`)\n* Workspace members\n* Latest release in the registry\n\nWhen you add a package that is already present, the existing entry will be updated with the flags specified.\n\nUpon successful invocation, the enabled (`+`) and disabled (`-`) [features] of the specified\ndependency will be listed in the command's output.\n\n[features]: ../reference/features.html\n\n## OPTIONS\n\n### Source options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---git\"><a class=\"option-anchor\" href=\"#option-cargo-add---git\"><code>--git</code> <em>url</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories\">Git URL to add the specified crate from</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---branch\"><a class=\"option-anchor\" href=\"#option-cargo-add---branch\"><code>--branch</code> <em>branch</em></a></dt>\n<dd class=\"option-desc\"><p>Branch to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---tag\"><a class=\"option-anchor\" href=\"#option-cargo-add---tag\"><code>--tag</code> <em>tag</em></a></dt>\n<dd class=\"option-desc\"><p>Tag to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---rev\"><a class=\"option-anchor\" href=\"#option-cargo-add---rev\"><code>--rev</code> <em>sha</em></a></dt>\n<dd class=\"option-desc\"><p>Specific commit to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---path\"><a class=\"option-anchor\" href=\"#option-cargo-add---path\"><code>--path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#specifying-path-dependencies\">Filesystem path</a> to local crate to add.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---base\"><a class=\"option-anchor\" href=\"#option-cargo-add---base\"><code>--base</code> <em>base</em></a></dt>\n<dd class=\"option-desc\"><p>The <a href=\"../reference/unstable.html#path-bases\">path base</a> to use when adding a local crate.</p>\n<p><a href=\"../reference/unstable.html#path-bases\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---registry\"><a class=\"option-anchor\" href=\"#option-cargo-add---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Section options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---dev\"><a class=\"option-anchor\" href=\"#option-cargo-add---dev\"><code>--dev</code></a></dt>\n<dd class=\"option-desc\"><p>Add as a <a href=\"../reference/specifying-dependencies.html#development-dependencies\">development dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---build\"><a class=\"option-anchor\" href=\"#option-cargo-add---build\"><code>--build</code></a></dt>\n<dd class=\"option-desc\"><p>Add as a <a href=\"../reference/specifying-dependencies.html#build-dependencies\">build dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---target\"><a class=\"option-anchor\" href=\"#option-cargo-add---target\"><code>--target</code> <em>target</em></a></dt>\n<dd class=\"option-desc\"><p>Add as a dependency to the <a href=\"../reference/specifying-dependencies.html#platform-specific-dependencies\">given target platform</a>.</p>\n<p>To avoid unexpected shell expansions, you may use quotes around each target, e.g., <code>--target 'cfg(unix)'</code>.</p>\n</dd>\n\n\n</dl>\n\n### Dependency options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-add---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t actually write the manifest</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---rename\"><a class=\"option-anchor\" href=\"#option-cargo-add---rename\"><code>--rename</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml\">Rename</a> the dependency.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---optional\"><a class=\"option-anchor\" href=\"#option-cargo-add---optional\"><code>--optional</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as <a href=\"../reference/features.html#optional-dependencies\">optional</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-optional\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-optional\"><code>--no-optional</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as <a href=\"../reference/features.html#optional-dependencies\">required</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---public\"><a class=\"option-anchor\" href=\"#option-cargo-add---public\"><code>--public</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as public.</p>\n<p>The dependency can be referenced in your library’s public API.</p>\n<p><a href=\"../reference/unstable.html#public-dependency\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-public\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-public\"><code>--no-public</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as private.</p>\n<p>While you can use the crate in your implementation, it cannot be referenced in your public API.</p>\n<p><a href=\"../reference/unstable.html#public-dependency\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Disable the <a href=\"../reference/features.html#dependency-features\">default features</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---default-features\"><a class=\"option-anchor\" href=\"#option-cargo-add---default-features\"><code>--default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Re-enable the <a href=\"../reference/features.html#dependency-features\">default features</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--F\"><a class=\"option-anchor\" href=\"#option-cargo-add--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---features\"><a class=\"option-anchor\" href=\"#option-cargo-add---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of <a href=\"../reference/features.html#dependency-features\">features to\nactivate</a>. When adding multiple\ncrates, the features for a specific crate may be enabled with\n<code>package-name/feature-name</code> syntax. This flag may be specified multiple times,\nwhich enables all specified features.</p>\n</dd>\n\n\n</dl>\n\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-add--v\"><a class=\"option-anchor\" href=\"#option-cargo-add--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-add---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--q\"><a class=\"option-anchor\" href=\"#option-cargo-add--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-add---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---color\"><a class=\"option-anchor\" href=\"#option-cargo-add---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-add---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-add---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--p\"><a class=\"option-anchor\" href=\"#option-cargo-add--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---package\"><a class=\"option-anchor\" href=\"#option-cargo-add---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Add dependencies to only the specified package.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-add---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---locked\"><a class=\"option-anchor\" href=\"#option-cargo-add---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---offline\"><a class=\"option-anchor\" href=\"#option-cargo-add---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-add---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-add-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---config\"><a class=\"option-anchor\" href=\"#option-cargo-add---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--C\"><a class=\"option-anchor\" href=\"#option-cargo-add--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--h\"><a class=\"option-anchor\" href=\"#option-cargo-add--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---help\"><a class=\"option-anchor\" href=\"#option-cargo-add---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--Z\"><a class=\"option-anchor\" href=\"#option-cargo-add--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Add `regex` as a dependency\n\n       cargo add regex\n\n2. Add `trybuild` as a dev-dependency\n\n       cargo add --dev trybuild\n\n3. Add an older version of `nom` as a dependency\n\n       cargo add nom@5\n\n4. Add support for serializing data structures to json with `derive`s\n\n       cargo add serde serde_json -F serde/derive\n\n5. Add `windows` as a platform specific dependency on `cfg(windows)`\n\n       cargo add windows --target 'cfg(windows)'\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-remove(1)](cargo-remove.html)\n","doc/book/src/commands/cargo-bench.md":"# cargo-bench(1)\n## NAME\n\ncargo-bench --- Execute benchmarks of a package\n\n## SYNOPSIS\n\n`cargo bench` [_options_] [_benchname_] [`--` _bench-options_]\n\n## DESCRIPTION\n\nCompile and execute benchmarks.\n\nThe benchmark filtering argument _benchname_ and all the arguments following\nthe two dashes (`--`) are passed to the benchmark binaries and thus to\n_libtest_ (rustc's built in unit-test and micro-benchmarking framework). If\nyou are passing arguments to both Cargo and the binary, the ones after `--` go\nto the binary, the ones before go to Cargo. For details about libtest's\narguments see the output of `cargo bench -- --help` and check out the rustc\nbook's chapter on how tests work at\n<https://doc.rust-lang.org/rustc/tests/index.html>.\n\nAs an example, this will run only the benchmark named `foo` (and skip other\nsimilarly named benchmarks like `foobar`):\n\n    cargo bench -- foo --exact\n\nBenchmarks are built with the `--test` option to `rustc` which creates a\nspecial executable by linking your code with libtest. The executable\nautomatically runs all functions annotated with the `#[bench]` attribute.\nCargo passes the `--bench` flag to the test harness to tell it to run\nonly benchmarks, regardless of whether the harness is libtest or a custom harness.\n\nThe libtest harness may be disabled by setting `harness = false` in the target\nmanifest settings, in which case your code will need to provide its own `main`\nfunction to handle running benchmarks.\n\n> **Note**: The\n> [`#[bench]` attribute](https://doc.rust-lang.org/nightly/unstable-book/library-features/test.html)\n> is currently unstable and only available on the\n> [nightly channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html).\n> There are some packages available on\n> [crates.io](https://crates.io/keywords/benchmark) that may help with\n> running benchmarks on the stable channel, such as\n> [Criterion](https://crates.io/crates/criterion).\n\nBy default, `cargo bench` uses the [`bench` profile], which enables\noptimizations and disables debugging information. If you need to debug a\nbenchmark, you can use the `--profile=debug` command-line option to switch to\nthe debug profile. You can then run the debug-enabled benchmark within a\ndebugger.\n\n[`bench` profile]: ../reference/profiles.html#bench\n\n### Working directory of benchmarks\n\nThe working directory of every benchmark is set to the root directory of the \npackage the benchmark belongs to.\nSetting the working directory of benchmarks to the package's root directory \nmakes it possible for benchmarks to reliably access the package's files using \nrelative paths, regardless from where `cargo bench` was executed from.\n\n## OPTIONS\n\n### Benchmark Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-run\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-run\"><code>--no-run</code></a></dt>\n<dd class=\"option-desc\"><p>Compile, but don’t run benchmarks.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-fail-fast\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-fail-fast\"><code>--no-fail-fast</code></a></dt>\n<dd class=\"option-desc\"><p>Run all benchmarks regardless of failure. Without this flag, Cargo will exit\nafter the first executable fails. The Rust test harness will run all benchmarks\nwithin the executable to completion, this flag only applies to the executable\nas a whole.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--p\"><a class=\"option-anchor\" href=\"#option-cargo-bench--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---package\"><a class=\"option-anchor\" href=\"#option-cargo-bench---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-bench---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-bench---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo bench` will build the\nfollowing targets of the selected packages:\n\n- lib --- used to link with binaries and benchmarks\n- bins (only if benchmark targets are built and required features are\n  available)\n- lib as a benchmark\n- bins as benchmarks\n- benchmark targets\n\nThe default behavior can be changed by setting the `bench` flag for the target\nin the manifest settings. Setting examples to `bench = true` will build and\nrun the example as a benchmark, replacing the example's `main` function with\nthe libtest harness.\n\nSetting targets to `bench = false` will stop them from being benchmarked by\ndefault. Target selection options that take a target by name (such as\n`--example foo`) ignore the `bench` flag and will always benchmark the given\ntarget.\n\nSee [Configuring a target](../reference/cargo-targets.html#configuring-a-target)\nfor more information on per-target settings.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to benchmark. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will benchmark only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---lib\"><a class=\"option-anchor\" href=\"#option-cargo-bench---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bin\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bins\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---example\"><a class=\"option-anchor\" href=\"#option-cargo-bench---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---examples\"><a class=\"option-anchor\" href=\"#option-cargo-bench---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---test\"><a class=\"option-anchor\" href=\"#option-cargo-bench---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---tests\"><a class=\"option-anchor\" href=\"#option-cargo-bench---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bench\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---benches\"><a class=\"option-anchor\" href=\"#option-cargo-bench---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--F\"><a class=\"option-anchor\" href=\"#option-cargo-bench--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---target\"><a class=\"option-anchor\" href=\"#option-cargo-bench---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Benchmark for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---profile\"><a class=\"option-anchor\" href=\"#option-cargo-bench---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Benchmark with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---timings\"><a class=\"option-anchor\" href=\"#option-cargo-bench---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-bench---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\nBy default the Rust test harness hides output from benchmark execution to keep\nresults readable. Benchmark output can be recovered (e.g., for debugging) by\npassing `--no-capture` to the benchmark binaries:\n\n    cargo bench -- --no-capture\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--v\"><a class=\"option-anchor\" href=\"#option-cargo-bench--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-bench---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--q\"><a class=\"option-anchor\" href=\"#option-cargo-bench--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-bench---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---color\"><a class=\"option-anchor\" href=\"#option-cargo-bench---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-bench---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-bench---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-bench---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---locked\"><a class=\"option-anchor\" href=\"#option-cargo-bench---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---offline\"><a class=\"option-anchor\" href=\"#option-cargo-bench---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-bench---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-bench-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---config\"><a class=\"option-anchor\" href=\"#option-cargo-bench---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--C\"><a class=\"option-anchor\" href=\"#option-cargo-bench--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--h\"><a class=\"option-anchor\" href=\"#option-cargo-bench--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---help\"><a class=\"option-anchor\" href=\"#option-cargo-bench---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--Z\"><a class=\"option-anchor\" href=\"#option-cargo-bench--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\nThe `--jobs` argument affects the building of the benchmark executable but\ndoes not affect how many threads are used when running the benchmarks. The\nRust test harness runs benchmarks serially in a single thread.\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench--j\"><a class=\"option-anchor\" href=\"#option-cargo-bench--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-bench---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n</dl>\n\nWhile `cargo bench` involves compilation, it does not provide a `--keep-going`\nflag. Use `--no-fail-fast` to run as many benchmarks as possible without\nstopping at the first failure. To \"compile\" as many benchmarks as possible, use\n`--benches` to build benchmark binaries separately. For example:\n\n    cargo build --benches --release --keep-going\n    cargo bench --no-fail-fast\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build and execute all the benchmarks of the current package:\n\n       cargo bench\n\n2. Run only a specific benchmark within a specific benchmark target:\n\n       cargo bench --bench bench_name -- modname::some_benchmark\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-test(1)](cargo-test.html)\n","doc/book/src/commands/cargo-build.md":"# cargo-build(1)\n## NAME\n\ncargo-build --- Compile the current package\n\n## SYNOPSIS\n\n`cargo build` [_options_]\n\n## DESCRIPTION\n\nCompile local packages and all of their dependencies.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build--p\"><a class=\"option-anchor\" href=\"#option-cargo-build--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---package\"><a class=\"option-anchor\" href=\"#option-cargo-build---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-build---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Build all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all\"><a class=\"option-anchor\" href=\"#option-cargo-build---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-build---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo build` will build all\nbinary and library targets of the selected packages. Binaries are skipped if\nthey have `required-features` that are missing.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to build. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will build only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build---lib\"><a class=\"option-anchor\" href=\"#option-cargo-build---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Build the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bin\"><a class=\"option-anchor\" href=\"#option-cargo-build---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bins\"><a class=\"option-anchor\" href=\"#option-cargo-build---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Build all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---example\"><a class=\"option-anchor\" href=\"#option-cargo-build---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---examples\"><a class=\"option-anchor\" href=\"#option-cargo-build---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Build all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---test\"><a class=\"option-anchor\" href=\"#option-cargo-build---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---tests\"><a class=\"option-anchor\" href=\"#option-cargo-build---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bench\"><a class=\"option-anchor\" href=\"#option-cargo-build---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---benches\"><a class=\"option-anchor\" href=\"#option-cargo-build---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-build---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build--F\"><a class=\"option-anchor\" href=\"#option-cargo-build--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---features\"><a class=\"option-anchor\" href=\"#option-cargo-build---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-build---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-build---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build---target\"><a class=\"option-anchor\" href=\"#option-cargo-build---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--r\"><a class=\"option-anchor\" href=\"#option-cargo-build--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---release\"><a class=\"option-anchor\" href=\"#option-cargo-build---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Build optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---profile\"><a class=\"option-anchor\" href=\"#option-cargo-build---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Build with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---timings\"><a class=\"option-anchor\" href=\"#option-cargo-build---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-build---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---artifact-dir\"><a class=\"option-anchor\" href=\"#option-cargo-build---artifact-dir\"><code>--artifact-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Copy final artifacts to this directory.</p>\n<p>This option is unstable and available only on the\n<a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.\nSee <a href=\"https://github.com/rust-lang/cargo/issues/6790\">https://github.com/rust-lang/cargo/issues/6790</a> for more information.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build--v\"><a class=\"option-anchor\" href=\"#option-cargo-build--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-build---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--q\"><a class=\"option-anchor\" href=\"#option-cargo-build--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-build---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---color\"><a class=\"option-anchor\" href=\"#option-cargo-build---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-build---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-build---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-build---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---locked\"><a class=\"option-anchor\" href=\"#option-cargo-build---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---offline\"><a class=\"option-anchor\" href=\"#option-cargo-build---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-build---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-build-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---config\"><a class=\"option-anchor\" href=\"#option-cargo-build---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--C\"><a class=\"option-anchor\" href=\"#option-cargo-build--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--h\"><a class=\"option-anchor\" href=\"#option-cargo-build--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---help\"><a class=\"option-anchor\" href=\"#option-cargo-build---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--Z\"><a class=\"option-anchor\" href=\"#option-cargo-build--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build--j\"><a class=\"option-anchor\" href=\"#option-cargo-build--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-build---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-build---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-build---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo build -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo build -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-build---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-build---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package and all of its dependencies:\n\n       cargo build\n\n2. Build with optimizations:\n\n       cargo build --release\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-rustc(1)](cargo-rustc.html)\n","doc/book/src/commands/cargo-check.md":"# cargo-check(1)\n## NAME\n\ncargo-check --- Check the current package\n\n## SYNOPSIS\n\n`cargo check` [_options_]\n\n## DESCRIPTION\n\nCheck a local package and all of its dependencies for errors. This will\nessentially compile the packages without performing the final step of code\ngeneration, which is faster than running `cargo build`. The compiler will save\nmetadata files to disk so that future runs will reuse them if the source has\nnot been modified. Some diagnostics and errors are only emitted during code\ngeneration, so they inherently won't be reported with `cargo check`.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check--p\"><a class=\"option-anchor\" href=\"#option-cargo-check--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---package\"><a class=\"option-anchor\" href=\"#option-cargo-check---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-check---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Check all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all\"><a class=\"option-anchor\" href=\"#option-cargo-check---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-check---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo check` will check all\nbinary and library targets of the selected packages. Binaries are skipped if\nthey have `required-features` that are missing.\n\nPassing target selection flags will check only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check---lib\"><a class=\"option-anchor\" href=\"#option-cargo-check---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Check the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bin\"><a class=\"option-anchor\" href=\"#option-cargo-check---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bins\"><a class=\"option-anchor\" href=\"#option-cargo-check---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Check all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---example\"><a class=\"option-anchor\" href=\"#option-cargo-check---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---examples\"><a class=\"option-anchor\" href=\"#option-cargo-check---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Check all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---test\"><a class=\"option-anchor\" href=\"#option-cargo-check---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---tests\"><a class=\"option-anchor\" href=\"#option-cargo-check---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bench\"><a class=\"option-anchor\" href=\"#option-cargo-check---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---benches\"><a class=\"option-anchor\" href=\"#option-cargo-check---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-check---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check--F\"><a class=\"option-anchor\" href=\"#option-cargo-check--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---features\"><a class=\"option-anchor\" href=\"#option-cargo-check---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-check---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-check---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check---target\"><a class=\"option-anchor\" href=\"#option-cargo-check---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Check for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--r\"><a class=\"option-anchor\" href=\"#option-cargo-check--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---release\"><a class=\"option-anchor\" href=\"#option-cargo-check---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Check optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---profile\"><a class=\"option-anchor\" href=\"#option-cargo-check---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Check with the given profile.</p>\n<p>As a special case, specifying the <code>test</code> profile will also enable checking in\ntest mode which will enable checking tests and enable the <code>test</code> cfg option.\nSee <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc tests</a> for more\ndetail.</p>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---timings\"><a class=\"option-anchor\" href=\"#option-cargo-check---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-check---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check--v\"><a class=\"option-anchor\" href=\"#option-cargo-check--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-check---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--q\"><a class=\"option-anchor\" href=\"#option-cargo-check--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-check---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---color\"><a class=\"option-anchor\" href=\"#option-cargo-check---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-check---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-check---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-check---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---locked\"><a class=\"option-anchor\" href=\"#option-cargo-check---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---offline\"><a class=\"option-anchor\" href=\"#option-cargo-check---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-check---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-check-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---config\"><a class=\"option-anchor\" href=\"#option-cargo-check---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--C\"><a class=\"option-anchor\" href=\"#option-cargo-check--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--h\"><a class=\"option-anchor\" href=\"#option-cargo-check--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---help\"><a class=\"option-anchor\" href=\"#option-cargo-check---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--Z\"><a class=\"option-anchor\" href=\"#option-cargo-check--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check--j\"><a class=\"option-anchor\" href=\"#option-cargo-check--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-check---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-check---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-check---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo check -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo check -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-check---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-check---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Check the local package for errors:\n\n       cargo check\n\n2. Check all targets, including unit tests:\n\n       cargo check --all-targets --profile=test\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n","doc/book/src/commands/cargo-clean.md":"# cargo-clean(1)\n## NAME\n\ncargo-clean --- Remove generated artifacts\n\n## SYNOPSIS\n\n`cargo clean` [_options_]\n\n## DESCRIPTION\n\nRemove artifacts from the target directory that Cargo has generated in the\npast.\n\nWith no options, `cargo clean` will delete the entire target directory.\n\n## OPTIONS\n\n### Package Selection\n\nWhen no packages are selected, all packages and all dependencies in the\nworkspace are cleaned.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean--p\"><a class=\"option-anchor\" href=\"#option-cargo-clean--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---package\"><a class=\"option-anchor\" href=\"#option-cargo-clean---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Clean only the specified packages. This flag may be specified\nmultiple times. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC format.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-clean---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Clean artifacts of the workspace members.</p>\n</dd>\n\n\n</dl>\n\n### Clean Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-clean---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a summary of what would be deleted without deleting anything.\nUse with <code>--verbose</code> to display the actual files that would be deleted.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---doc\"><a class=\"option-anchor\" href=\"#option-cargo-clean---doc\"><code>--doc</code></a></dt>\n<dd class=\"option-desc\"><p>This option will cause <code>cargo clean</code> to remove only the <code>doc</code> directory in\nthe target directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---release\"><a class=\"option-anchor\" href=\"#option-cargo-clean---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Remove artifacts only in the <code>release</code> directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---profile\"><a class=\"option-anchor\" href=\"#option-cargo-clean---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Remove artifacts only in the directory with the given profile name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-clean---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---target\"><a class=\"option-anchor\" href=\"#option-cargo-clean---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Clean for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-clean--v\"><a class=\"option-anchor\" href=\"#option-cargo-clean--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-clean---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--q\"><a class=\"option-anchor\" href=\"#option-cargo-clean--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-clean---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---color\"><a class=\"option-anchor\" href=\"#option-cargo-clean---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-clean---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-clean---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---locked\"><a class=\"option-anchor\" href=\"#option-cargo-clean---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---offline\"><a class=\"option-anchor\" href=\"#option-cargo-clean---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-clean---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-clean-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---config\"><a class=\"option-anchor\" href=\"#option-cargo-clean---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--C\"><a class=\"option-anchor\" href=\"#option-cargo-clean--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--h\"><a class=\"option-anchor\" href=\"#option-cargo-clean--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---help\"><a class=\"option-anchor\" href=\"#option-cargo-clean---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--Z\"><a class=\"option-anchor\" href=\"#option-cargo-clean--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove the entire target directory:\n\n       cargo clean\n\n2. Remove only the release artifacts:\n\n       cargo clean --release\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n","doc/book/src/commands/cargo-clippy.md":"# cargo-clippy(1)\n\n## NAME\n\ncargo-clippy --- Checks a package to catch common mistakes and improve your Rust code\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nFor information about usage and installation,\nsee [Clippy Documentation](../../clippy/index.html).\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-fix(1)](cargo-fix.md),\n[cargo-fmt(1)](cargo-fmt.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n","doc/book/src/commands/cargo-doc.md":"# cargo-doc(1)\n## NAME\n\ncargo-doc --- Build a package's documentation\n\n## SYNOPSIS\n\n`cargo doc` [_options_]\n\n## DESCRIPTION\n\nBuild the documentation for the local package and all dependencies. The output\nis placed in `target/doc` in rustdoc's usual format.\n\n**Note:** Documentation generation is cumulative: existing doc files in the target directory are preserved across different `cargo doc` invocations. To remove existing generated docs, pass `--doc` to [cargo-clean(1)](cargo-clean.html).\n\n## OPTIONS\n\n### Documentation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---open\"><a class=\"option-anchor\" href=\"#option-cargo-doc---open\"><code>--open</code></a></dt>\n<dd class=\"option-desc\"><p>Open the docs in a browser after building them. This will use your default\nbrowser unless you define another one in the <code>BROWSER</code> environment variable\nor use the <a href=\"../reference/config.html#docbrowser\"><code>doc.browser</code></a> configuration\noption.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---no-deps\"><a class=\"option-anchor\" href=\"#option-cargo-doc---no-deps\"><code>--no-deps</code></a></dt>\n<dd class=\"option-desc\"><p>Do not build documentation for dependencies.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---document-private-items\"><a class=\"option-anchor\" href=\"#option-cargo-doc---document-private-items\"><code>--document-private-items</code></a></dt>\n<dd class=\"option-desc\"><p>Include non-public items in the documentation. This will be enabled by default if documenting a binary target.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc--p\"><a class=\"option-anchor\" href=\"#option-cargo-doc--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---package\"><a class=\"option-anchor\" href=\"#option-cargo-doc---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-doc---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Document all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---all\"><a class=\"option-anchor\" href=\"#option-cargo-doc---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-doc---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo doc` will document all\nbinary and library targets of the selected package. The binary will be skipped\nif its name is the same as the lib target. Binaries are skipped if they have\n`required-features` that are missing.\n\nThe default behavior can be changed by setting `doc = false` for the target in\nthe manifest settings. Using target selection options will ignore the `doc`\nflag and will always document the given target.\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-doc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Document the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-doc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-doc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Document all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---example\"><a class=\"option-anchor\" href=\"#option-cargo-doc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-doc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Document all example targets.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc--F\"><a class=\"option-anchor\" href=\"#option-cargo-doc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---target\"><a class=\"option-anchor\" href=\"#option-cargo-doc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Document for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--r\"><a class=\"option-anchor\" href=\"#option-cargo-doc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---release\"><a class=\"option-anchor\" href=\"#option-cargo-doc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Document optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-doc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Document with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-doc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-doc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc--v\"><a class=\"option-anchor\" href=\"#option-cargo-doc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-doc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--q\"><a class=\"option-anchor\" href=\"#option-cargo-doc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-doc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---color\"><a class=\"option-anchor\" href=\"#option-cargo-doc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-doc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-doc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-doc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-doc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-doc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-doc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-doc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---config\"><a class=\"option-anchor\" href=\"#option-cargo-doc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--C\"><a class=\"option-anchor\" href=\"#option-cargo-doc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--h\"><a class=\"option-anchor\" href=\"#option-cargo-doc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---help\"><a class=\"option-anchor\" href=\"#option-cargo-doc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-doc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc--j\"><a class=\"option-anchor\" href=\"#option-cargo-doc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-doc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-doc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo doc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo doc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---output-format\"><a class=\"option-anchor\" href=\"#option-cargo-doc---output-format\"><code>--output-format</code></a></dt>\n<dd class=\"option-desc\"><p>The output type for the documentation emitted. Valid values:</p>\n<ul>\n<li><code>html</code> (default): Emit the documentation in HTML format.</li>\n<li><code>json</code>: Emit the documentation in the <a href=\"https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types\">experimental JSON format</a>.</li>\n</ul>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package documentation and its dependencies and output to\n   `target/doc`.\n\n       cargo doc\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-rustdoc(1)](cargo-rustdoc.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n","doc/book/src/commands/cargo-fetch.md":"# cargo-fetch(1)\n## NAME\n\ncargo-fetch --- Fetch dependencies of a package from the network\n\n## SYNOPSIS\n\n`cargo fetch` [_options_]\n\n## DESCRIPTION\n\nIf a `Cargo.lock` file is available, this command will ensure that all of the\ngit dependencies and/or registry dependencies are downloaded and locally\navailable. Subsequent Cargo commands will be able to run offline after a `cargo\nfetch` unless the lock file changes.\n\nIf the lock file is not available, then this command will generate the lock\nfile before fetching the dependencies.\n\nIf `--target` is not specified, then all target dependencies are fetched.\n\n## OPTIONS\n\n### Fetch options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch---target\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Fetch for the specified target architecture. Flag may be specified multiple times. The default is all architectures. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch--v\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--q\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---color\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---locked\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---offline\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fetch-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-fetch-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---config\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--C\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--h\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---help\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--Z\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Fetch all dependencies:\n\n       cargo fetch\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-update(1)](cargo-update.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\n","doc/book/src/commands/cargo-fix.md":"# cargo-fix(1)\n## NAME\n\ncargo-fix --- Automatically fix lint warnings reported by rustc\n\n## SYNOPSIS\n\n`cargo fix` [_options_]\n\n## DESCRIPTION\n\nThis Cargo subcommand will automatically take rustc's suggestions from\ndiagnostics like warnings and apply them to your source code. This is intended\nto help automate tasks that rustc itself already knows how to tell you to fix!\n\nExecuting `cargo fix` will under the hood execute [cargo-check(1)](cargo-check.html). Any warnings\napplicable to your crate will be automatically fixed (if possible) and all\nremaining warnings will be displayed when the check process is finished. For\nexample if you'd like to apply all fixes to the current package, you can run:\n\n    cargo fix\n\nwhich behaves the same as `cargo check --all-targets`.\n\n`cargo fix` is only capable of fixing code that is normally compiled with\n`cargo check`. If code is conditionally enabled with optional features, you\nwill need to enable those features for that code to be analyzed:\n\n    cargo fix --features foo\n\nSimilarly, other `cfg` expressions like platform-specific code will need to\npass `--target` to fix code for the given target.\n\n    cargo fix --target x86_64-pc-windows-gnu\n\nIf you encounter any problems with `cargo fix` or otherwise have any questions\nor feature requests please don't hesitate to file an issue at\n<https://github.com/rust-lang/cargo>.\n\n### Edition migration\n\nThe `cargo fix` subcommand can also be used to migrate a package from one\n[edition] to the next. The general procedure is:\n\n1. Run `cargo fix --edition`. Consider also using the `--all-features` flag if\n   your project has multiple features. You may also want to run `cargo fix\n   --edition` multiple times with different `--target` flags if your project\n   has platform-specific code gated by `cfg` attributes.\n2. Modify `Cargo.toml` to set the [edition field] to the new edition.\n3. Run your project tests to verify that everything still works. If new\n   warnings are issued, you may want to consider running `cargo fix` again\n   (without the `--edition` flag) to apply any suggestions given by the\n   compiler.\n\nAnd hopefully that's it! Just keep in mind of the caveats mentioned above that\n`cargo fix` cannot update code for inactive features or `cfg` expressions.\nAlso, in some rare cases the compiler is unable to automatically migrate all\ncode to the new edition, and this may require manual changes after building\nwith the new edition.\n\n[edition]: https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html\n[edition field]: ../reference/manifest.html#the-edition-field\n\n## OPTIONS\n\n### Fix options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---broken-code\"><a class=\"option-anchor\" href=\"#option-cargo-fix---broken-code\"><code>--broken-code</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if it already has compiler errors. This is useful if <code>cargo fix</code>\nfails to apply the changes. It will apply the changes and leave the broken\ncode in the working directory for you to inspect and manually fix.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---edition\"><a class=\"option-anchor\" href=\"#option-cargo-fix---edition\"><code>--edition</code></a></dt>\n<dd class=\"option-desc\"><p>Apply changes that will update the code to the next edition. This will not\nupdate the edition in the <code>Cargo.toml</code> manifest, which must be updated\nmanually after <code>cargo fix --edition</code> has finished.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---edition-idioms\"><a class=\"option-anchor\" href=\"#option-cargo-fix---edition-idioms\"><code>--edition-idioms</code></a></dt>\n<dd class=\"option-desc\"><p>Apply suggestions that will update code to the preferred style for the current\nedition.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-no-vcs\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-no-vcs\"><code>--allow-no-vcs</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if a VCS was not detected.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if the working directory has changes (including staged changes).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-staged\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-staged\"><code>--allow-staged</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if the working directory has staged changes.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix--p\"><a class=\"option-anchor\" href=\"#option-cargo-fix--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---package\"><a class=\"option-anchor\" href=\"#option-cargo-fix---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-fix---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-fix---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo fix` will fix all targets\n(`--all-targets` implied). Binaries are skipped if they have\n`required-features` that are missing.\n\nPassing target selection flags will fix only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---lib\"><a class=\"option-anchor\" href=\"#option-cargo-fix---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Fix the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bin\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bins\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---example\"><a class=\"option-anchor\" href=\"#option-cargo-fix---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---examples\"><a class=\"option-anchor\" href=\"#option-cargo-fix---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---test\"><a class=\"option-anchor\" href=\"#option-cargo-fix---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---tests\"><a class=\"option-anchor\" href=\"#option-cargo-fix---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bench\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---benches\"><a class=\"option-anchor\" href=\"#option-cargo-fix---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix--F\"><a class=\"option-anchor\" href=\"#option-cargo-fix--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---target\"><a class=\"option-anchor\" href=\"#option-cargo-fix---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Fix for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--r\"><a class=\"option-anchor\" href=\"#option-cargo-fix--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---release\"><a class=\"option-anchor\" href=\"#option-cargo-fix---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Fix optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---profile\"><a class=\"option-anchor\" href=\"#option-cargo-fix---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Fix with the given profile.</p>\n<p>As a special case, specifying the <code>test</code> profile will also enable checking in\ntest mode which will enable checking tests and enable the <code>test</code> cfg option.\nSee <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc tests</a> for more\ndetail.</p>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---timings\"><a class=\"option-anchor\" href=\"#option-cargo-fix---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-fix---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix--v\"><a class=\"option-anchor\" href=\"#option-cargo-fix--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-fix---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--q\"><a class=\"option-anchor\" href=\"#option-cargo-fix--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-fix---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---color\"><a class=\"option-anchor\" href=\"#option-cargo-fix---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-fix---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-fix---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-fix---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---locked\"><a class=\"option-anchor\" href=\"#option-cargo-fix---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---offline\"><a class=\"option-anchor\" href=\"#option-cargo-fix---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-fix---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-fix-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---config\"><a class=\"option-anchor\" href=\"#option-cargo-fix---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--C\"><a class=\"option-anchor\" href=\"#option-cargo-fix--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--h\"><a class=\"option-anchor\" href=\"#option-cargo-fix--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---help\"><a class=\"option-anchor\" href=\"#option-cargo-fix---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--Z\"><a class=\"option-anchor\" href=\"#option-cargo-fix--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix--j\"><a class=\"option-anchor\" href=\"#option-cargo-fix--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-fix---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-fix---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo fix -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo fix -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Apply compiler suggestions to the local package:\n\n       cargo fix\n\n2. Update a package to prepare it for the next edition:\n\n       cargo fix --edition\n\n3. Apply suggested idioms for the current edition:\n\n       cargo fix --edition-idioms\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-check(1)](cargo-check.html)\n","doc/book/src/commands/cargo-fmt.md":"# cargo-fmt(1)\n\n## NAME\n\ncargo-fmt --- Formats all bin and lib files of the current crate using rustfmt\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nFor information about usage and installation,\nsee <https://github.com/rust-lang/rustfmt>.\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-fix(1)](cargo-fix.md),\n[cargo-clippy(1)](cargo-clippy.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n","doc/book/src/commands/cargo-generate-lockfile.md":"# cargo-generate-lockfile(1)\n\n## NAME\n\ncargo-generate-lockfile --- Generate the lockfile for a package\n\n## SYNOPSIS\n\n`cargo generate-lockfile` [_options_]\n\n## DESCRIPTION\n\nThis command will create the `Cargo.lock` lockfile for the current package or\nworkspace. If the lockfile already exists, it will be rebuilt with the latest\navailable version of every package.\n\nSee also [cargo-update(1)](cargo-update.html) which is also capable of creating a `Cargo.lock`\nlockfile and has more options for controlling update behavior.\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--v\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--q\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---color\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---publish-time\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---publish-time\"><code>--publish-time</code> <em>yyyy-mm-ddThh:mm:ssZ</em></a></dt>\n<dd class=\"option-desc\"><p>Latest publish time allowed for registry packages (Unstable)</p>\n<p>This is a best-effort filter on allowed packages, including:</p>\n<ul>\n<li>packages from unsupported registries are always accepted</li>\n<li>only the current yank state is respected, not the state as of <code>--publish-time</code></li>\n<li>precision of the publish time</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---locked\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---offline\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---config\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--C\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--h\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---help\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--Z\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create or update the lockfile for the current package or workspace:\n\n       cargo generate-lockfile\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-update(1)](cargo-update.html)\n","doc/book/src/commands/cargo-help.md":"# cargo-help(1)\n\n## NAME\n\ncargo-help --- Get help for a Cargo command\n\n## SYNOPSIS\n\n`cargo help` [_subcommand_]\n\n## DESCRIPTION\n\nPrints a help message for the given command.\n\nFor commands with subcommands, separate the command levels with spaces. For\nexample, `cargo help report future-incompatibilities` displays help for the\n`cargo report future-incompatibilities` command.\n\nSpaces separate hierarchy levels only between a parent command and its\nsubcommands. Dashes that are part of a command's name, such as\n`generate-lockfile`, must always be preserved.\n\nMultiple command levels can also be written as a single dash-joined word.\nFor example, `cargo help report-future-incompatibilities` is equivalent to\n`cargo help report future-incompatibilities`.\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-help--v\"><a class=\"option-anchor\" href=\"#option-cargo-help--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-help---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--q\"><a class=\"option-anchor\" href=\"#option-cargo-help--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-help---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---color\"><a class=\"option-anchor\" href=\"#option-cargo-help---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-help---locked\"><a class=\"option-anchor\" href=\"#option-cargo-help---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---offline\"><a class=\"option-anchor\" href=\"#option-cargo-help---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-help---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-help-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-help-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---config\"><a class=\"option-anchor\" href=\"#option-cargo-help---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--C\"><a class=\"option-anchor\" href=\"#option-cargo-help--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--h\"><a class=\"option-anchor\" href=\"#option-cargo-help--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---help\"><a class=\"option-anchor\" href=\"#option-cargo-help---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--Z\"><a class=\"option-anchor\" href=\"#option-cargo-help--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Get help for a command:\n\n       cargo help build\n\n2. Get help for a nested command:\n\n       cargo help report future-incompatibilities\n\n3. The dash-joined form also works:\n\n       cargo help report-future-incompatibilities\n\n4. Help is also available with the `--help` flag:\n\n       cargo build --help\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n","doc/book/src/commands/cargo-info.md":"# cargo-info(1)\n\n## NAME\n\ncargo-info --- Display information about a package.\n\n## SYNOPSIS\n\n`cargo info` [_options_] _spec_\n\n## DESCRIPTION\n\nThis command displays information about a package. It fetches data from the package's Cargo.toml file\nand presents it in a human-readable format.\n\n## OPTIONS\n\n### Info Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-info-spec\"><a class=\"option-anchor\" href=\"#option-cargo-info-spec\"><em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Fetch information about the specified package. The <em>spec</em> can be a package ID, see <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.\nIf the specified package is part of the current workspace, information from the local Cargo.toml file will be displayed.\nIf the <code>Cargo.lock</code> file does not exist, it will be created. If no version is specified, the appropriate version will be\nselected based on the Minimum Supported Rust Version (MSRV).</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-info---index\"><a class=\"option-anchor\" href=\"#option-cargo-info---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-info---registry\"><a class=\"option-anchor\" href=\"#option-cargo-info---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-info--v\"><a class=\"option-anchor\" href=\"#option-cargo-info--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-info---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--q\"><a class=\"option-anchor\" href=\"#option-cargo-info--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-info---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---color\"><a class=\"option-anchor\" href=\"#option-cargo-info---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-info---locked\"><a class=\"option-anchor\" href=\"#option-cargo-info---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---offline\"><a class=\"option-anchor\" href=\"#option-cargo-info---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-info---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-info-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-info-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---config\"><a class=\"option-anchor\" href=\"#option-cargo-info---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--C\"><a class=\"option-anchor\" href=\"#option-cargo-info--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--h\"><a class=\"option-anchor\" href=\"#option-cargo-info--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---help\"><a class=\"option-anchor\" href=\"#option-cargo-info---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--Z\"><a class=\"option-anchor\" href=\"#option-cargo-info--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Inspect the `serde` package from crates.io:\n\n        cargo info serde\n2. Inspect the `serde` package with version `1.0.0`:\n\n        cargo info serde@1.0.0\n3. Inspect the `serde` package from the local registry:\n\n        cargo info serde --registry my-registry\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-search(1)](cargo-search.html)\n","doc/book/src/commands/cargo-init.md":"# cargo-init(1)\n\n## NAME\n\ncargo-init --- Create a new Cargo package in an existing directory\n\n## SYNOPSIS\n\n`cargo init` [_options_] [_path_]\n\n## DESCRIPTION\n\nThis command will create a new Cargo manifest in the current directory. Give a\npath as an argument to create in the given directory.\n\nIf there are typically-named Rust source files already in the directory, those\nwill be used. If not, then a sample `src/main.rs` file will be created, or\n`src/lib.rs` if `--lib` is passed.\n\nIf the directory is not already in a VCS repository, then a new repository\nis created (see `--vcs` below).\n\nSee [cargo-new(1)](cargo-new.html) for a similar command which will create a new package in\na new directory.\n\n## OPTIONS\n\n### Init Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-init---bin\"><a class=\"option-anchor\" href=\"#option-cargo-init---bin\"><code>--bin</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a binary target (<code>src/main.rs</code>).\nThis is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---lib\"><a class=\"option-anchor\" href=\"#option-cargo-init---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a library target (<code>src/lib.rs</code>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---edition\"><a class=\"option-anchor\" href=\"#option-cargo-init---edition\"><code>--edition</code> <em>edition</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the Rust edition to use. Default is 2024.\nPossible values: 2015, 2018, 2021, 2024</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---name\"><a class=\"option-anchor\" href=\"#option-cargo-init---name\"><code>--name</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Set the package name. Defaults to the directory name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---vcs\"><a class=\"option-anchor\" href=\"#option-cargo-init---vcs\"><code>--vcs</code> <em>vcs</em></a></dt>\n<dd class=\"option-desc\"><p>Initialize a new VCS repository for the given version control system (git,\nhg, pijul, or fossil) or do not initialize any version control at all\n(none). If not specified, defaults to <code>git</code> or the configuration value\n<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---registry\"><a class=\"option-anchor\" href=\"#option-cargo-init---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name\nwhich will restrict publishing only to that registry.</p>\n<p>Registry names are defined in <a href=\"../reference/config.html\">Cargo config files</a>.\nIf not specified, the default registry defined by the <code>registry.default</code>\nconfig key is used. If the default registry is not set and <code>--registry</code> is not\nused, the <code>publish</code> field will not be set which means that publishing will not\nbe restricted.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-init--v\"><a class=\"option-anchor\" href=\"#option-cargo-init--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-init---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--q\"><a class=\"option-anchor\" href=\"#option-cargo-init--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-init---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---color\"><a class=\"option-anchor\" href=\"#option-cargo-init---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-init-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-init-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---config\"><a class=\"option-anchor\" href=\"#option-cargo-init---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--C\"><a class=\"option-anchor\" href=\"#option-cargo-init--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--h\"><a class=\"option-anchor\" href=\"#option-cargo-init--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---help\"><a class=\"option-anchor\" href=\"#option-cargo-init---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--Z\"><a class=\"option-anchor\" href=\"#option-cargo-init--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a binary Cargo package in the current directory:\n\n       cargo init\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-new(1)](cargo-new.html)\n","doc/book/src/commands/cargo-install.md":"# cargo-install(1)\n## NAME\n\ncargo-install --- Build and install a Rust binary\n\n## SYNOPSIS\n\n`cargo install` [_options_] _crate_[@_version_]...\\\n`cargo install` [_options_] `--path` _path_\\\n`cargo install` [_options_] `--git` _url_ [_crate_...]\\\n`cargo install` [_options_] `--list`\n\n## DESCRIPTION\n\nThis command manages Cargo's local set of installed binary crates. Only\npackages which have executable `[[bin]]` or `[[example]]` targets can be\ninstalled, and all executables are installed into the installation root's\n`bin` folder. By default only binaries, not examples, are installed.\n\nThe installation root is determined, in order of precedence:\n\n- `--root` option\n- `CARGO_INSTALL_ROOT` environment variable\n- `install.root` Cargo [config value](../reference/config.html)\n- `CARGO_HOME` environment variable\n- `$HOME/.cargo`\n\nThere are multiple sources from which a crate can be installed. The default\nsource location is crates.io but the `--git`, `--path`, and `--registry` flags\ncan change this source. If the source contains more than one package (such as\ncrates.io or a git repository with multiple crates) the _crate_ argument is\nrequired to indicate which crate should be installed.\n\nCrates from crates.io can optionally specify the version they wish to install\nvia the `--version` flags, and similarly packages from git repositories can\noptionally specify the branch, tag, or revision that should be installed. If a\ncrate has multiple binaries, the `--bin` argument can selectively install only\none of them, and if you'd rather install examples the `--example` argument can\nbe used as well.\n\nIf the package is already installed, Cargo will reinstall it if the installed\nversion does not appear to be up-to-date. If any of the following values\nchange, then Cargo will reinstall the package:\n\n- The package version and source.\n- The set of binary names installed.\n- The chosen features.\n- The profile (`--profile`).\n- The target (`--target`).\n\nInstalling with `--path` will always build and install, unless there are\nconflicting binaries from another package. The `--force` flag may be used to\nforce Cargo to always reinstall the package.\n\nIf the source is crates.io or `--git` then by default the crate will be built\nin a temporary target directory. To avoid this, the target directory can be\nspecified by setting the `CARGO_TARGET_DIR` environment variable to a\npath. In particular, this can be useful for caching build artifacts on\ncontinuous integration systems.\n\n### Dealing with the Lockfile\n\nBy default, Cargo uses the `Cargo.lock` file included with the package if it is\navailable. This ensures that the installed executable uses the dependency versions\nselected when the package was published. If no lockfile is available, including for\npackages published with versions of Cargo before 1.37, Cargo resolves the dependencies\nnormally.\n\nThe `--locked` flag does not currently change dependency resolution for `cargo install`.\nIf no `Cargo.lock` is available, using `--locked` emits a warning.\n\n### Configuration Discovery\n\nThis command operates on system or user level, not project level.\nThis means that the local [configuration discovery] is ignored.\nInstead, the configuration discovery begins at `$CARGO_HOME/config.toml`. \nIf the package is installed with `--path $PATH`, the local configuration \nwill be used, beginning discovery at `$PATH/.cargo/config.toml`.\n\n[configuration discovery]: ../reference/config.html#hierarchical-structure\n\n## OPTIONS\n\n### Install Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install---vers\"><a class=\"option-anchor\" href=\"#option-cargo-install---vers\"><code>--vers</code> <em>version</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---version\"><a class=\"option-anchor\" href=\"#option-cargo-install---version\"><code>--version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>Specify a version to install. This may be a <a href=\"../reference/specifying-dependencies.html\">version\nrequirement</a>, like <code>~1.2</code>, to have Cargo\nselect the newest version from the given requirement. If the version does not\nhave a requirement operator (such as <code>^</code> or <code>~</code>), then it must be in the form\n<em>MAJOR.MINOR.PATCH</em>, and will install exactly that version; it is <em>not</em>\ntreated as a caret requirement like Cargo dependencies are.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---git\"><a class=\"option-anchor\" href=\"#option-cargo-install---git\"><code>--git</code> <em>url</em></a></dt>\n<dd class=\"option-desc\"><p>Git URL to install the specified crate from.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---branch\"><a class=\"option-anchor\" href=\"#option-cargo-install---branch\"><code>--branch</code> <em>branch</em></a></dt>\n<dd class=\"option-desc\"><p>Branch to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---tag\"><a class=\"option-anchor\" href=\"#option-cargo-install---tag\"><code>--tag</code> <em>tag</em></a></dt>\n<dd class=\"option-desc\"><p>Tag to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---rev\"><a class=\"option-anchor\" href=\"#option-cargo-install---rev\"><code>--rev</code> <em>sha</em></a></dt>\n<dd class=\"option-desc\"><p>Specific commit to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---path\"><a class=\"option-anchor\" href=\"#option-cargo-install---path\"><code>--path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Filesystem path to local crate to install from.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---list\"><a class=\"option-anchor\" href=\"#option-cargo-install---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List all installed packages and their versions.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--n\"><a class=\"option-anchor\" href=\"#option-cargo-install--n\"><code>-n</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-install---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>(unstable) Perform all checks without installing.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--f\"><a class=\"option-anchor\" href=\"#option-cargo-install--f\"><code>-f</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---force\"><a class=\"option-anchor\" href=\"#option-cargo-install---force\"><code>--force</code></a></dt>\n<dd class=\"option-desc\"><p>Force overwriting existing crates or binaries. This can be used if a package\nhas installed a binary with the same name as another package. This is also\nuseful if something has changed on the system that you want to rebuild with,\nsuch as a newer version of <code>rustc</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---no-track\"><a class=\"option-anchor\" href=\"#option-cargo-install---no-track\"><code>--no-track</code></a></dt>\n<dd class=\"option-desc\"><p>By default, Cargo keeps track of the installed packages with a metadata file\nstored in the installation root directory. This flag tells Cargo not to use or\ncreate that file. With this flag, Cargo will refuse to overwrite any existing\nfiles unless the <code>--force</code> flag is used. This also disables Cargo’s ability to\nprotect against multiple concurrent invocations of Cargo installing at the\nsame time.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---bin\"><a class=\"option-anchor\" href=\"#option-cargo-install---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Install only the specified binary.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---bins\"><a class=\"option-anchor\" href=\"#option-cargo-install---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Install all binaries. This is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---example\"><a class=\"option-anchor\" href=\"#option-cargo-install---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Install only the specified example.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---examples\"><a class=\"option-anchor\" href=\"#option-cargo-install---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Install all examples.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---root\"><a class=\"option-anchor\" href=\"#option-cargo-install---root\"><code>--root</code> <em>dir</em></a></dt>\n<dd class=\"option-desc\"><p>Directory to install packages into.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---registry\"><a class=\"option-anchor\" href=\"#option-cargo-install---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---index\"><a class=\"option-anchor\" href=\"#option-cargo-install---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install--F\"><a class=\"option-anchor\" href=\"#option-cargo-install--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---features\"><a class=\"option-anchor\" href=\"#option-cargo-install---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-install---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-install---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install---target\"><a class=\"option-anchor\" href=\"#option-cargo-install---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Install for the specified target architecture. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-install---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to a new temporary folder located in the\ntemporary directory of the platform.</p>\n<p>When using <code>--path</code>, by default it will use <code>target</code> directory in the workspace\nof the local crate unless <code>--target-dir</code>\nis specified.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---debug\"><a class=\"option-anchor\" href=\"#option-cargo-install---debug\"><code>--debug</code></a></dt>\n<dd class=\"option-desc\"><p>Build with the <code>debug</code> profile instead of the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---profile\"><a class=\"option-anchor\" href=\"#option-cargo-install---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Install with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---timings\"><a class=\"option-anchor\" href=\"#option-cargo-install---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-install---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---locked\"><a class=\"option-anchor\" href=\"#option-cargo-install---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---offline\"><a class=\"option-anchor\" href=\"#option-cargo-install---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-install---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install--j\"><a class=\"option-anchor\" href=\"#option-cargo-install--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-install---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-install---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-install---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo install -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo install -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install--v\"><a class=\"option-anchor\" href=\"#option-cargo-install--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-install---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--q\"><a class=\"option-anchor\" href=\"#option-cargo-install--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-install---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---color\"><a class=\"option-anchor\" href=\"#option-cargo-install---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-install---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-install-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---config\"><a class=\"option-anchor\" href=\"#option-cargo-install---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--C\"><a class=\"option-anchor\" href=\"#option-cargo-install--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--h\"><a class=\"option-anchor\" href=\"#option-cargo-install--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---help\"><a class=\"option-anchor\" href=\"#option-cargo-install---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--Z\"><a class=\"option-anchor\" href=\"#option-cargo-install--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Install or upgrade a package from crates.io:\n\n       cargo install ripgrep\n\n2. Install or reinstall the package in the current directory:\n\n       cargo install --path .\n\n3. View the list of installed packages:\n\n       cargo install --list\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-uninstall(1)](cargo-uninstall.html), [cargo-search(1)](cargo-search.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-locate-project.md":"# cargo-locate-project(1)\n\n## NAME\n\ncargo-locate-project --- Print a JSON representation of a Cargo.toml file's location\n\n## SYNOPSIS\n\n`cargo locate-project` [_options_]\n\n## DESCRIPTION\n\nThis command will print a JSON object to stdout with the full path to the manifest. The\nmanifest is found by searching upward for a file named `Cargo.toml` starting from the current\nworking directory.\n\nIf the project happens to be a part of a workspace, the manifest of the project, rather than\nthe workspace root, is output. This can be overridden by the `--workspace` flag. The root\nworkspace is found by traversing further upward or by using the field `package.workspace` after\nlocating the manifest of a workspace member.\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Locate the <code>Cargo.toml</code> at the root of the workspace, as opposed to the current\nworkspace member.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The representation in which to print the project location. Valid values:</p>\n<ul>\n<li><code>json</code> (default): JSON object with the path under the key “root”.</li>\n<li><code>plain</code>: Just the path.</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--v\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--q\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---color\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---config\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--C\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--h\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---help\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--Z\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the path to the manifest based on the current directory:\n\n       cargo locate-project\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-metadata(1)](cargo-metadata.html)\n","doc/book/src/commands/cargo-login.md":"# cargo-login(1)\n\n## NAME\n\ncargo-login --- Log in to a registry\n\n## SYNOPSIS\n\n`cargo login` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThis command will run a credential provider to save a token so that commands\nthat require authentication, such as [cargo-publish(1)](cargo-publish.html), will be\nautomatically authenticated.\n\nAll the arguments following the two dashes (`--`) are passed to the credential provider.\n\nFor the default `cargo:token` credential provider, the token is saved\nin `$CARGO_HOME/credentials.toml`. `CARGO_HOME` defaults to `.cargo`\nin your home directory.\n\nIf a registry has a credential-provider specified, it will be used. Otherwise,\nthe providers from the config value `registry.global-credential-providers` will\nbe attempted, starting from the end of the list.\n\nThe _token_ will be read from stdin.\n\nThe API token for crates.io may be retrieved from <https://crates.io/me>.\n\nTake care to keep the token secret, it should not be shared with anyone else.\n\n## OPTIONS\n\n### Login Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-login---registry\"><a class=\"option-anchor\" href=\"#option-cargo-login---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-login--v\"><a class=\"option-anchor\" href=\"#option-cargo-login--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-login---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--q\"><a class=\"option-anchor\" href=\"#option-cargo-login--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-login---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login---color\"><a class=\"option-anchor\" href=\"#option-cargo-login---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-login-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-login-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login---config\"><a class=\"option-anchor\" href=\"#option-cargo-login---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--C\"><a class=\"option-anchor\" href=\"#option-cargo-login--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--h\"><a class=\"option-anchor\" href=\"#option-cargo-login--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---help\"><a class=\"option-anchor\" href=\"#option-cargo-login---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--Z\"><a class=\"option-anchor\" href=\"#option-cargo-login--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Save the token for the default registry:\n\n       cargo login\n\n2. Save the token for a specific registry:\n\n       cargo login --registry my-registry\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-logout(1)](cargo-logout.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-logout.md":"# cargo-logout(1)\n\n## NAME\n\ncargo-logout --- Remove an API token from the registry locally\n\n## SYNOPSIS\n\n`cargo logout` [_options_]\n\n## DESCRIPTION\n\nThis command will run a credential provider to remove a saved token.\n\nFor the default `cargo:token` credential provider, credentials are stored\nin `$CARGO_HOME/credentials.toml` where `$CARGO_HOME` defaults to `.cargo`\nin your home directory.\n\nIf a registry has a credential-provider specified, it will be used. Otherwise,\nthe providers from the config value `registry.global-credential-providers` will\nbe attempted, starting from the end of the list.\n\nIf `--registry` is not specified, then the credentials for the default\nregistry will be removed (configured by\n[`registry.default`](../reference/config.html#registrydefault), which defaults\nto <https://crates.io/>).\n\nThis will not revoke the token on the server. If you need to revoke the token,\nvisit the registry website and follow its instructions (see\n<https://crates.io/me> to revoke the token for <https://crates.io/>).\n\n## OPTIONS\n\n### Logout Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-logout---registry\"><a class=\"option-anchor\" href=\"#option-cargo-logout---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-logout--v\"><a class=\"option-anchor\" href=\"#option-cargo-logout--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-logout---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--q\"><a class=\"option-anchor\" href=\"#option-cargo-logout--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-logout---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout---color\"><a class=\"option-anchor\" href=\"#option-cargo-logout---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-logout-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-logout-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout---config\"><a class=\"option-anchor\" href=\"#option-cargo-logout---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--C\"><a class=\"option-anchor\" href=\"#option-cargo-logout--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--h\"><a class=\"option-anchor\" href=\"#option-cargo-logout--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---help\"><a class=\"option-anchor\" href=\"#option-cargo-logout---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--Z\"><a class=\"option-anchor\" href=\"#option-cargo-logout--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove the default registry token:\n\n       cargo logout\n\n2. Remove the token for a specific registry:\n\n       cargo logout --registry my-registry\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html)\n","doc/book/src/commands/cargo-metadata.md":"# cargo-metadata(1)\n\n## NAME\n\ncargo-metadata --- Machine-readable metadata about the current package\n\n## SYNOPSIS\n\n`cargo metadata` [_options_]\n\n## DESCRIPTION\n\nOutput JSON to stdout containing information about the workspace members and\nresolved dependencies of the current package.\n\nThe output format is subject to change in future versions of Cargo. It\nis recommended to include the `--format-version` flag to future-proof your code\nand ensure the output is in the format you are expecting. For more on the\nexpectations, see [\"Compatibility\"](#compatibility).\n\nSee the [cargo_metadata crate](https://crates.io/crates/cargo_metadata)\nfor a Rust API for reading the metadata.\n\n## OUTPUT FORMAT\n\n### Compatibility\n\nWithin the same output format version, the compatibility is maintained, except\nsome scenarios. The following is a non-exhaustive list of changes that are not\nconsidered as incompatible:\n\n* **Adding new fields** — New fields will be added when needed. Reserving this\n  helps Cargo evolve without bumping the format version too often.\n* **Adding new values for enum-like fields** — Same as adding new fields. It\n  keeps metadata evolving without stagnation.\n* **Changing opaque representations** — The inner representations of some\n  fields are implementation details. For example, fields related to\n  \"Source ID\" are treated as opaque identifiers to differentiate packages or\n  sources. Consumers shouldn't rely on those representations unless specified.\n\n### JSON format\n\nThe JSON output has the following format:\n\n```javascript\n{\n    /* Array of all packages in the workspace.\n       It also includes all feature-enabled dependencies unless --no-deps is used.\n    */\n    \"packages\": [\n        {\n            /* The name of the package. */\n            \"name\": \"my-package\",\n            /* The version of the package. */\n            \"version\": \"0.1.0\",\n            /* The Package ID for referring to the\n               package within the document and as the `--package` argument to many commands\n            */\n            \"id\": \"file:///path/to/my-package#0.1.0\",\n            /* The license value from the manifest, or null. */\n            \"license\": \"MIT/Apache-2.0\",\n            /* The license-file value from the manifest, or null. */\n            \"license_file\": \"LICENSE\",\n            /* The description value from the manifest, or null. */\n            \"description\": \"Package description.\",\n            /* The source ID of the package, an \"opaque\" identifier representing\n               where a package is retrieved from. See \"Compatibility\" above for\n               the stability guarantee.\n\n               This is null for path dependencies and workspace members.\n\n               For other dependencies, it is a string with the format:\n               - \"registry+URL\" for registry-based dependencies.\n                 Example: \"registry+https://github.com/rust-lang/crates.io-index\"\n               - \"git+URL\" for git-based dependencies.\n                 Example: \"git+https://github.com/rust-lang/cargo?rev=5e85ba14aaa20f8133863373404cb0af69eeef2c#5e85ba14aaa20f8133863373404cb0af69eeef2c\"\n               - \"sparse+URL\" for dependencies from a sparse registry\n                 Example: \"sparse+https://my-sparse-registry.org\"\n\n               The value after the `+` is not explicitly defined, and may change\n               between versions of Cargo and may not directly correlate to other\n               things, such as registry definitions in a config file. New source\n               kinds may be added in the future which will have different `+`\n               prefixed identifiers.\n            */\n            \"source\": null,\n            /* Array of dependencies declared in the package's manifest. */\n            \"dependencies\": [\n                {\n                    /* The name of the dependency. */\n                    \"name\": \"bitflags\",\n                    /* The source ID of the dependency. May be null, see\n                       description for the package source.\n                    */\n                    \"source\": \"registry+https://github.com/rust-lang/crates.io-index\",\n                    /* The version requirement for the dependency.\n                       Dependencies without a version requirement have a value of \"*\".\n                    */\n                    \"req\": \"^1.0\",\n                    /* The dependency kind.\n                       \"dev\", \"build\", or null for a normal dependency.\n                    */\n                    \"kind\": null,\n                    /* If the dependency is renamed, this is the new name for\n                       the dependency as a string.  null if it is not renamed.\n                    */\n                    \"rename\": null,\n                    /* Boolean of whether or not this is an optional dependency. */\n                    \"optional\": false,\n                    /* Boolean of whether or not default features are enabled. */\n                    \"uses_default_features\": true,\n                    /* Array of features enabled. */\n                    \"features\": [],\n                    /* The target platform for the dependency.\n                       null if not a target dependency.\n                    */\n                    \"target\": \"cfg(windows)\",\n                    /* The file system path for a local path dependency.\n                       not present if not a path dependency.\n                    */\n                    \"path\": \"/path/to/dep\",\n                    /* A string of the URL of the registry this dependency is from.\n                       If not specified or null, the dependency is from the default\n                       registry (crates.io).\n                    */\n                    \"registry\": null,\n                    /* (unstable) Boolean flag of whether or not this is a pulbic\n                       dependency. This field is only present when\n                       `-Zpublic-dependency` is enabled.\n                    */\n                    \"public\": false\n                }\n            ],\n            /* Array of Cargo targets. */\n            \"targets\": [\n                {\n                    /* Array of target kinds.\n                       - lib targets list the `crate-type` values from the\n                         manifest such as \"lib\", \"rlib\", \"dylib\",\n                         \"proc-macro\", etc. (default [\"lib\"])\n                       - binary is [\"bin\"]\n                       - example is [\"example\"]\n                       - integration test is [\"test\"]\n                       - benchmark is [\"bench\"]\n                       - build script is [\"custom-build\"]\n                    */\n                    \"kind\": [\n                        \"bin\"\n                    ],\n                    /* Array of crate types.\n                       - lib and example libraries list the `crate-type` values\n                         from the manifest such as \"lib\", \"rlib\", \"dylib\",\n                         \"proc-macro\", etc. (default [\"lib\"])\n                       - all other target kinds are [\"bin\"]\n                    */\n                    \"crate_types\": [\n                        \"bin\"\n                    ],\n                    /* The name of the target.\n                       For lib targets, dashes will be replaced with underscores.\n                    */\n                    \"name\": \"my-package\",\n                    /* Absolute path to the root source file of the target. */\n                    \"src_path\": \"/path/to/my-package/src/main.rs\",\n                    /* The Rust edition of the target.\n                       Defaults to the package edition.\n                    */\n                    \"edition\": \"2018\",\n                    /* Array of required features.\n                       This property is not included if no required features are set.\n                    */\n                    \"required-features\": [\"feat1\"],\n                    /* Whether the target should be documented by `cargo doc`. */\n                    \"doc\": true,\n                    /* Whether or not this target has doc tests enabled, and\n                       the target is compatible with doc testing.\n                    */\n                    \"doctest\": false,\n                    /* Whether or not this target should be built and run with `--test`\n                    */\n                    \"test\": true\n                }\n            ],\n            /* Set of features defined for the package.\n               Each feature maps to an array of features or dependencies it\n               enables.\n            */\n            \"features\": {\n                \"default\": [\n                    \"feat1\"\n                ],\n                \"feat1\": [],\n                \"feat2\": []\n            },\n            /* Absolute path to this package's manifest. */\n            \"manifest_path\": \"/path/to/my-package/Cargo.toml\",\n            /* Package metadata.\n               This is null if no metadata is specified.\n            */\n            \"metadata\": {\n                \"docs\": {\n                    \"rs\": {\n                        \"all-features\": true\n                    }\n                }\n            },\n            /* List of registries to which this package may be published.\n               Publishing is unrestricted if null, and forbidden if an empty array. */\n            \"publish\": [\n                \"crates-io\"\n            ],\n            /* Array of authors from the manifest.\n               Empty array if no authors specified.\n            */\n            \"authors\": [\n                \"Jane Doe <user@example.com>\"\n            ],\n            /* Array of categories from the manifest. */\n            \"categories\": [\n                \"command-line-utilities\"\n            ],\n            /* Optional string that is the default binary picked by cargo run. */\n            \"default_run\": null,\n            /* Optional string that is the minimum supported rust version */\n            \"rust_version\": \"1.56\",\n            /* Array of keywords from the manifest. */\n            \"keywords\": [\n                \"cli\"\n            ],\n            /* The readme value from the manifest or null if not specified. */\n            \"readme\": \"README.md\",\n            /* The repository value from the manifest or null if not specified. */\n            \"repository\": \"https://github.com/rust-lang/cargo\",\n            /* The homepage value from the manifest or null if not specified. */\n            \"homepage\": \"https://rust-lang.org\",\n            /* The documentation value from the manifest or null if not specified. */\n            \"documentation\": \"https://doc.rust-lang.org/stable/std\",\n            /* The default edition of the package.\n               Note that individual targets may have different editions.\n            */\n            \"edition\": \"2018\",\n            /* Optional string that is the name of a native library the package\n               is linking to.\n            */\n            \"links\": null,\n        }\n    ],\n    /* Array of members of the workspace.\n       Each entry is the Package ID for the package.\n    */\n    \"workspace_members\": [\n        \"file:///path/to/my-package#0.1.0\",\n    ],\n    /* Array of default members of the workspace.\n       Each entry is the Package ID for the package.\n    */\n    \"workspace_default_members\": [\n        \"file:///path/to/my-package#0.1.0\",\n    ],\n    // The resolved dependency graph for the entire workspace. The enabled\n    // features are based on the enabled features for the \"current\" package.\n    // Inactivated optional dependencies are not listed.\n    //\n    // This is null if --no-deps is specified.\n    //\n    // By default, this includes all dependencies for all target platforms.\n    // The `--filter-platform` flag may be used to narrow to a specific\n    // target tuple.\n    \"resolve\": {\n        /* Array of nodes within the dependency graph.\n           Each node is a package.\n        */\n        \"nodes\": [\n            {\n                /* The Package ID of this node. */\n                \"id\": \"file:///path/to/my-package#0.1.0\",\n                /* The dependencies of this package, an array of Package IDs. */\n                \"dependencies\": [\n                    \"https://github.com/rust-lang/crates.io-index#bitflags@1.0.4\"\n                ],\n                /* The dependencies of this package. This is an alternative to\n                   \"dependencies\" which contains additional information. In\n                   particular, this handles renamed dependencies.\n                */\n                \"deps\": [\n                    {\n                        /* The name of the dependency's library target.\n                           If this is a renamed dependency, this is the new\n                           name.\n                        */\n                        \"name\": \"bitflags\",\n                        /* The Package ID of the dependency. */\n                        \"pkg\": \"https://github.com/rust-lang/crates.io-index#bitflags@1.0.4\"\n                        /* Array of dependency kinds. Added in Cargo 1.40. */\n                        \"dep_kinds\": [\n                            {\n                                /* The dependency kind.\n                                   \"dev\", \"build\", or null for a normal dependency.\n                                */\n                                \"kind\": null,\n                                /* The target platform for the dependency.\n                                   null if not a target dependency.\n                                */\n                                \"target\": \"cfg(windows)\"\n                            }\n                        ]\n                    }\n                ],\n                /* Array of features enabled on this package. */\n                \"features\": [\n                    \"default\"\n                ]\n            }\n        ],\n        /* The package in the current working directory (if --manifest-path is not given).\n           This is null if there is a virtual workspace. Otherwise it is\n           the Package ID of the package.\n        */\n        \"root\": \"file:///path/to/my-package#0.1.0\",\n    },\n    /* The absolute path to the target directory where Cargo places its output. */\n    \"target_directory\": \"/path/to/my-package/target\",\n    /* The absolute path to the build directory where Cargo places intermediate build artifacts. (unstable) */\n    \"build_directory\": \"/path/to/my-package/build-dir\",\n    /* The version of the schema for this metadata structure.\n       This will be changed if incompatible changes are ever made.\n    */\n    \"version\": 1,\n    /* The absolute path to the root of the workspace. */\n    \"workspace_root\": \"/path/to/my-package\"\n    /* Workspace metadata.\n       This is null if no metadata is specified. */\n    \"metadata\": {\n        \"docs\": {\n            \"rs\": {\n                \"all-features\": true\n            }\n        }\n    }\n}\n````\n\nNotes:\n- For `\"id\"` field syntax, see [Package ID Specifications] in the reference.\n\n## OPTIONS\n\n### Output Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---no-deps\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---no-deps\"><code>--no-deps</code></a></dt>\n<dd class=\"option-desc\"><p>Output information only about the workspace members and don’t fetch\ndependencies.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---format-version\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---format-version\"><code>--format-version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the version of the output format to use. Currently <code>1</code> is the only\npossible value.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---filter-platform\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---filter-platform\"><code>--filter-platform</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>This filters the <code>resolve</code> output to only include dependencies for the\ngiven <a href=\"../appendix/glossary.html#target\">target tuple</a>.\nA literal <code>\"host-tuple\"</code> can be used, which will internally be substituted by the host’s target.\nWithout this flag, the resolve includes all targets.</p>\n<p>Note that the dependencies listed in the “packages” array still includes all\ndependencies. Each package definition is intended to be an unaltered\nreproduction of the information within <code>Cargo.toml</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--F\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-metadata--v\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--q\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---color\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-metadata---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---locked\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---offline\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-metadata-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---config\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--C\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--h\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---help\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--Z\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Output JSON about the current package:\n\n       cargo metadata --format-version=1\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-pkgid(1)](cargo-pkgid.html), [Package ID Specifications], [JSON messages]\n\n[Package ID Specifications]: ../reference/pkgid-spec.html\n[JSON messages]: ../reference/external-tools.html#json-messages\n","doc/book/src/commands/cargo-miri.md":"# cargo-miri(1)\n\n## NAME\n\ncargo-miri --- Runs binary crates and tests in Miri\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nThis command is only available on the [nightly](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) channel.\n\nFor information about usage and installation,\nsee <https://github.com/rust-lang/miri>.\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-run(1)](cargo-run.md),\n[cargo-test(1)](cargo-test.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n","doc/book/src/commands/cargo-new.md":"# cargo-new(1)\n\n## NAME\n\ncargo-new --- Create a new Cargo package\n\n## SYNOPSIS\n\n`cargo new` [_options_] _path_\n\n## DESCRIPTION\n\nThis command will create a new Cargo package in the given directory. This\nincludes a simple template with a `Cargo.toml` manifest, sample source file,\nand a VCS ignore file. If the directory is not already in a VCS repository,\nthen a new repository is created (see `--vcs` below).\n\nSee [cargo-init(1)](cargo-init.html) for a similar command which will create a new manifest\nin an existing directory.\n\n## OPTIONS\n\n### New Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-new---bin\"><a class=\"option-anchor\" href=\"#option-cargo-new---bin\"><code>--bin</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a binary target (<code>src/main.rs</code>).\nThis is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---lib\"><a class=\"option-anchor\" href=\"#option-cargo-new---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a library target (<code>src/lib.rs</code>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---edition\"><a class=\"option-anchor\" href=\"#option-cargo-new---edition\"><code>--edition</code> <em>edition</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the Rust edition to use. Default is 2024.\nPossible values: 2015, 2018, 2021, 2024</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---name\"><a class=\"option-anchor\" href=\"#option-cargo-new---name\"><code>--name</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Set the package name. Defaults to the directory name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---vcs\"><a class=\"option-anchor\" href=\"#option-cargo-new---vcs\"><code>--vcs</code> <em>vcs</em></a></dt>\n<dd class=\"option-desc\"><p>Initialize a new VCS repository for the given version control system (git,\nhg, pijul, or fossil) or do not initialize any version control at all\n(none). If not specified, defaults to <code>git</code> or the configuration value\n<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---registry\"><a class=\"option-anchor\" href=\"#option-cargo-new---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name\nwhich will restrict publishing only to that registry.</p>\n<p>Registry names are defined in <a href=\"../reference/config.html\">Cargo config files</a>.\nIf not specified, the default registry defined by the <code>registry.default</code>\nconfig key is used. If the default registry is not set and <code>--registry</code> is not\nused, the <code>publish</code> field will not be set which means that publishing will not\nbe restricted.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-new--v\"><a class=\"option-anchor\" href=\"#option-cargo-new--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-new---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--q\"><a class=\"option-anchor\" href=\"#option-cargo-new--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-new---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---color\"><a class=\"option-anchor\" href=\"#option-cargo-new---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-new-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-new-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---config\"><a class=\"option-anchor\" href=\"#option-cargo-new---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--C\"><a class=\"option-anchor\" href=\"#option-cargo-new--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--h\"><a class=\"option-anchor\" href=\"#option-cargo-new--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---help\"><a class=\"option-anchor\" href=\"#option-cargo-new---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--Z\"><a class=\"option-anchor\" href=\"#option-cargo-new--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a binary Cargo package in the given directory:\n\n       cargo new foo\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-init(1)](cargo-init.html)\n","doc/book/src/commands/cargo-owner.md":"# cargo-owner(1)\n\n## NAME\n\ncargo-owner --- Manage the owners of a crate on the registry\n\n## SYNOPSIS\n\n`cargo owner` [_options_] `--add` _login_ [_crate_]\\\n`cargo owner` [_options_] `--remove` _login_ [_crate_]\\\n`cargo owner` [_options_] `--list` [_crate_]\n\n## DESCRIPTION\n\nThis command will modify the owners for a crate on the registry. Owners of a\ncrate can upload new versions and yank old versions. Non-team owners can also\nmodify the set of owners, so take care!\n\nThis command requires you to be authenticated with either the `--token` option\nor using [cargo-login(1)](cargo-login.html).\n\nIf the crate name is not specified, it will use the package name from the\ncurrent directory.\n\nSee [the reference](../reference/publishing.html#cargo-owner) for more\ninformation about owners and publishing.\n\n## OPTIONS\n\n### Owner Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-owner--a\"><a class=\"option-anchor\" href=\"#option-cargo-owner--a\"><code>-a</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---add\"><a class=\"option-anchor\" href=\"#option-cargo-owner---add\"><code>--add</code> <em>login</em>…</a></dt>\n<dd class=\"option-desc\"><p>Invite the given user or team as an owner.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--r\"><a class=\"option-anchor\" href=\"#option-cargo-owner--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---remove\"><a class=\"option-anchor\" href=\"#option-cargo-owner---remove\"><code>--remove</code> <em>login</em>…</a></dt>\n<dd class=\"option-desc\"><p>Remove the given user or team as an owner.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--l\"><a class=\"option-anchor\" href=\"#option-cargo-owner--l\"><code>-l</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---list\"><a class=\"option-anchor\" href=\"#option-cargo-owner---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List owners of a crate.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---token\"><a class=\"option-anchor\" href=\"#option-cargo-owner---token\"><code>--token</code> <em>token</em></a></dt>\n<dd class=\"option-desc\"><p>API token to use when authenticating. This overrides the token stored in\nthe credentials file (which is created by <a href=\"cargo-login.html\">cargo-login(1)</a>).</p>\n<p><a href=\"../reference/config.html\">Cargo config</a> environment variables can be\nused to override the tokens stored in the credentials file. The token for\ncrates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment\nvariable. Tokens for other registries may be specified with environment\nvariables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name\nof the registry in all capital letters.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---index\"><a class=\"option-anchor\" href=\"#option-cargo-owner---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---registry\"><a class=\"option-anchor\" href=\"#option-cargo-owner---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-owner--v\"><a class=\"option-anchor\" href=\"#option-cargo-owner--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-owner---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--q\"><a class=\"option-anchor\" href=\"#option-cargo-owner--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-owner---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---color\"><a class=\"option-anchor\" href=\"#option-cargo-owner---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-owner-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-owner-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---config\"><a class=\"option-anchor\" href=\"#option-cargo-owner---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--C\"><a class=\"option-anchor\" href=\"#option-cargo-owner--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--h\"><a class=\"option-anchor\" href=\"#option-cargo-owner--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---help\"><a class=\"option-anchor\" href=\"#option-cargo-owner---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--Z\"><a class=\"option-anchor\" href=\"#option-cargo-owner--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. List owners of a package:\n\n       cargo owner --list foo\n\n2. Invite an owner to a package:\n\n       cargo owner --add username foo\n\n3. Remove an owner from a package:\n\n       cargo owner --remove username foo\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-package.md":"# cargo-package(1)\n## NAME\n\ncargo-package --- Assemble the local package into a distributable tarball\n\n## SYNOPSIS\n\n`cargo package` [_options_]\n\n## DESCRIPTION\n\nThis command will create a distributable, compressed `.crate` file with the\nsource code of the package in the current directory. The resulting file will be\nstored in the `target/package` directory. This performs the following steps:\n\n1. Load and check the current workspace, performing some basic checks.\n    - Path dependencies are not allowed unless they have a version key. Cargo\n      will ignore the path key for dependencies in published packages.\n      `dev-dependencies` do not have this restriction.\n2. Create the compressed `.crate` file.\n    - The original `Cargo.toml` file is rewritten and normalized.\n    - `[patch]`, `[replace]`, and `[workspace]` sections are removed from the\n      manifest.\n    - `Cargo.lock` is always included. When missing, a new lock file will be\n      generated unless the `--exclude-lockfile` flag is used. [cargo-install(1)](cargo-install.html)\n      will use the packaged lock file if the `--locked` flag is used.\n    - A `.cargo_vcs_info.json` file is included that contains information\n      about the current VCS checkout hash if available, as well as a flag if the\n      worktree is dirty.\n    - Symlinks are flattened to their target files.\n    - Files and directories are included or excluded based on rules mentioned in\n      [the `[include]` and `[exclude]` fields](../reference/manifest.html#the-exclude-and-include-fields).\n\n3. Extract the `.crate` file and build it to verify it can build.\n    - This will rebuild your package from scratch to ensure that it can be\n      built from a pristine state. The `--no-verify` flag can be used to skip\n      this step.\n4. Check that build scripts did not modify any source files.\n\nThe list of files included can be controlled with the `include` and `exclude`\nfields in the manifest.\n\nSee [the reference](../reference/publishing.html) for more details about\npackaging and publishing.\n\n### .cargo_vcs_info.json format\n\nWill generate a `.cargo_vcs_info.json` in the following format\n\n```javascript\n{\n \"git\": {\n   \"sha1\": \"aac20b6e7e543e6dd4118b246c77225e3a3a1302\",\n   \"dirty\": true\n },\n \"path_in_vcs\": \"\"\n}\n```\n\n`dirty` indicates that the Git worktree was dirty when the package\nwas built.\n\n`path_in_vcs` will be set to a repo-relative path for packages\nin subdirectories of the version control repository.\n\nThe compatibility of this file is maintained under the same policy\nas the JSON output of [cargo-metadata(1)](cargo-metadata.html).\n\nNote that this file provides a best-effort snapshot of the VCS information.\nHowever, the provenance of the package is not verified.\nThere is no guarantee that the source code in the tarball matches the VCS information.\n\n## OPTIONS\n\n### Package Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--l\"><a class=\"option-anchor\" href=\"#option-cargo-package--l\"><code>-l</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---list\"><a class=\"option-anchor\" href=\"#option-cargo-package---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>Print files included in a package without making one.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-verify\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-verify\"><code>--no-verify</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t verify the contents by building them.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-metadata\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-metadata\"><code>--no-metadata</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore warnings about a lack of human-usable metadata (such as the description\nor the license).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-package---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Allow working directories with uncommitted VCS changes to be packaged.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---exclude-lockfile\"><a class=\"option-anchor\" href=\"#option-cargo-package---exclude-lockfile\"><code>--exclude-lockfile</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t include the lock file when packaging.</p>\n<p>This flag is not for general use.\nSome tools may expect a lock file to be present (e.g. <code>cargo install --locked</code>).\nConsider other options before using this.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---index\"><a class=\"option-anchor\" href=\"#option-cargo-package---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---registry\"><a class=\"option-anchor\" href=\"#option-cargo-package---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to package for; see <code>cargo publish --help</code> for more details\nabout configuration of registry names. The packages will not be published\nto this registry, but if we are packaging multiple inter-dependent crates,\nlock-files will be generated under the assumption that dependencies will be\npublished to this registry.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-package---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>Specifies the output message format.\nCurrently, it only works with <code>--list</code> and affects the file listing format.\nThis is unstable and requires <code>-Zunstable-options</code>.\nValid output formats:</p>\n<ul>\n<li><code>human</code> (default): Display in a file-per-line format.</li>\n<li><code>json</code>: Emit machine-readable JSON information about each package.\nOne package per JSON line (Newline delimited JSON).\n<pre><code class=\"language-javascript\">{\n  /* The Package ID Spec of the package. */\n  \"id\": \"path+file:///home/foo#0.0.0\",\n  /* Files of this package */\n  \"files\" {\n    /* Relative path in the archive file. */\n    \"Cargo.toml.orig\": {\n      /* Where the file is from.\n         - \"generate\" for file being generated during packaging\n         - \"copy\" for file being copied from another location.\n      */\n      \"kind\": \"copy\",\n      /* For the \"copy\" kind,\n         it is an absolute path to the actual file content.\n         For the \"generate\" kind,\n         it is the original file the generated one is based on.\n      */\n      \"path\": \"/home/foo/Cargo.toml\"\n    },\n    \"Cargo.toml\": {\n      \"kind\": \"generate\",\n      \"path\": \"/home/foo/Cargo.toml\"\n    },\n    \"src/main.rs\": {\n      \"kind\": \"copy\",\n      \"path\": \"/home/foo/src/main.rs\"\n    }\n  }\n}\n</code></pre>\n</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--p\"><a class=\"option-anchor\" href=\"#option-cargo-package--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---package\"><a class=\"option-anchor\" href=\"#option-cargo-package---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-package---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Package all members in the workspace.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-package---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package---target\"><a class=\"option-anchor\" href=\"#option-cargo-package---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Package for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-package---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--F\"><a class=\"option-anchor\" href=\"#option-cargo-package--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---features\"><a class=\"option-anchor\" href=\"#option-cargo-package---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-package---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-package---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---locked\"><a class=\"option-anchor\" href=\"#option-cargo-package---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---offline\"><a class=\"option-anchor\" href=\"#option-cargo-package---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-package---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-package--j\"><a class=\"option-anchor\" href=\"#option-cargo-package--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-package---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-package---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-package---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo package -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo package -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-package--v\"><a class=\"option-anchor\" href=\"#option-cargo-package--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-package---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--q\"><a class=\"option-anchor\" href=\"#option-cargo-package--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-package---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---color\"><a class=\"option-anchor\" href=\"#option-cargo-package---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-package-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---config\"><a class=\"option-anchor\" href=\"#option-cargo-package---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--C\"><a class=\"option-anchor\" href=\"#option-cargo-package--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--h\"><a class=\"option-anchor\" href=\"#option-cargo-package--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---help\"><a class=\"option-anchor\" href=\"#option-cargo-package---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--Z\"><a class=\"option-anchor\" href=\"#option-cargo-package--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a compressed `.crate` file of the current package:\n\n       cargo package\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-pkgid.md":"# cargo-pkgid(1)\n\n## NAME\n\ncargo-pkgid --- Print a fully qualified package specification\n\n## SYNOPSIS\n\n`cargo pkgid` [_options_] [_spec_]\n\n## DESCRIPTION\n\nGiven a _spec_ argument, print out the fully qualified package ID specifier\nfor a package or dependency in the current workspace. This command will\ngenerate an error if _spec_ is ambiguous as to which package it refers to in\nthe dependency graph. If no _spec_ is given, then the specifier for the local\npackage is printed.\n\nThis command requires that a lockfile is available and dependencies have been\nfetched.\n\nA package specifier consists of a name, version, and source URL. You are\nallowed to use partial specifiers to succinctly match a specific package as\nlong as it matches only one package. This specifier is also used by other parts\nin Cargo, such as [cargo-metadata(1)](cargo-metadata.html) and [JSON messages] emitted by Cargo.\n\nThe format of a _spec_ can be one of the following:\n\nSPEC Structure             | Example SPEC\n---------------------------|--------------\n_name_                     | `bitflags`\n_name_`@`_version_         | `bitflags@1.0.4`\n_url_                      | `https://github.com/rust-lang/cargo`\n_url_`#`_version_          | `https://github.com/rust-lang/cargo#0.33.0`\n_url_`#`_name_             | `https://github.com/rust-lang/crates.io-index#bitflags`\n_url_`#`_name_`@`_version_ | `https://github.com/rust-lang/cargo#crates-io@0.21.0`\n\nThe specification grammar can be found in chapter [Package ID Specifications].\n\n## OPTIONS\n\n### Package Selection\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--p\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---package\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Get the package ID for the given package instead of the current package.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-pkgid--v\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--q\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---color\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---locked\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---offline\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---config\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--C\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--h\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---help\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--Z\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Retrieve package specification for `foo` package:\n\n       cargo pkgid foo\n\n2. Retrieve package specification for version 1.0.0 of `foo`:\n\n       cargo pkgid foo@1.0.0\n\n3. Retrieve package specification for `foo` from crates.io:\n\n       cargo pkgid https://github.com/rust-lang/crates.io-index#foo\n\n4. Retrieve package specification for `foo` from a local package:\n\n       cargo pkgid file:///path/to/local/package#foo\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html), [cargo-metadata(1)](cargo-metadata.html),\n[Package ID Specifications], [JSON messages]\n\n[Package ID Specifications]: ../reference/pkgid-spec.html\n[JSON messages]: ../reference/external-tools.html#json-messages\n","doc/book/src/commands/cargo-publish.md":"# cargo-publish(1)\n## NAME\n\ncargo-publish --- Upload a package to the registry\n\n## SYNOPSIS\n\n`cargo publish` [_options_]\n\n## DESCRIPTION\n\nThis command will create a distributable, compressed `.crate` file with the\nsource code of the package in the current directory and upload it to a\nregistry. The default registry is <https://crates.io>. This performs the\nfollowing steps:\n\n1. Performs a few checks, including:\n   - Checks the `package.publish` key in the manifest for restrictions on\n     which registries you are allowed to publish to.\n2. Create a `.crate` file by following the steps in [cargo-package(1)](cargo-package.html).\n3. Upload the crate to the registry. The server will perform additional\n   checks on the crate. \n4. The client will poll waiting for the package to appear in the index,\n   and may timeout. In that case, you will need to check for completion\n   manually. This timeout does not affect the upload.\n\nThis command requires you to be authenticated using [cargo-login(1)](cargo-login.html)\nor environment variables of the [`registry.token`](../reference/config.html#registrytoken)\nand [`registries.<name>.token`](../reference/config.html#registriesnametoken) config fields.\n\nSee [the reference](../reference/publishing.html) for more details about\npackaging and publishing.\n\n## OPTIONS\n\n### Publish Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-publish---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Perform all checks without uploading.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---no-verify\"><a class=\"option-anchor\" href=\"#option-cargo-publish---no-verify\"><code>--no-verify</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t verify the contents by building them.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-publish---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Allow working directories with uncommitted VCS changes to be packaged.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---index\"><a class=\"option-anchor\" href=\"#option-cargo-publish---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---registry\"><a class=\"option-anchor\" href=\"#option-cargo-publish---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to publish to. Registry names are defined in <a href=\"../reference/config.html\">Cargo\nconfig files</a>. If not specified, and there is a\n<a href=\"../reference/manifest.html#the-publish-field\"><code>package.publish</code></a> field in\n<code>Cargo.toml</code> with a single registry, then it will publish to that registry.\nOtherwise it will use the default registry, which is defined by the\n<a href=\"../reference/config.html#registrydefault\"><code>registry.default</code></a> config key\nwhich defaults to <code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish--p\"><a class=\"option-anchor\" href=\"#option-cargo-publish--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---package\"><a class=\"option-anchor\" href=\"#option-cargo-publish---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Publish only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-publish---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Publish all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---all\"><a class=\"option-anchor\" href=\"#option-cargo-publish---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-publish---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---target\"><a class=\"option-anchor\" href=\"#option-cargo-publish---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Publish for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-publish---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish--F\"><a class=\"option-anchor\" href=\"#option-cargo-publish--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-publish---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---locked\"><a class=\"option-anchor\" href=\"#option-cargo-publish---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---offline\"><a class=\"option-anchor\" href=\"#option-cargo-publish---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-publish---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-publish--j\"><a class=\"option-anchor\" href=\"#option-cargo-publish--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-publish---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-publish---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo publish -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo publish -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-publish--v\"><a class=\"option-anchor\" href=\"#option-cargo-publish--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-publish---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--q\"><a class=\"option-anchor\" href=\"#option-cargo-publish--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-publish---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---color\"><a class=\"option-anchor\" href=\"#option-cargo-publish---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-publish-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---config\"><a class=\"option-anchor\" href=\"#option-cargo-publish---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--C\"><a class=\"option-anchor\" href=\"#option-cargo-publish--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--h\"><a class=\"option-anchor\" href=\"#option-cargo-publish--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---help\"><a class=\"option-anchor\" href=\"#option-cargo-publish---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--Z\"><a class=\"option-anchor\" href=\"#option-cargo-publish--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Publish the current package:\n\n       cargo publish\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-package(1)](cargo-package.html), [cargo-login(1)](cargo-login.html)\n","doc/book/src/commands/cargo-remove.md":"# cargo-remove(1)\n## NAME\n\ncargo-remove --- Remove dependencies from a Cargo.toml manifest file\n\n## SYNOPSIS\n\n`cargo remove` [_options_] _dependency_...\n\n## DESCRIPTION\n\nRemove one or more dependencies from a `Cargo.toml` manifest.\n\n## OPTIONS\n\n### Section options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove---dev\"><a class=\"option-anchor\" href=\"#option-cargo-remove---dev\"><code>--dev</code></a></dt>\n<dd class=\"option-desc\"><p>Remove as a <a href=\"../reference/specifying-dependencies.html#development-dependencies\">development dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---build\"><a class=\"option-anchor\" href=\"#option-cargo-remove---build\"><code>--build</code></a></dt>\n<dd class=\"option-desc\"><p>Remove as a <a href=\"../reference/specifying-dependencies.html#build-dependencies\">build dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---target\"><a class=\"option-anchor\" href=\"#option-cargo-remove---target\"><code>--target</code> <em>target</em></a></dt>\n<dd class=\"option-desc\"><p>Remove as a dependency to the <a href=\"../reference/specifying-dependencies.html#platform-specific-dependencies\">given target platform</a>.</p>\n<p>To avoid unexpected shell expansions, you may use quotes around each target, e.g., <code>--target 'cfg(unix)'</code>.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-remove---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t actually write to the manifest.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-remove--v\"><a class=\"option-anchor\" href=\"#option-cargo-remove--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-remove---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--q\"><a class=\"option-anchor\" href=\"#option-cargo-remove--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-remove---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---color\"><a class=\"option-anchor\" href=\"#option-cargo-remove---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-remove---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-remove---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---locked\"><a class=\"option-anchor\" href=\"#option-cargo-remove---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---offline\"><a class=\"option-anchor\" href=\"#option-cargo-remove---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-remove---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove--p\"><a class=\"option-anchor\" href=\"#option-cargo-remove--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---package\"><a class=\"option-anchor\" href=\"#option-cargo-remove---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package to remove from.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-remove-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---config\"><a class=\"option-anchor\" href=\"#option-cargo-remove---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--C\"><a class=\"option-anchor\" href=\"#option-cargo-remove--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--h\"><a class=\"option-anchor\" href=\"#option-cargo-remove--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---help\"><a class=\"option-anchor\" href=\"#option-cargo-remove---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--Z\"><a class=\"option-anchor\" href=\"#option-cargo-remove--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove `regex` as a dependency\n\n       cargo remove regex\n\n2. Remove `trybuild` as a dev-dependency\n\n       cargo remove --dev trybuild\n\n3. Remove `nom` from the `wasm32-unknown-unknown` dependencies table\n\n       cargo remove --target wasm32-unknown-unknown nom\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-add(1)](cargo-add.html)\n","doc/book/src/commands/cargo-report-future-incompatibilities.md":"# cargo-report-future-incompatibilities(1)\n## NAME\n\ncargo-report-future-incompatibilities --- Reports any crates which will eventually stop compiling\n\n## SYNOPSIS\n\n`cargo report future-incompatibilities` [_options_]\n\n## DESCRIPTION\n\nDisplays a report of future-incompatible warnings that were emitted during\nprevious builds.\nThese are warnings for changes that may become hard errors in the future,\ncausing dependencies to stop building in a future version of rustc.\n\nFor more, see the chapter on [Future incompat report](../reference/future-incompat-report.html).\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---id\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---id\"><code>--id</code> <em>id</em></a></dt>\n<dd class=\"option-desc\"><p>Show the report with the specified Cargo-generated id.\nIf not specified, shows the most recent report.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--p\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---package\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to display a report for. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--v\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--q\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---color\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---locked\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---offline\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---config\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--C\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--h\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---help\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--Z\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the latest future-incompat report:\n\n       cargo report future-incompat\n\n2. Display the latest future-incompat report for a specific package:\n\n       cargo report future-incompat --package my-dep@0.0.1\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-report(1)](cargo-report.html), [cargo-build(1)](cargo-build.html)\n","doc/book/src/commands/cargo-report.md":"# cargo-report(1)\n\n## NAME\n\ncargo-report --- Generate and display various kinds of reports\n\n## SYNOPSIS\n\n`cargo report` _type_ [_options_]\n\n## DESCRIPTION\n\nDisplays a report of the given _type_ --- currently, only `future-incompat` is supported\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report--v\"><a class=\"option-anchor\" href=\"#option-cargo-report--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-report---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--q\"><a class=\"option-anchor\" href=\"#option-cargo-report--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-report---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---color\"><a class=\"option-anchor\" href=\"#option-cargo-report---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report---locked\"><a class=\"option-anchor\" href=\"#option-cargo-report---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---offline\"><a class=\"option-anchor\" href=\"#option-cargo-report---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-report---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-report-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---config\"><a class=\"option-anchor\" href=\"#option-cargo-report---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--C\"><a class=\"option-anchor\" href=\"#option-cargo-report--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--h\"><a class=\"option-anchor\" href=\"#option-cargo-report--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---help\"><a class=\"option-anchor\" href=\"#option-cargo-report---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--Z\"><a class=\"option-anchor\" href=\"#option-cargo-report--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the available kinds of reports:\n\n       cargo report --help\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-report-future-incompatibilities(1)](cargo-report-future-incompatibilities.html)\n","doc/book/src/commands/cargo-run.md":"# cargo-run(1)\n## NAME\n\ncargo-run --- Run the current package\n\n## SYNOPSIS\n\n`cargo run` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nRun a binary or example of the local package.\n\nAll the arguments following the two dashes (`--`) are passed to the binary to\nrun. If you're passing arguments to both Cargo and the binary, the ones after\n`--` go to the binary, the ones before go to Cargo.\n\nUnlike [cargo-test(1)](cargo-test.html) and [cargo-bench(1)](cargo-bench.html), `cargo run` sets the \nworking directory of the binary executed to the current working directory, same \nas if it was executed in the shell directly.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--p\"><a class=\"option-anchor\" href=\"#option-cargo-run--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---package\"><a class=\"option-anchor\" href=\"#option-cargo-run---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to run. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo run` will run the binary\ntarget. If there are multiple binary targets, you must pass a target flag to\nchoose one. Or, the `default-run` field may be specified in the `[package]`\nsection of `Cargo.toml` to choose the name of the binary to run by default.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---bin\"><a class=\"option-anchor\" href=\"#option-cargo-run---bin\"><code>--bin</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run the specified binary.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---example\"><a class=\"option-anchor\" href=\"#option-cargo-run---example\"><code>--example</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run the specified example.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--F\"><a class=\"option-anchor\" href=\"#option-cargo-run--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---features\"><a class=\"option-anchor\" href=\"#option-cargo-run---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-run---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-run---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---target\"><a class=\"option-anchor\" href=\"#option-cargo-run---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Run for the specified target architecture. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--r\"><a class=\"option-anchor\" href=\"#option-cargo-run--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---release\"><a class=\"option-anchor\" href=\"#option-cargo-run---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Run optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---profile\"><a class=\"option-anchor\" href=\"#option-cargo-run---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---timings\"><a class=\"option-anchor\" href=\"#option-cargo-run---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-run---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-run---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--v\"><a class=\"option-anchor\" href=\"#option-cargo-run--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-run---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--q\"><a class=\"option-anchor\" href=\"#option-cargo-run--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-run---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---color\"><a class=\"option-anchor\" href=\"#option-cargo-run---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-run---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-run---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-run---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---locked\"><a class=\"option-anchor\" href=\"#option-cargo-run---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---offline\"><a class=\"option-anchor\" href=\"#option-cargo-run---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-run---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-run-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---config\"><a class=\"option-anchor\" href=\"#option-cargo-run---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--C\"><a class=\"option-anchor\" href=\"#option-cargo-run--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--h\"><a class=\"option-anchor\" href=\"#option-cargo-run--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---help\"><a class=\"option-anchor\" href=\"#option-cargo-run---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--Z\"><a class=\"option-anchor\" href=\"#option-cargo-run--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-run--j\"><a class=\"option-anchor\" href=\"#option-cargo-run--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-run---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-run---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-run---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo run -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo run -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package and run its main target (assuming only one binary):\n\n       cargo run\n\n2. Run an example with extra arguments:\n\n       cargo run --example exname -- --exoption exarg1 exarg2\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n","doc/book/src/commands/cargo-rustc.md":"# cargo-rustc(1)\n## NAME\n\ncargo-rustc --- Compile the current package, and pass extra options to the compiler\n\n## SYNOPSIS\n\n`cargo rustc` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThe specified target for the current package (or package specified by `-p` if\nprovided) will be compiled along with all of its dependencies. The specified\n_args_ will all be passed to the final compiler invocation, not any of the\ndependencies. Note that the compiler will still unconditionally receive\narguments such as `-L`, `--extern`, and `--crate-type`, and the specified\n_args_ will simply be added to the compiler invocation.\n\nSee <https://doc.rust-lang.org/rustc/index.html> for documentation on rustc\nflags.\n\nThis command requires that only one target is being compiled when additional\narguments are provided. If more than one target is available for the current\npackage the filters of `--lib`, `--bin`, etc, must be used to select which\ntarget is compiled.\n\nTo pass flags to all compiler processes spawned by Cargo, use the `RUSTFLAGS`\n[environment variable](../reference/environment-variables.html) or the\n`build.rustflags` [config value](../reference/config.html).\n\n## OPTIONS\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--p\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---package\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to build. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo rustc` will build all\nbinary and library targets of the selected package.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to build. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will build only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Build the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Build all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---example\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Build all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---test\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---tests\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---bench\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---benches\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--F\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---features\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---target\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--r\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---release\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Build optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Build with the given profile.</p>\n<p>The <code>rustc</code> subcommand will treat the following named profiles with special behaviors:</p>\n<ul>\n<li><code>check</code> — Builds in the same way as the <a href=\"cargo-check.html\">cargo-check(1)</a> command with\nthe <code>dev</code> profile.</li>\n<li><code>test</code> — Builds in the same way as the <a href=\"cargo-test.html\">cargo-test(1)</a> command,\nenabling building in test mode which will enable tests and enable the <code>test</code>\ncfg option. See <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc\ntests</a> for more detail.</li>\n<li><code>bench</code> — Builds in the same was as the <a href=\"cargo-bench.html\">cargo-bench(1)</a> command,\nsimilar to the <code>test</code> profile.</li>\n</ul>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---crate-type\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---crate-type\"><code>--crate-type</code> <em>crate-type</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the given crate type. This flag accepts a comma-separated list of\n1 or more crate types, of which the allowed values are the same as <code>crate-type</code>\nfield in the manifest for configuring a Cargo target. See\n<a href=\"../reference/cargo-targets.html#the-crate-type-field\"><code>crate-type</code> field</a>\nfor possible values.</p>\n<p>If the manifest contains a list, and <code>--crate-type</code> is provided,\nthe command-line argument value will override what is in the manifest.</p>\n<p>This flag only works when building a <code>lib</code> or <code>example</code> library target.</p>\n</dd>\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--v\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--q\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---color\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-rustc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---config\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--C\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--h\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---help\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustc--j\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo rustc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo rustc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Check if your package (not including dependencies) uses unsafe code:\n\n       cargo rustc --lib -- -D unsafe-code\n\n2. Try an experimental flag on the nightly compiler, such as this which prints\n   the size of every type:\n\n       cargo rustc --lib -- -Z print-type-sizes\n\n3. Override `crate-type` field in Cargo.toml with command-line option:\n\n       cargo rustc --lib --crate-type lib,cdylib\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html), [rustc(1)](https://doc.rust-lang.org/rustc/index.html)\n","doc/book/src/commands/cargo-rustdoc.md":"# cargo-rustdoc(1)\n## NAME\n\ncargo-rustdoc --- Build a package's documentation, using specified custom flags\n\n## SYNOPSIS\n\n`cargo rustdoc` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThe specified target for the current package (or package specified by `-p` if\nprovided) will be documented with the specified _args_ being passed to the\nfinal rustdoc invocation. Dependencies will not be documented as part of this\ncommand. Note that rustdoc will still unconditionally receive arguments such\nas `-L`, `--extern`, and `--crate-type`, and the specified _args_ will simply\nbe added to the rustdoc invocation.\n\nSee <https://doc.rust-lang.org/rustdoc/index.html> for documentation on rustdoc\nflags.\n\nThis command requires that only one target is being compiled when additional\narguments are provided. If more than one target is available for the current\npackage the filters of `--lib`, `--bin`, etc, must be used to select which\ntarget is compiled.\n\nTo pass flags to all rustdoc processes spawned by Cargo, use the\n`RUSTDOCFLAGS` [environment variable](../reference/environment-variables.html)\nor the `build.rustdocflags` [config value](../reference/config.html).\n\n## OPTIONS\n\n### Documentation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---open\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---open\"><code>--open</code></a></dt>\n<dd class=\"option-desc\"><p>Open the docs in a browser after building them. This will use your default\nbrowser unless you define another one in the <code>BROWSER</code> environment variable\nor use the <a href=\"../reference/config.html#docbrowser\"><code>doc.browser</code></a> configuration\noption.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--p\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---package\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to document. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo rustdoc` will document all\nbinary and library targets of the selected package. The binary will be skipped\nif its name is the same as the lib target. Binaries are skipped if they have\n`required-features` that are missing.\n\nPassing target selection flags will document only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Document the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Document all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---example\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Document all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---test\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---tests\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Document all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---bench\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---benches\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Document all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Document all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--F\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---features\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---target\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Document for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--r\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---release\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Document optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Document with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--v\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--q\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---color\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---config\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--C\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--h\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---help\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--j\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo rustdoc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo rustdoc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---output-format\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---output-format\"><code>--output-format</code></a></dt>\n<dd class=\"option-desc\"><p>The output type for the documentation emitted. Valid values:</p>\n<ul>\n<li><code>html</code> (default): Emit the documentation in HTML format.</li>\n<li><code>json</code>: Emit the documentation in the <a href=\"https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types\">experimental JSON format</a>.</li>\n</ul>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build documentation with custom CSS included from a given file:\n\n       cargo rustdoc --lib -- --extend-css extra.css\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-doc(1)](cargo-doc.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n","doc/book/src/commands/cargo-search.md":"# cargo-search(1)\n\n## NAME\n\ncargo-search --- Search packages in the registry. Default registry is crates.io\n\n## SYNOPSIS\n\n`cargo search` [_options_] [_query_...]\n\n## DESCRIPTION\n\nThis performs a textual search for crates on <https://crates.io>. The matching\ncrates will be displayed along with their description in TOML format suitable\nfor copying into a `Cargo.toml` manifest.\n\n## OPTIONS\n\n### Search Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-search---limit\"><a class=\"option-anchor\" href=\"#option-cargo-search---limit\"><code>--limit</code> <em>limit</em></a></dt>\n<dd class=\"option-desc\"><p>Limit the number of results (default: 10, max: 100).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---index\"><a class=\"option-anchor\" href=\"#option-cargo-search---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---registry\"><a class=\"option-anchor\" href=\"#option-cargo-search---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-search--v\"><a class=\"option-anchor\" href=\"#option-cargo-search--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-search---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-search---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--q\"><a class=\"option-anchor\" href=\"#option-cargo-search--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-search---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-search---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---color\"><a class=\"option-anchor\" href=\"#option-cargo-search---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-search-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-search-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---config\"><a class=\"option-anchor\" href=\"#option-cargo-search---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--C\"><a class=\"option-anchor\" href=\"#option-cargo-search--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--h\"><a class=\"option-anchor\" href=\"#option-cargo-search--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-search---help\"><a class=\"option-anchor\" href=\"#option-cargo-search---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--Z\"><a class=\"option-anchor\" href=\"#option-cargo-search--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Search for a package from crates.io:\n\n       cargo search serde\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-install(1)](cargo-install.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-test.md":"# cargo-test(1)\n## NAME\n\ncargo-test --- Execute unit and integration tests of a package\n\n## SYNOPSIS\n\n`cargo test` [_options_] [_testname_] [`--` _test-options_]\n\n## DESCRIPTION\n\nCompile and execute unit, integration, and documentation tests.\n\nThe test filtering argument `TESTNAME` and all the arguments following the two\ndashes (`--`) are passed to the test binaries and thus to _libtest_ (rustc's\nbuilt in unit-test and micro-benchmarking framework).  If you're passing\narguments to both Cargo and the binary, the ones after `--` go to the binary,\nthe ones before go to Cargo.  For details about libtest's arguments see the\noutput of `cargo test -- --help` and check out the rustc book's chapter on\nhow tests work at <https://doc.rust-lang.org/rustc/tests/index.html>.\n\nAs an example, this will filter for tests with `foo` in their name and run them\non 3 threads in parallel:\n\n    cargo test foo -- --test-threads 3\n\nTests are built with the `--test` option to `rustc` which creates a special\nexecutable by linking your code with libtest. The executable automatically\nruns all functions annotated with the `#[test]` attribute in multiple threads.\n`#[bench]` annotated functions will also be run with one iteration to verify\nthat they are functional.\n\nIf the package contains multiple test targets, each target compiles to a\nspecial executable as aforementioned, and then is run serially.\n\nThe libtest harness may be disabled by setting `harness = false` in the target\nmanifest settings, in which case your code will need to provide its own `main`\nfunction to handle running tests.\n\nBy default, `cargo test` uses the [`test` profile], which enables\nsome optimizations and disables debugging information for fast feedback. If you need to debug a\ntest, you can use the `--profile=debug` command-line option to switch to\nthe debug profile. You can then run the debug-enabled test within a\ndebugger.\n\n[`test` profile]: ../reference/profiles.html#test\n\n### Documentation tests\n\nDocumentation tests are also run by default, which is handled by `rustdoc`. It\nextracts code samples from documentation comments of the library target, and\nthen executes them.\n\nDifferent from normal test targets, each code block compiles to a doctest\nexecutable on the fly with `rustc`. These executables run in parallel in\nseparate processes. The compilation of a code block is in fact a part of test\nfunction controlled by libtest, so some options such as `--jobs` might not\ntake effect. Note that this execution model of doctests is not guaranteed\nand may change in the future; beware of depending on it.\n\nSee the [rustdoc book](https://doc.rust-lang.org/rustdoc/) for more information\non writing doc tests.\n\n### Working directory of tests\n\nThe working directory when running each unit and integration test is set to the\nroot directory of the package the test belongs to.\nSetting the working directory of tests to the package's root directory makes it\npossible for tests to reliably access the package's files using relative paths,\nregardless from where `cargo test` was executed from.\n\nFor documentation tests, the working directory when invoking `rustdoc` is set to\nthe workspace root directory, and is also the directory `rustdoc` uses as the\ncompilation directory of each documentation test.\nThe working directory when running each documentation test is set to the root\ndirectory of the package the test belongs to, and is controlled via `rustdoc`'s\n`--test-run-directory` option.\n\n## OPTIONS\n\n### Test Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---no-run\"><a class=\"option-anchor\" href=\"#option-cargo-test---no-run\"><code>--no-run</code></a></dt>\n<dd class=\"option-desc\"><p>Compile, but don’t run tests.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---no-fail-fast\"><a class=\"option-anchor\" href=\"#option-cargo-test---no-fail-fast\"><code>--no-fail-fast</code></a></dt>\n<dd class=\"option-desc\"><p>Run all tests regardless of failure. Without this flag, Cargo will exit\nafter the first executable fails. The Rust test harness will run all tests\nwithin the executable to completion, this flag only applies to the executable\nas a whole.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--p\"><a class=\"option-anchor\" href=\"#option-cargo-test--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---package\"><a class=\"option-anchor\" href=\"#option-cargo-test---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-test---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Test all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---all\"><a class=\"option-anchor\" href=\"#option-cargo-test---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-test---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo test` will build the\nfollowing targets of the selected packages:\n\n- lib --- used to link with binaries, examples, integration tests, and doc tests\n- bins (only if integration tests are built and required features are\n  available)\n- examples --- to ensure they compile\n- lib as a unit test\n- bins as unit tests\n- integration tests\n- doc tests for the lib target\n\nThe default behavior can be changed by setting the `test` flag for the target\nin the manifest settings. Setting examples to `test = true` will build and run\nthe example as a test, replacing the example's `main` function with the\nlibtest harness. If you don't want the `main` function replaced, also include\n`harness = false`, in which case the example will be built and executed as-is.\n\nSetting targets to `test = false` will stop them from being tested by default.\nTarget selection options that take a target by name (such as `--example foo`)\nignore the `test` flag and will always test the given target.\n\nDoc tests for libraries may be disabled by setting `doctest = false` for the\nlibrary in the manifest.\n\nSee [Configuring a target](../reference/cargo-targets.html#configuring-a-target)\nfor more information on per-target settings.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to test. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will test only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---lib\"><a class=\"option-anchor\" href=\"#option-cargo-test---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Test the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---bin\"><a class=\"option-anchor\" href=\"#option-cargo-test---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---bins\"><a class=\"option-anchor\" href=\"#option-cargo-test---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Test all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---example\"><a class=\"option-anchor\" href=\"#option-cargo-test---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---examples\"><a class=\"option-anchor\" href=\"#option-cargo-test---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Test all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---test\"><a class=\"option-anchor\" href=\"#option-cargo-test---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---tests\"><a class=\"option-anchor\" href=\"#option-cargo-test---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Test all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---bench\"><a class=\"option-anchor\" href=\"#option-cargo-test---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---benches\"><a class=\"option-anchor\" href=\"#option-cargo-test---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Test all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-test---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Test all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---doc\"><a class=\"option-anchor\" href=\"#option-cargo-test---doc\"><code>--doc</code></a></dt>\n<dd class=\"option-desc\"><p>Test only the library’s documentation. This cannot be mixed with other\ntarget options.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--F\"><a class=\"option-anchor\" href=\"#option-cargo-test--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---features\"><a class=\"option-anchor\" href=\"#option-cargo-test---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-test---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-test---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---target\"><a class=\"option-anchor\" href=\"#option-cargo-test---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Test for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--r\"><a class=\"option-anchor\" href=\"#option-cargo-test--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---release\"><a class=\"option-anchor\" href=\"#option-cargo-test---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Test optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---profile\"><a class=\"option-anchor\" href=\"#option-cargo-test---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Test with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---timings\"><a class=\"option-anchor\" href=\"#option-cargo-test---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-test---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-test---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\nBy default the Rust test harness hides output from test execution to keep\nresults readable. Test output can be recovered (e.g., for debugging) by passing\n`--no-capture` to the test binaries:\n\n    cargo test -- --no-capture\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--v\"><a class=\"option-anchor\" href=\"#option-cargo-test--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-test---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--q\"><a class=\"option-anchor\" href=\"#option-cargo-test--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-test---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---color\"><a class=\"option-anchor\" href=\"#option-cargo-test---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-test---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-test---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-test---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---locked\"><a class=\"option-anchor\" href=\"#option-cargo-test---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---offline\"><a class=\"option-anchor\" href=\"#option-cargo-test---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-test---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-test-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---config\"><a class=\"option-anchor\" href=\"#option-cargo-test---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--C\"><a class=\"option-anchor\" href=\"#option-cargo-test--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--h\"><a class=\"option-anchor\" href=\"#option-cargo-test--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---help\"><a class=\"option-anchor\" href=\"#option-cargo-test---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--Z\"><a class=\"option-anchor\" href=\"#option-cargo-test--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\nThe `--jobs` argument affects the building of the test executable but does not\naffect how many threads are used when running the tests. The Rust test harness\nincludes an option to control the number of threads used:\n\n    cargo test -j 2 -- --test-threads=2\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--j\"><a class=\"option-anchor\" href=\"#option-cargo-test--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-test---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-test---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-test---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n\n</dl>\n\nWhile `cargo test` involves compilation, it does not provide a `--keep-going`\nflag. Use `--no-fail-fast` to run as many tests as possible without stopping at\nthe first failure. To \"compile\" as many tests as possible, use `--tests` to\nbuild test binaries separately. For example:\n\n    cargo build --tests --keep-going\n    cargo test --tests --no-fail-fast\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Execute all the unit and integration tests of the current package:\n\n       cargo test\n\n2. Run only tests whose names match against a filter string:\n\n       cargo test name_filter\n\n3. Run only a specific test within a specific integration test:\n\n       cargo test --test int_test_name -- modname::test_name\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-bench(1)](cargo-bench.html), [types of tests](../reference/cargo-targets.html#tests), [how to write tests](https://doc.rust-lang.org/rustc/tests/index.html)\n","doc/book/src/commands/cargo-tree.md":"# cargo-tree(1)\n## NAME\n\ncargo-tree --- Display a tree visualization of a dependency graph\n\n## SYNOPSIS\n\n`cargo tree` [_options_]\n\n## DESCRIPTION\n\nThis command will display a tree of dependencies to the terminal. An example\nof a simple project that depends on the \"rand\" package:\n\n```\nmyproject v0.1.0 (/myproject)\n└── rand v0.7.3\n    ├── getrandom v0.1.14\n    │   ├── cfg-if v0.1.10\n    │   └── libc v0.2.68\n    ├── libc v0.2.68 (*)\n    ├── rand_chacha v0.2.2\n    │   ├── ppv-lite86 v0.2.6\n    │   └── rand_core v0.5.1\n    │       └── getrandom v0.1.14 (*)\n    └── rand_core v0.5.1 (*)\n[build-dependencies]\n└── cc v1.0.50\n```\n\nPackages marked with `(*)` have been \"de-duplicated\". The dependencies for the\npackage have already been shown elsewhere in the graph, and so are not\nrepeated. Use the `--no-dedupe` option to repeat the duplicates.\n\nThe `-e` flag can be used to select the dependency kinds to display. The\n\"features\" kind changes the output to display the features enabled by\neach dependency. For example, `cargo tree -e features`:\n\n```\nmyproject v0.1.0 (/myproject)\n└── log feature \"serde\"\n    └── log v0.4.8\n        ├── serde v1.0.106\n        └── cfg-if feature \"default\"\n            └── cfg-if v0.1.10\n```\n\nIn this tree, `myproject` depends on `log` with the `serde` feature. `log` in\nturn depends on `cfg-if` with \"default\" features. When using `-e features` it\ncan be helpful to use `-i` flag to show how the features flow into a package.\nSee the examples below for more detail.\n\n### Feature Unification\n\nThis command shows a graph much closer to a feature-unified graph Cargo will\nbuild, rather than what you list in `Cargo.toml`. For instance, if you specify\nthe same dependency in both `[dependencies]` and `[dev-dependencies]` but with\ndifferent features on. This command may merge all features and show a `(*)` on\none of the dependency to indicate the duplicate.\n\nAs a result, for a mostly equivalent overview of what `cargo build` does,\n`cargo tree -e normal,build` is pretty close; for a mostly equivalent overview\nof what `cargo test` does, `cargo tree` is pretty close. However, it doesn't\nguarantee the exact equivalence to what Cargo is going to build, since a\ncompilation is complex and depends on lots of different factors.\n\nTo learn more about feature unification, check out this\n[dedicated section](../reference/features.html#feature-unification).\n\n## OPTIONS\n\n### Tree Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--i\"><a class=\"option-anchor\" href=\"#option-cargo-tree--i\"><code>-i</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---invert\"><a class=\"option-anchor\" href=\"#option-cargo-tree---invert\"><code>--invert</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Show the reverse dependencies for the given package. This flag will invert\nthe tree and display the packages that depend on the given package.</p>\n<p>Note that in a workspace, by default it will only display the package’s\nreverse dependencies inside the tree of the workspace member in the current\ndirectory. The <code>--workspace</code> flag can be used to extend it so that it will\nshow the package’s reverse dependencies across the entire workspace. The <code>-p</code>\nflag can be used to display the package’s reverse dependencies only with the\nsubtree of the package given to <code>-p</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---prune\"><a class=\"option-anchor\" href=\"#option-cargo-tree---prune\"><code>--prune</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Prune the given package from the display of the dependency tree.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---depth\"><a class=\"option-anchor\" href=\"#option-cargo-tree---depth\"><code>--depth</code> <em>depth</em></a></dt>\n<dd class=\"option-desc\"><p>Maximum display depth of the dependency tree. A depth of 1 displays the direct\ndependencies, for example.</p>\n<p>If the given value is <code>workspace</code>, only shows the dependencies that are member\nof the current workspace, instead.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---no-dedupe\"><a class=\"option-anchor\" href=\"#option-cargo-tree---no-dedupe\"><code>--no-dedupe</code></a></dt>\n<dd class=\"option-desc\"><p>Do not de-duplicate repeated dependencies. Usually, when a package has already\ndisplayed its dependencies, further occurrences will not re-display its\ndependencies, and will include a <code>(*)</code> to indicate it has already been shown.\nThis flag will cause those duplicates to be repeated.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--d\"><a class=\"option-anchor\" href=\"#option-cargo-tree--d\"><code>-d</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---duplicates\"><a class=\"option-anchor\" href=\"#option-cargo-tree---duplicates\"><code>--duplicates</code></a></dt>\n<dd class=\"option-desc\"><p>Show only dependencies which come in multiple versions (implies <code>--invert</code>).\nWhen used with the <code>-p</code> flag, only shows duplicates within the subtree of the\ngiven package.</p>\n<p>It can be beneficial for build times and executable sizes to avoid building\nthat same package multiple times. This flag can help identify the offending\npackages. You can then investigate if the package that depends on the\nduplicate with the older version can be updated to the newer version so that\nonly one instance is built.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--e\"><a class=\"option-anchor\" href=\"#option-cargo-tree--e\"><code>-e</code> <em>kinds</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---edges\"><a class=\"option-anchor\" href=\"#option-cargo-tree---edges\"><code>--edges</code> <em>kinds</em></a></dt>\n<dd class=\"option-desc\"><p>The dependency kinds to display. Takes a comma separated list of values:</p>\n<ul>\n<li><code>all</code> — Show all edge kinds.</li>\n<li><code>normal</code> — Show normal dependencies.</li>\n<li><code>build</code> — Show build dependencies.</li>\n<li><code>dev</code> — Show development dependencies.</li>\n<li><code>features</code> — Show features enabled by each dependency. If this is the only\nkind given, then it will automatically include the other dependency kinds.</li>\n<li><code>no-normal</code> — Do not include normal dependencies.</li>\n<li><code>no-build</code> — Do not include build dependencies.</li>\n<li><code>no-dev</code> — Do not include development dependencies.</li>\n<li><code>no-proc-macro</code> — Do not include procedural macro dependencies.</li>\n</ul>\n<p>The <code>normal</code>, <code>build</code>, <code>dev</code>, and <code>all</code> dependency kinds cannot be mixed with\n<code>no-normal</code>, <code>no-build</code>, or <code>no-dev</code> dependency kinds.</p>\n<p>The default is <code>normal,build,dev</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---target\"><a class=\"option-anchor\" href=\"#option-cargo-tree---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Filter dependencies matching the given <a href=\"../appendix/glossary.html#target\">target tuple</a>.\nThe default is the host platform. Use the value <code>all</code> to include <em>all</em> targets.</p>\n</dd>\n\n\n</dl>\n\n### Tree Formatting Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree---charset\"><a class=\"option-anchor\" href=\"#option-cargo-tree---charset\"><code>--charset</code> <em>charset</em></a></dt>\n<dd class=\"option-desc\"><p>Chooses the character set to use for the tree. Valid values are “utf8” or\n“ascii”. When unspecified, cargo will auto-select a value.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--f\"><a class=\"option-anchor\" href=\"#option-cargo-tree--f\"><code>-f</code> <em>format</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---format\"><a class=\"option-anchor\" href=\"#option-cargo-tree---format\"><code>--format</code> <em>format</em></a></dt>\n<dd class=\"option-desc\"><p>Set the format string for each package. The default is “{p}”.</p>\n<p>This is an arbitrary string which will be used to display each package. The following\nstrings will be replaced with the corresponding value:</p>\n<ul>\n<li><code>{p}</code>, <code>{package}</code> — The package name.</li>\n<li><code>{l}</code>, <code>{license}</code> — The package license.</li>\n<li><code>{r}</code>, <code>{repository}</code> — The package repository URL.</li>\n<li><code>{f}</code>, <code>{features}</code> — Comma-separated list of package features that are enabled.</li>\n<li><code>{lib}</code> — The name, as used in a <code>use</code> statement, of the package’s library.</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---prefix\"><a class=\"option-anchor\" href=\"#option-cargo-tree---prefix\"><code>--prefix</code> <em>prefix</em></a></dt>\n<dd class=\"option-desc\"><p>Sets how each line is displayed. The <em>prefix</em> value can be one of:</p>\n<ul>\n<li><code>indent</code> (default) — Shows each line indented as a tree.</li>\n<li><code>depth</code> — Show as a list, with the numeric depth printed before each entry.</li>\n<li><code>none</code> — Show as a flat list.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--p\"><a class=\"option-anchor\" href=\"#option-cargo-tree--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---package\"><a class=\"option-anchor\" href=\"#option-cargo-tree---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Display only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-tree---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Display all members in the workspace.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-tree---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-tree---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---locked\"><a class=\"option-anchor\" href=\"#option-cargo-tree---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---offline\"><a class=\"option-anchor\" href=\"#option-cargo-tree---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-tree---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--F\"><a class=\"option-anchor\" href=\"#option-cargo-tree--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---features\"><a class=\"option-anchor\" href=\"#option-cargo-tree---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-tree---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-tree---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--v\"><a class=\"option-anchor\" href=\"#option-cargo-tree--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-tree---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--q\"><a class=\"option-anchor\" href=\"#option-cargo-tree--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-tree---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---color\"><a class=\"option-anchor\" href=\"#option-cargo-tree---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-tree-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---config\"><a class=\"option-anchor\" href=\"#option-cargo-tree---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--C\"><a class=\"option-anchor\" href=\"#option-cargo-tree--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--h\"><a class=\"option-anchor\" href=\"#option-cargo-tree--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---help\"><a class=\"option-anchor\" href=\"#option-cargo-tree---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--Z\"><a class=\"option-anchor\" href=\"#option-cargo-tree--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the tree for the package in the current directory:\n\n       cargo tree\n\n2. Display all the packages that depend on the `syn` package:\n\n       cargo tree -i syn\n\n3. Show the features enabled on each package:\n\n       cargo tree --format \"{p} {f}\"\n\n4. Show all packages that are built multiple times. This can happen if multiple\n   semver-incompatible versions appear in the tree (like 1.0.0 and 2.0.0).\n\n       cargo tree -d\n\n5. Explain why features are enabled for the `syn` package:\n\n       cargo tree -e features -i syn\n\n   The `-e features` flag is used to show features. The `-i` flag is used to\n   invert the graph so that it displays the packages that depend on `syn`. An\n   example of what this would display:\n\n   ```\n   syn v1.0.17\n   ├── syn feature \"clone-impls\"\n   │   └── syn feature \"default\"\n   │       └── rustversion v1.0.2\n   │           └── rustversion feature \"default\"\n   │               └── myproject v0.1.0 (/myproject)\n   │                   └── myproject feature \"default\" (command-line)\n   ├── syn feature \"default\" (*)\n   ├── syn feature \"derive\"\n   │   └── syn feature \"default\" (*)\n   ├── syn feature \"full\"\n   │   └── rustversion v1.0.2 (*)\n   ├── syn feature \"parsing\"\n   │   └── syn feature \"default\" (*)\n   ├── syn feature \"printing\"\n   │   └── syn feature \"default\" (*)\n   ├── syn feature \"proc-macro\"\n   │   └── syn feature \"default\" (*)\n   └── syn feature \"quote\"\n       ├── syn feature \"printing\" (*)\n       └── syn feature \"proc-macro\" (*)\n   ```\n\n   To read this graph, you can follow the chain for each feature from the root\n   to see why it is included. For example, the \"full\" feature is added by the\n   `rustversion` crate which is included from `myproject` (with the default\n   features), and `myproject` is the package selected on the command-line. All\n   of the other `syn` features are added by the \"default\" feature (\"quote\" is\n   added by \"printing\" and \"proc-macro\", both of which are default features).\n\n   If you're having difficulty cross-referencing the de-duplicated `(*)`\n   entries, try with the `--no-dedupe` flag to get the full output.\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-metadata(1)](cargo-metadata.html)\n","doc/book/src/commands/cargo-uninstall.md":"# cargo-uninstall(1)\n\n## NAME\n\ncargo-uninstall --- Remove a Rust binary\n\n## SYNOPSIS\n\n`cargo uninstall` [_options_] [_spec_...]\n\n## DESCRIPTION\n\nThis command removes a package installed with [cargo-install(1)](cargo-install.html). The _spec_\nargument is a package ID specification of the package to remove (see\n[cargo-pkgid(1)](cargo-pkgid.html)).\n\nBy default all binaries are removed for a crate but the `--bin` and\n`--example` flags can be used to only remove particular binaries.\n\nThe installation root is determined, in order of precedence:\n\n- `--root` option\n- `CARGO_INSTALL_ROOT` environment variable\n- `install.root` Cargo [config value](../reference/config.html)\n- `CARGO_HOME` environment variable\n- `$HOME/.cargo`\n\n## OPTIONS\n\n### Uninstall Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--p\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--p\"><code>-p</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---package\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package to uninstall.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---bin\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Only uninstall the binary <em>name</em>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---root\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---root\"><code>--root</code> <em>dir</em></a></dt>\n<dd class=\"option-desc\"><p>Directory to uninstall packages from.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--v\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--q\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---color\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---config\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--C\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--h\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---help\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--Z\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Uninstall a previously installed package.\n\n       cargo uninstall ripgrep\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-install(1)](cargo-install.html)\n","doc/book/src/commands/cargo-update.md":"# cargo-update(1)\n\n## NAME\n\ncargo-update --- Update dependencies as recorded in the local lock file\n\n## SYNOPSIS\n\n`cargo update` [_options_] _spec_\n\n## DESCRIPTION\n\nThis command will update dependencies in the `Cargo.lock` file to the latest\nversion. If the `Cargo.lock` file does not exist, it will be created with the\nlatest available versions.\n\n## OPTIONS\n\n### Update Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-update-spec…\"><a class=\"option-anchor\" href=\"#option-cargo-update-spec…\"><em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Update only the specified packages. This flag may be specified\nmultiple times. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC format.</p>\n<p>If packages are specified with <em>spec</em>, then a conservative update of\nthe lockfile will be performed. This means that only the dependency specified\nby SPEC will be updated. Its transitive dependencies will be updated only if\nSPEC cannot be updated without updating dependencies.  All other dependencies\nwill remain locked at their currently recorded versions.</p>\n<p>If <em>spec</em> is not specified, all dependencies are updated.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---recursive\"><a class=\"option-anchor\" href=\"#option-cargo-update---recursive\"><code>--recursive</code></a></dt>\n<dd class=\"option-desc\"><p>When used with <em>spec</em>, dependencies of <em>spec</em> are forced to update as well.\nCannot be used with <code>--precise</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---precise\"><a class=\"option-anchor\" href=\"#option-cargo-update---precise\"><code>--precise</code> <em>precise</em></a></dt>\n<dd class=\"option-desc\"><p>When used with <em>spec</em>, allows you to specify a specific version number to set\nthe package to. If the package comes from a git repository, this can be a git\nrevision (such as a SHA hash or tag).</p>\n<p>While not recommended, you can specify a yanked version of a package.\nWhen possible, try other non-yanked SemVer-compatible versions or seek help\nfrom the maintainers of the package.</p>\n<p>A compatible <code>pre-release</code> version can also be specified even when the version\nrequirement in <code>Cargo.toml</code> doesn’t contain any pre-release identifier (nightly only).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--w\"><a class=\"option-anchor\" href=\"#option-cargo-update--w\"><code>-w</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-update---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Attempt to update only packages defined in the workspace. Other packages\nare updated only if they don’t already exist in the lockfile. This\noption is useful for updating <code>Cargo.lock</code> after you’ve changed version\nnumbers in <code>Cargo.toml</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-update---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Displays what would be updated, but doesn’t actually write the lockfile.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-update--v\"><a class=\"option-anchor\" href=\"#option-cargo-update--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-update---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--q\"><a class=\"option-anchor\" href=\"#option-cargo-update--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-update---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---color\"><a class=\"option-anchor\" href=\"#option-cargo-update---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-update---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-update---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-update---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---locked\"><a class=\"option-anchor\" href=\"#option-cargo-update---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---offline\"><a class=\"option-anchor\" href=\"#option-cargo-update---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-update---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-update-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-update-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---config\"><a class=\"option-anchor\" href=\"#option-cargo-update---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--C\"><a class=\"option-anchor\" href=\"#option-cargo-update--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--h\"><a class=\"option-anchor\" href=\"#option-cargo-update--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---help\"><a class=\"option-anchor\" href=\"#option-cargo-update---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--Z\"><a class=\"option-anchor\" href=\"#option-cargo-update--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Update all dependencies in the lockfile:\n\n       cargo update\n\n2. Update only specific dependencies:\n\n       cargo update foo bar\n\n3. Set a specific dependency to a specific version:\n\n       cargo update foo --precise 1.2.3\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\n","doc/book/src/commands/cargo-vendor.md":"# cargo-vendor(1)\n\n## NAME\n\ncargo-vendor --- Vendor all dependencies locally\n\n## SYNOPSIS\n\n`cargo vendor` [_options_] [_path_]\n\n## DESCRIPTION\n\nThis cargo subcommand will vendor all crates.io and git dependencies for a\nproject into the specified directory at `<path>`. After this command completes\nthe vendor directory specified by `<path>` will contain all remote sources from\ndependencies specified. Additional manifests beyond the default one can be\nspecified with the `-s` option.\n\nThe configuration necessary to use the vendored sources would be printed to\nstdout after `cargo vendor` completes the vendoring process.\nYou will need to add or redirect it to your Cargo configuration file,\nwhich is usually `.cargo/config.toml` locally for the current package.\n\nCargo treats vendored sources as read-only as it does to registry and git sources.\nIf you intend to modify a crate from a remote source,\nuse `[patch]` or a `path` dependency pointing to a local copy of that crate.\nCargo will then correctly handle the crate on incremental rebuilds,\nas it knows that it is no longer a read-only dependency.\n\n## OPTIONS\n\n### Vendor Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--s\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--s\"><code>-s</code> <em>manifest</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---sync\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---sync\"><code>--sync</code> <em>manifest</em></a></dt>\n<dd class=\"option-desc\"><p>Specify an extra <code>Cargo.toml</code> manifest to workspaces which should also be\nvendored and synced to the output. May be specified multiple times.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---no-delete\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---no-delete\"><code>--no-delete</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t delete the “vendor” directory when vendoring, but rather keep all\nexisting contents of the vendor directory</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---respect-source-config\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---respect-source-config\"><code>--respect-source-config</code></a></dt>\n<dd class=\"option-desc\"><p>Instead of ignoring <code>[source]</code> configuration by default in <code>.cargo/config.toml</code>,\nread it and use it when downloading crates.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---versioned-dirs\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---versioned-dirs\"><code>--versioned-dirs</code></a></dt>\n<dd class=\"option-desc\"><p>Normally versions are only added to disambiguate multiple versions of the\nsame package. This option causes all directories in the “vendor” directory\nto be versioned, which makes it easier to track the history of vendored\npackages over time, and can help with the performance of re-vendoring when\nonly a subset of the packages have changed.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---locked\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---offline\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--v\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--q\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---color\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-vendor-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---config\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--C\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--h\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---help\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--Z\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Vendor all dependencies into a local \"vendor\" folder\n\n       cargo vendor\n\n2. Vendor all dependencies into a local \"third-party/vendor\" folder\n\n       cargo vendor third-party/vendor\n\n3. Vendor the current workspace as well as another to \"vendor\"\n\n       cargo vendor -s ../path/to/Cargo.toml\n\n4. Vendor and redirect the necessary vendor configs to a config file.\n\n       cargo vendor > path/to/my/cargo/config.toml\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n\n","doc/book/src/commands/cargo-version.md":"# cargo-version(1)\n\n## NAME\n\ncargo-version --- Show version information\n\n## SYNOPSIS\n\n`cargo version` [_options_]\n\n## DESCRIPTION\n\nDisplays the version of Cargo.\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-version--v\"><a class=\"option-anchor\" href=\"#option-cargo-version--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-version---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-version---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Display additional version information.</p>\n</dd>\n\n\n</dl>\n\n## EXAMPLES\n\n1. Display the version:\n\n       cargo version\n\n2. The version is also available via flags:\n\n       cargo --version\n       cargo -V\n\n3. Display extra version information:\n\n       cargo -Vv\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n","doc/book/src/commands/cargo-yank.md":"# cargo-yank(1)\n\n## NAME\n\ncargo-yank --- Remove a pushed crate from the index\n\n## SYNOPSIS\n\n`cargo yank` [_options_] _crate_@_version_\\\n`cargo yank` [_options_] `--version` _version_ [_crate_]\n\n## DESCRIPTION\n\nThe yank command removes a previously published crate's version from the\nserver's index. This command does not delete any data, and the crate will\nstill be available for download via the registry's download link.\n\nCargo will not use a yanked version for any new project or checkout without a\npre-existing lockfile, and will generate an error if there are no longer\nany compatible versions for your crate.\n\nThis command requires you to be authenticated with either the `--token` option\nor using [cargo-login(1)](cargo-login.html).\n\nIf the crate name is not specified, it will use the package name from the\ncurrent directory.\n\n### How yank works\n\nFor example, the `foo` crate published version `1.5.0` and another crate `bar`\ndeclared a dependency on version `foo = \"1.5\"`. Now `foo` releases a new, but\nnot semver compatible, version `2.0.0`, and finds a critical issue with `1.5.0`.\nIf `1.5.0` is yanked, no new project or checkout without an existing lockfile\nwill be able to use crate `bar` as it relies on `1.5`.\n\nIn this case, the maintainers of `foo` should first publish a semver compatible\nversion such as `1.5.1` prior to yanking `1.5.0` so that `bar` and all projects\nthat depend on `bar` will continue to work.\n\nAs another example, consider a crate `bar` with published versions `1.5.0`,\n`1.5.1`, `1.5.2`, `2.0.0` and `3.0.0`. The following table identifies the\nversions cargo could use in the absence of a lockfile for different SemVer\nrequirements, following a given release being yanked:\n\n| Yanked Version / SemVer requirement | `bar = \"1.5.0\"`                         | `bar = \"=1.5.0\"` | `bar = \"2.0.0\"`  |\n|-------------------------------------|-----------------------------------------|------------------|------------------|\n| `1.5.0`                             | Use either `1.5.1` or `1.5.2`           | **Return Error** | Use `2.0.0`      |\n| `1.5.1`                             | Use either `1.5.0` or `1.5.2`           | Use `1.5.0`      | Use `2.0.0`      |\n| `2.0.0`                             | Use either `1.5.0`, `1.5.1` or `1.5.2`  | Use `1.5.0`      | **Return Error** |\n\n### When to yank\n\nCrates should only be yanked in exceptional circumstances, for example, an\naccidental publish, unintentional SemVer breakages, or a significantly\nbroken and unusable crate. In the case of security vulnerabilities, [RustSec]\nis typically a less disruptive mechanism to inform users and encourage them\nto upgrade, and avoids the possibility of significant downstream disruption\nirrespective of susceptibility to the vulnerability in question.\n\nA common workflow is to yank a crate having already published a semver\ncompatible version, to reduce the probability of preventing dependent\ncrates from compiling.\n\nWhen addressing copyright, licensing, or personal data issues with a published\ncrate, simply yanking it may not suffice. In such cases, contact the maintainers\nof the registry you used. For crates.io, refer to their [policies] and contact\nthem at <help@crates.io>.\n\nIf credentials have been leaked, the recommended course of action is to revoke\nthem immediately. Once a crate has been published, it is impossible to determine\nif the leaked credentials have been copied. Yanking only prevents Cargo from\nselecting this version when resolving dependencies by default. Existing lock\nfiles or direct downloads are not affected, so yanking cannot stop further\nspreading of the leaked credentials.\n\n[RustSec]: https://rustsec.org/\n[policies]: https://crates.io/policies\n\n## OPTIONS\n\n### Yank Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-yank---vers\"><a class=\"option-anchor\" href=\"#option-cargo-yank---vers\"><code>--vers</code> <em>version</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---version\"><a class=\"option-anchor\" href=\"#option-cargo-yank---version\"><code>--version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>The version to yank or un-yank.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---undo\"><a class=\"option-anchor\" href=\"#option-cargo-yank---undo\"><code>--undo</code></a></dt>\n<dd class=\"option-desc\"><p>Undo a yank, putting a version back into the index.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---token\"><a class=\"option-anchor\" href=\"#option-cargo-yank---token\"><code>--token</code> <em>token</em></a></dt>\n<dd class=\"option-desc\"><p>API token to use when authenticating. This overrides the token stored in\nthe credentials file (which is created by <a href=\"cargo-login.html\">cargo-login(1)</a>).</p>\n<p><a href=\"../reference/config.html\">Cargo config</a> environment variables can be\nused to override the tokens stored in the credentials file. The token for\ncrates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment\nvariable. Tokens for other registries may be specified with environment\nvariables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name\nof the registry in all capital letters.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---index\"><a class=\"option-anchor\" href=\"#option-cargo-yank---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---registry\"><a class=\"option-anchor\" href=\"#option-cargo-yank---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-yank--v\"><a class=\"option-anchor\" href=\"#option-cargo-yank--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-yank---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--q\"><a class=\"option-anchor\" href=\"#option-cargo-yank--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-yank---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---color\"><a class=\"option-anchor\" href=\"#option-cargo-yank---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-yank-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-yank-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---config\"><a class=\"option-anchor\" href=\"#option-cargo-yank---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--C\"><a class=\"option-anchor\" href=\"#option-cargo-yank--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--h\"><a class=\"option-anchor\" href=\"#option-cargo-yank--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---help\"><a class=\"option-anchor\" href=\"#option-cargo-yank---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--Z\"><a class=\"option-anchor\" href=\"#option-cargo-yank--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Yank a crate from the index:\n\n       cargo yank foo@1.0.7\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo.md":"# cargo(1)\n\n## NAME\n\ncargo --- The Rust package manager\n\n## SYNOPSIS\n\n`cargo` [_options_] _command_ [_args_]\\\n`cargo` [_options_] `--version`\\\n`cargo` [_options_] `--list`\\\n`cargo` [_options_] `--help`\\\n`cargo` [_options_] `--explain` _code_\n\n## DESCRIPTION\n\nThis program is a package manager and build tool for the Rust language,\navailable at <https://rust-lang.org>.\n\n_command_ may be one of:\n- built-in commands, see below\n- [aliases]\n- [external tools]\n\n[aliases]: ../reference/config.html#alias\n[external tools]: ../reference/external-tools.html#custom-subcommands\n\n## COMMANDS\n\n### Build Commands\n\n[cargo-bench(1)](cargo-bench.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Execute benchmarks of a package.\n\n[cargo-build(1)](cargo-build.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Compile a package.\n\n[cargo-check(1)](cargo-check.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Check a local package and all of its dependencies for errors.\n\n[cargo-clean(1)](cargo-clean.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove artifacts that Cargo has generated in the past.\n\n[cargo-doc(1)](cargo-doc.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Build a package's documentation.\n\n[cargo-fetch(1)](cargo-fetch.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Fetch dependencies of a package from the network.\n\n[cargo-fix(1)](cargo-fix.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Automatically fix lint warnings reported by rustc.\n\n[cargo-run(1)](cargo-run.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Run a binary or example of the local package.\n\n[cargo-rustc(1)](cargo-rustc.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Compile a package, and pass extra options to the compiler.\n\n[cargo-rustdoc(1)](cargo-rustdoc.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Build a package's documentation, using specified custom flags.\n\n[cargo-test(1)](cargo-test.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Execute unit and integration tests of a package.\n\n### Manifest Commands\n\n[cargo-add(1)](cargo-add.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Add dependencies to a `Cargo.toml` manifest file.\n\n[cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Generate `Cargo.lock` for a project.\n\n[cargo-info(1)](cargo-info.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Display information about a package in the registry. Default registry is crates.io.\n\n[cargo-locate-project(1)](cargo-locate-project.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Print a JSON representation of a `Cargo.toml` file's location.\n\n[cargo-metadata(1)](cargo-metadata.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Output the resolved dependencies of a package in machine-readable format.\n\n[cargo-pkgid(1)](cargo-pkgid.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Print a fully qualified package specification.\n\n[cargo-remove(1)](cargo-remove.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove dependencies from a `Cargo.toml` manifest file.\n\n[cargo-tree(1)](cargo-tree.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Display a tree visualization of a dependency graph.\n\n[cargo-update(1)](cargo-update.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Update dependencies as recorded in the local lock file.\n\n[cargo-vendor(1)](cargo-vendor.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Vendor all dependencies locally.\n\n### Package Commands\n\n[cargo-init(1)](cargo-init.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Create a new Cargo package in an existing directory.\n\n[cargo-install(1)](cargo-install.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Build and install a Rust binary.\n\n[cargo-new(1)](cargo-new.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Create a new Cargo package.\n\n[cargo-search(1)](cargo-search.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Search packages in crates.io.\n\n[cargo-uninstall(1)](cargo-uninstall.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove a Rust binary.\n\n### Publishing Commands\n\n[cargo-login(1)](cargo-login.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Save an API token from the registry locally.\n\n[cargo-logout(1)](cargo-logout.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove an API token from the registry locally.\n\n[cargo-owner(1)](cargo-owner.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Manage the owners of a crate on the registry.\n\n[cargo-package(1)](cargo-package.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Assemble the local package into a distributable tarball.\n\n[cargo-publish(1)](cargo-publish.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Upload a package to the registry.\n\n[cargo-yank(1)](cargo-yank.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove a pushed crate from the index.\n\n### Report Commands\n\n[cargo-report(1)](cargo-report.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Generate and display various kinds of reports.\n\n[cargo-report-future-incompatibilities(1)](cargo-report-future-incompatibilities.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Reports any crates which will eventually stop compiling.\n\n### General Commands\n\n[cargo-help(1)](cargo-help.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Display help information about Cargo.\n\n[cargo-version(1)](cargo-version.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Show version information.\n\n## OPTIONS\n\n### Special Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo--V\"><a class=\"option-anchor\" href=\"#option-cargo--V\"><code>-V</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---version\"><a class=\"option-anchor\" href=\"#option-cargo---version\"><code>--version</code></a></dt>\n<dd class=\"option-desc\"><p>Print version info and exit. If used with <code>--verbose</code>, prints extra\ninformation.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---list\"><a class=\"option-anchor\" href=\"#option-cargo---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List all installed Cargo subcommands. If used with <code>--verbose</code>, prints extra\ninformation.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---explain\"><a class=\"option-anchor\" href=\"#option-cargo---explain\"><code>--explain</code> <em>code</em></a></dt>\n<dd class=\"option-desc\"><p>Run <code>rustc --explain CODE</code> which will print out a detailed explanation of an\nerror message (for example, <code>E0004</code>).</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo--v\"><a class=\"option-anchor\" href=\"#option-cargo--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---verbose\"><a class=\"option-anchor\" href=\"#option-cargo---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--q\"><a class=\"option-anchor\" href=\"#option-cargo--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---quiet\"><a class=\"option-anchor\" href=\"#option-cargo---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---color\"><a class=\"option-anchor\" href=\"#option-cargo---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo---locked\"><a class=\"option-anchor\" href=\"#option-cargo---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---offline\"><a class=\"option-anchor\" href=\"#option-cargo---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---frozen\"><a class=\"option-anchor\" href=\"#option-cargo---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---config\"><a class=\"option-anchor\" href=\"#option-cargo---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--C\"><a class=\"option-anchor\" href=\"#option-cargo--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--h\"><a class=\"option-anchor\" href=\"#option-cargo--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---help\"><a class=\"option-anchor\" href=\"#option-cargo---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--Z\"><a class=\"option-anchor\" href=\"#option-cargo--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## FILES\n\n`~/.cargo/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Default location for Cargo's \"home\" directory where it\nstores various files. The location can be changed with the `CARGO_HOME`\nenvironment variable.\n\n`$CARGO_HOME/bin/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Binaries installed by [cargo-install(1)](cargo-install.html) will be located here. If using\n[rustup], executables distributed with Rust are also located here.\n\n`$CARGO_HOME/config.toml`\\\n&nbsp;&nbsp;&nbsp;&nbsp;The global configuration file. See [the reference](../reference/config.html)\nfor more information about configuration files.\n\n`.cargo/config.toml`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Cargo automatically searches for a file named `.cargo/config.toml` in the\ncurrent directory, and all parent directories. These configuration files\nwill be merged with the global configuration file.\n\n`$CARGO_HOME/credentials.toml`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Private authentication information for logging in to a registry.\n\n`$CARGO_HOME/registry/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;This directory contains cached downloads of the registry index and any\ndownloaded dependencies.\n\n`$CARGO_HOME/git/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;This directory contains cached downloads of git dependencies.\n\nPlease note that the internal structure of the `$CARGO_HOME` directory is not\nstable yet and may be subject to change.\n\n[rustup]: https://rust-lang.github.io/rustup/\n\n## EXAMPLES\n\n1. Build a local package and all of its dependencies:\n\n       cargo build\n\n2. Build a package with optimizations:\n\n       cargo build --release\n\n3. Run tests for a cross-compiled target:\n\n       cargo test --target i686-unknown-linux-gnu\n\n4. Create a new package that builds an executable:\n\n       cargo new foobar\n\n5. Create a package in the current directory:\n\n       mkdir foo && cd foo\n       cargo init .\n\n6. Learn about a command's options and usage:\n\n       cargo help clean\n\n## BUGS\n\nSee <https://github.com/rust-lang/cargo/issues> for issues.\n\n## SEE ALSO\n\n[rustc(1)](https://doc.rust-lang.org/rustc/index.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n","doc/book/src/commands/deprecated-and-removed.md":"## Deprecated and Removed Commands\n\nThese commands have been deprecated or removed in early Rust releases.\nDeprecated commands receive only critical bug fixes,\nand may be removed in future versions.\nRemoved commands are no longer functional and are unsupported.\n\n* `read-manifest` --- deprecated since Rust 1.13\n* `git-checkout` --- removed since Rust 1.44\n* `verify-project` --- deprecated since Rust 1.84\n","doc/book/src/commands/general-commands.md":"# General Commands\n* [cargo](cargo.md)\n* [cargo help](cargo-help.md)\n* [cargo version](cargo-version.md)\n","doc/book/src/commands/index.md":"# Cargo Commands\n* [General Commands](general-commands.md)\n* [Build Commands](build-commands.md)\n* [Manifest Commands](manifest-commands.md)\n* [Package Commands](package-commands.md)\n* [Publishing Commands](publishing-commands.md)\n* [Report Commands](report-commands.md)\n* [Deprecated and Removed](deprecated-and-removed.md)\n","doc/book/src/commands/manifest-commands.md":"# Manifest Commands\n\n* [cargo add](cargo-add.md)\n* [cargo_info](cargo-info.md)\n* [cargo generate-lockfile](cargo-generate-lockfile.md)\n* [cargo locate-project](cargo-locate-project.md)\n* [cargo metadata](cargo-metadata.md)\n* [cargo pkgid](cargo-pkgid.md)\n* [cargo remove](cargo-remove.md)\n* [cargo tree](cargo-tree.md)\n* [cargo update](cargo-update.md)\n* [cargo vendor](cargo-vendor.md)\n","doc/book/src/commands/package-commands.md":"# Package Commands\n* [cargo init](cargo-init.md)\n* [cargo install](cargo-install.md)\n* [cargo new](cargo-new.md)\n* [cargo search](cargo-search.md)\n* [cargo uninstall](cargo-uninstall.md)\n","doc/book/src/commands/publishing-commands.md":"# Publishing Commands\n* [cargo login](cargo-login.md)\n* [cargo logout](cargo-logout.md)\n* [cargo owner](cargo-owner.md)\n* [cargo package](cargo-package.md)\n* [cargo publish](cargo-publish.md)\n* [cargo yank](cargo-yank.md)\n","doc/book/src/commands/report-commands.md":"# Report Commands\n\n* [cargo report](cargo-report.md)\n* [cargo report future-incompatibilities](cargo-report-future-incompatibilities.md)\n"},"files":{"doc/book/src/commands/build-commands.md":"# Build Commands\n* [cargo bench](cargo-bench.md)\n* [cargo build](cargo-build.md)\n* [cargo check](cargo-check.md)\n* [cargo clean](cargo-clean.md)\n* [cargo clippy](cargo-clippy.md)\n* [cargo doc](cargo-doc.md)\n* [cargo fetch](cargo-fetch.md)\n* [cargo fix](cargo-fix.md)\n* [cargo fmt](cargo-fmt.md)\n* [cargo miri](cargo-miri.md)\n* [cargo run](cargo-run.md)\n* [cargo rustc](cargo-rustc.md)\n* [cargo rustdoc](cargo-rustdoc.md)\n* [cargo test](cargo-test.md)\n","doc/book/src/commands/cargo-add.md":"# cargo-add(1)\n## NAME\n\ncargo-add --- Add dependencies to a Cargo.toml manifest file\n\n## SYNOPSIS\n\n`cargo add` [_options_] _crate_...\\\n`cargo add` [_options_] `--path` _path_\\\n`cargo add` [_options_] `--git` _url_ [_crate_...]\n\n\n## DESCRIPTION\n\nThis command can add or modify dependencies.\n\nThe source for the dependency can be specified with:\n\n* _crate_`@`_version_: Fetch from a registry with a version constraint of \"_version_\"\n* `--path` _path_: Fetch from the specified _path_\n* `--git` _url_: Pull from a git repo at _url_\n\nIf no source is specified, then a best effort will be made to select one, including:\n\n* Existing dependencies in other tables (like `dev-dependencies`)\n* Workspace members\n* Latest release in the registry\n\nWhen you add a package that is already present, the existing entry will be updated with the flags specified.\n\nUpon successful invocation, the enabled (`+`) and disabled (`-`) [features] of the specified\ndependency will be listed in the command's output.\n\n[features]: ../reference/features.html\n\n## OPTIONS\n\n### Source options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---git\"><a class=\"option-anchor\" href=\"#option-cargo-add---git\"><code>--git</code> <em>url</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories\">Git URL to add the specified crate from</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---branch\"><a class=\"option-anchor\" href=\"#option-cargo-add---branch\"><code>--branch</code> <em>branch</em></a></dt>\n<dd class=\"option-desc\"><p>Branch to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---tag\"><a class=\"option-anchor\" href=\"#option-cargo-add---tag\"><code>--tag</code> <em>tag</em></a></dt>\n<dd class=\"option-desc\"><p>Tag to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---rev\"><a class=\"option-anchor\" href=\"#option-cargo-add---rev\"><code>--rev</code> <em>sha</em></a></dt>\n<dd class=\"option-desc\"><p>Specific commit to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---path\"><a class=\"option-anchor\" href=\"#option-cargo-add---path\"><code>--path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#specifying-path-dependencies\">Filesystem path</a> to local crate to add.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---base\"><a class=\"option-anchor\" href=\"#option-cargo-add---base\"><code>--base</code> <em>base</em></a></dt>\n<dd class=\"option-desc\"><p>The <a href=\"../reference/unstable.html#path-bases\">path base</a> to use when adding a local crate.</p>\n<p><a href=\"../reference/unstable.html#path-bases\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---registry\"><a class=\"option-anchor\" href=\"#option-cargo-add---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Section options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---dev\"><a class=\"option-anchor\" href=\"#option-cargo-add---dev\"><code>--dev</code></a></dt>\n<dd class=\"option-desc\"><p>Add as a <a href=\"../reference/specifying-dependencies.html#development-dependencies\">development dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---build\"><a class=\"option-anchor\" href=\"#option-cargo-add---build\"><code>--build</code></a></dt>\n<dd class=\"option-desc\"><p>Add as a <a href=\"../reference/specifying-dependencies.html#build-dependencies\">build dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---target\"><a class=\"option-anchor\" href=\"#option-cargo-add---target\"><code>--target</code> <em>target</em></a></dt>\n<dd class=\"option-desc\"><p>Add as a dependency to the <a href=\"../reference/specifying-dependencies.html#platform-specific-dependencies\">given target platform</a>.</p>\n<p>To avoid unexpected shell expansions, you may use quotes around each target, e.g., <code>--target 'cfg(unix)'</code>.</p>\n</dd>\n\n\n</dl>\n\n### Dependency options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-add---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t actually write the manifest</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---rename\"><a class=\"option-anchor\" href=\"#option-cargo-add---rename\"><code>--rename</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml\">Rename</a> the dependency.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---optional\"><a class=\"option-anchor\" href=\"#option-cargo-add---optional\"><code>--optional</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as <a href=\"../reference/features.html#optional-dependencies\">optional</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-optional\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-optional\"><code>--no-optional</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as <a href=\"../reference/features.html#optional-dependencies\">required</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---public\"><a class=\"option-anchor\" href=\"#option-cargo-add---public\"><code>--public</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as public.</p>\n<p>The dependency can be referenced in your library’s public API.</p>\n<p><a href=\"../reference/unstable.html#public-dependency\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-public\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-public\"><code>--no-public</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as private.</p>\n<p>While you can use the crate in your implementation, it cannot be referenced in your public API.</p>\n<p><a href=\"../reference/unstable.html#public-dependency\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Disable the <a href=\"../reference/features.html#dependency-features\">default features</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---default-features\"><a class=\"option-anchor\" href=\"#option-cargo-add---default-features\"><code>--default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Re-enable the <a href=\"../reference/features.html#dependency-features\">default features</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--F\"><a class=\"option-anchor\" href=\"#option-cargo-add--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---features\"><a class=\"option-anchor\" href=\"#option-cargo-add---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of <a href=\"../reference/features.html#dependency-features\">features to\nactivate</a>. When adding multiple\ncrates, the features for a specific crate may be enabled with\n<code>package-name/feature-name</code> syntax. This flag may be specified multiple times,\nwhich enables all specified features.</p>\n</dd>\n\n\n</dl>\n\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-add--v\"><a class=\"option-anchor\" href=\"#option-cargo-add--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-add---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--q\"><a class=\"option-anchor\" href=\"#option-cargo-add--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-add---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---color\"><a class=\"option-anchor\" href=\"#option-cargo-add---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-add---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-add---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--p\"><a class=\"option-anchor\" href=\"#option-cargo-add--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---package\"><a class=\"option-anchor\" href=\"#option-cargo-add---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Add dependencies to only the specified package.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-add---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---locked\"><a class=\"option-anchor\" href=\"#option-cargo-add---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---offline\"><a class=\"option-anchor\" href=\"#option-cargo-add---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-add---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-add-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---config\"><a class=\"option-anchor\" href=\"#option-cargo-add---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--C\"><a class=\"option-anchor\" href=\"#option-cargo-add--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--h\"><a class=\"option-anchor\" href=\"#option-cargo-add--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---help\"><a class=\"option-anchor\" href=\"#option-cargo-add---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--Z\"><a class=\"option-anchor\" href=\"#option-cargo-add--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Add `regex` as a dependency\n\n       cargo add regex\n\n2. Add `trybuild` as a dev-dependency\n\n       cargo add --dev trybuild\n\n3. Add an older version of `nom` as a dependency\n\n       cargo add nom@5\n\n4. Add support for serializing data structures to json with `derive`s\n\n       cargo add serde serde_json -F serde/derive\n\n5. Add `windows` as a platform specific dependency on `cfg(windows)`\n\n       cargo add windows --target 'cfg(windows)'\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-remove(1)](cargo-remove.html)\n","doc/book/src/commands/cargo-bench.md":"# cargo-bench(1)\n## NAME\n\ncargo-bench --- Execute benchmarks of a package\n\n## SYNOPSIS\n\n`cargo bench` [_options_] [_benchname_] [`--` _bench-options_]\n\n## DESCRIPTION\n\nCompile and execute benchmarks.\n\nThe benchmark filtering argument _benchname_ and all the arguments following\nthe two dashes (`--`) are passed to the benchmark binaries and thus to\n_libtest_ (rustc's built in unit-test and micro-benchmarking framework). If\nyou are passing arguments to both Cargo and the binary, the ones after `--` go\nto the binary, the ones before go to Cargo. For details about libtest's\narguments see the output of `cargo bench -- --help` and check out the rustc\nbook's chapter on how tests work at\n<https://doc.rust-lang.org/rustc/tests/index.html>.\n\nAs an example, this will run only the benchmark named `foo` (and skip other\nsimilarly named benchmarks like `foobar`):\n\n    cargo bench -- foo --exact\n\nBenchmarks are built with the `--test` option to `rustc` which creates a\nspecial executable by linking your code with libtest. The executable\nautomatically runs all functions annotated with the `#[bench]` attribute.\nCargo passes the `--bench` flag to the test harness to tell it to run\nonly benchmarks, regardless of whether the harness is libtest or a custom harness.\n\nThe libtest harness may be disabled by setting `harness = false` in the target\nmanifest settings, in which case your code will need to provide its own `main`\nfunction to handle running benchmarks.\n\n> **Note**: The\n> [`#[bench]` attribute](https://doc.rust-lang.org/nightly/unstable-book/library-features/test.html)\n> is currently unstable and only available on the\n> [nightly channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html).\n> There are some packages available on\n> [crates.io](https://crates.io/keywords/benchmark) that may help with\n> running benchmarks on the stable channel, such as\n> [Criterion](https://crates.io/crates/criterion).\n\nBy default, `cargo bench` uses the [`bench` profile], which enables\noptimizations and disables debugging information. If you need to debug a\nbenchmark, you can use the `--profile=debug` command-line option to switch to\nthe debug profile. You can then run the debug-enabled benchmark within a\ndebugger.\n\n[`bench` profile]: ../reference/profiles.html#bench\n\n### Working directory of benchmarks\n\nThe working directory of every benchmark is set to the root directory of the \npackage the benchmark belongs to.\nSetting the working directory of benchmarks to the package's root directory \nmakes it possible for benchmarks to reliably access the package's files using \nrelative paths, regardless from where `cargo bench` was executed from.\n\n## OPTIONS\n\n### Benchmark Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-run\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-run\"><code>--no-run</code></a></dt>\n<dd class=\"option-desc\"><p>Compile, but don’t run benchmarks.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-fail-fast\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-fail-fast\"><code>--no-fail-fast</code></a></dt>\n<dd class=\"option-desc\"><p>Run all benchmarks regardless of failure. Without this flag, Cargo will exit\nafter the first executable fails. The Rust test harness will run all benchmarks\nwithin the executable to completion, this flag only applies to the executable\nas a whole.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--p\"><a class=\"option-anchor\" href=\"#option-cargo-bench--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---package\"><a class=\"option-anchor\" href=\"#option-cargo-bench---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-bench---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-bench---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo bench` will build the\nfollowing targets of the selected packages:\n\n- lib --- used to link with binaries and benchmarks\n- bins (only if benchmark targets are built and required features are\n  available)\n- lib as a benchmark\n- bins as benchmarks\n- benchmark targets\n\nThe default behavior can be changed by setting the `bench` flag for the target\nin the manifest settings. Setting examples to `bench = true` will build and\nrun the example as a benchmark, replacing the example's `main` function with\nthe libtest harness.\n\nSetting targets to `bench = false` will stop them from being benchmarked by\ndefault. Target selection options that take a target by name (such as\n`--example foo`) ignore the `bench` flag and will always benchmark the given\ntarget.\n\nSee [Configuring a target](../reference/cargo-targets.html#configuring-a-target)\nfor more information on per-target settings.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to benchmark. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will benchmark only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---lib\"><a class=\"option-anchor\" href=\"#option-cargo-bench---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bin\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bins\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---example\"><a class=\"option-anchor\" href=\"#option-cargo-bench---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---examples\"><a class=\"option-anchor\" href=\"#option-cargo-bench---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---test\"><a class=\"option-anchor\" href=\"#option-cargo-bench---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---tests\"><a class=\"option-anchor\" href=\"#option-cargo-bench---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bench\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---benches\"><a class=\"option-anchor\" href=\"#option-cargo-bench---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--F\"><a class=\"option-anchor\" href=\"#option-cargo-bench--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---target\"><a class=\"option-anchor\" href=\"#option-cargo-bench---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Benchmark for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---profile\"><a class=\"option-anchor\" href=\"#option-cargo-bench---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Benchmark with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---timings\"><a class=\"option-anchor\" href=\"#option-cargo-bench---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-bench---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\nBy default the Rust test harness hides output from benchmark execution to keep\nresults readable. Benchmark output can be recovered (e.g., for debugging) by\npassing `--no-capture` to the benchmark binaries:\n\n    cargo bench -- --no-capture\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--v\"><a class=\"option-anchor\" href=\"#option-cargo-bench--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-bench---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--q\"><a class=\"option-anchor\" href=\"#option-cargo-bench--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-bench---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---color\"><a class=\"option-anchor\" href=\"#option-cargo-bench---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-bench---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-bench---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-bench---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---locked\"><a class=\"option-anchor\" href=\"#option-cargo-bench---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---offline\"><a class=\"option-anchor\" href=\"#option-cargo-bench---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-bench---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-bench-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---config\"><a class=\"option-anchor\" href=\"#option-cargo-bench---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--C\"><a class=\"option-anchor\" href=\"#option-cargo-bench--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--h\"><a class=\"option-anchor\" href=\"#option-cargo-bench--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---help\"><a class=\"option-anchor\" href=\"#option-cargo-bench---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--Z\"><a class=\"option-anchor\" href=\"#option-cargo-bench--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\nThe `--jobs` argument affects the building of the benchmark executable but\ndoes not affect how many threads are used when running the benchmarks. The\nRust test harness runs benchmarks serially in a single thread.\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench--j\"><a class=\"option-anchor\" href=\"#option-cargo-bench--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-bench---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n</dl>\n\nWhile `cargo bench` involves compilation, it does not provide a `--keep-going`\nflag. Use `--no-fail-fast` to run as many benchmarks as possible without\nstopping at the first failure. To \"compile\" as many benchmarks as possible, use\n`--benches` to build benchmark binaries separately. For example:\n\n    cargo build --benches --release --keep-going\n    cargo bench --no-fail-fast\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build and execute all the benchmarks of the current package:\n\n       cargo bench\n\n2. Run only a specific benchmark within a specific benchmark target:\n\n       cargo bench --bench bench_name -- modname::some_benchmark\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-test(1)](cargo-test.html)\n","doc/book/src/commands/cargo-build.md":"# cargo-build(1)\n## NAME\n\ncargo-build --- Compile the current package\n\n## SYNOPSIS\n\n`cargo build` [_options_]\n\n## DESCRIPTION\n\nCompile local packages and all of their dependencies.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build--p\"><a class=\"option-anchor\" href=\"#option-cargo-build--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---package\"><a class=\"option-anchor\" href=\"#option-cargo-build---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-build---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Build all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all\"><a class=\"option-anchor\" href=\"#option-cargo-build---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-build---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo build` will build all\nbinary and library targets of the selected packages. Binaries are skipped if\nthey have `required-features` that are missing.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to build. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will build only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build---lib\"><a class=\"option-anchor\" href=\"#option-cargo-build---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Build the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bin\"><a class=\"option-anchor\" href=\"#option-cargo-build---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bins\"><a class=\"option-anchor\" href=\"#option-cargo-build---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Build all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---example\"><a class=\"option-anchor\" href=\"#option-cargo-build---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---examples\"><a class=\"option-anchor\" href=\"#option-cargo-build---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Build all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---test\"><a class=\"option-anchor\" href=\"#option-cargo-build---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---tests\"><a class=\"option-anchor\" href=\"#option-cargo-build---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bench\"><a class=\"option-anchor\" href=\"#option-cargo-build---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---benches\"><a class=\"option-anchor\" href=\"#option-cargo-build---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-build---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build--F\"><a class=\"option-anchor\" href=\"#option-cargo-build--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---features\"><a class=\"option-anchor\" href=\"#option-cargo-build---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-build---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-build---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build---target\"><a class=\"option-anchor\" href=\"#option-cargo-build---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--r\"><a class=\"option-anchor\" href=\"#option-cargo-build--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---release\"><a class=\"option-anchor\" href=\"#option-cargo-build---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Build optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---profile\"><a class=\"option-anchor\" href=\"#option-cargo-build---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Build with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---timings\"><a class=\"option-anchor\" href=\"#option-cargo-build---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-build---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---artifact-dir\"><a class=\"option-anchor\" href=\"#option-cargo-build---artifact-dir\"><code>--artifact-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Copy final artifacts to this directory.</p>\n<p>This option is unstable and available only on the\n<a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.\nSee <a href=\"https://github.com/rust-lang/cargo/issues/6790\">https://github.com/rust-lang/cargo/issues/6790</a> for more information.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build--v\"><a class=\"option-anchor\" href=\"#option-cargo-build--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-build---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--q\"><a class=\"option-anchor\" href=\"#option-cargo-build--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-build---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---color\"><a class=\"option-anchor\" href=\"#option-cargo-build---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-build---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-build---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-build---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---locked\"><a class=\"option-anchor\" href=\"#option-cargo-build---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---offline\"><a class=\"option-anchor\" href=\"#option-cargo-build---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-build---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-build-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---config\"><a class=\"option-anchor\" href=\"#option-cargo-build---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--C\"><a class=\"option-anchor\" href=\"#option-cargo-build--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--h\"><a class=\"option-anchor\" href=\"#option-cargo-build--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---help\"><a class=\"option-anchor\" href=\"#option-cargo-build---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--Z\"><a class=\"option-anchor\" href=\"#option-cargo-build--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build--j\"><a class=\"option-anchor\" href=\"#option-cargo-build--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-build---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-build---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-build---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo build -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo build -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-build---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-build---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package and all of its dependencies:\n\n       cargo build\n\n2. Build with optimizations:\n\n       cargo build --release\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-rustc(1)](cargo-rustc.html)\n","doc/book/src/commands/cargo-check.md":"# cargo-check(1)\n## NAME\n\ncargo-check --- Check the current package\n\n## SYNOPSIS\n\n`cargo check` [_options_]\n\n## DESCRIPTION\n\nCheck a local package and all of its dependencies for errors. This will\nessentially compile the packages without performing the final step of code\ngeneration, which is faster than running `cargo build`. The compiler will save\nmetadata files to disk so that future runs will reuse them if the source has\nnot been modified. Some diagnostics and errors are only emitted during code\ngeneration, so they inherently won't be reported with `cargo check`.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check--p\"><a class=\"option-anchor\" href=\"#option-cargo-check--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---package\"><a class=\"option-anchor\" href=\"#option-cargo-check---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-check---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Check all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all\"><a class=\"option-anchor\" href=\"#option-cargo-check---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-check---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo check` will check all\nbinary and library targets of the selected packages. Binaries are skipped if\nthey have `required-features` that are missing.\n\nPassing target selection flags will check only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check---lib\"><a class=\"option-anchor\" href=\"#option-cargo-check---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Check the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bin\"><a class=\"option-anchor\" href=\"#option-cargo-check---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bins\"><a class=\"option-anchor\" href=\"#option-cargo-check---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Check all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---example\"><a class=\"option-anchor\" href=\"#option-cargo-check---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---examples\"><a class=\"option-anchor\" href=\"#option-cargo-check---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Check all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---test\"><a class=\"option-anchor\" href=\"#option-cargo-check---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---tests\"><a class=\"option-anchor\" href=\"#option-cargo-check---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bench\"><a class=\"option-anchor\" href=\"#option-cargo-check---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---benches\"><a class=\"option-anchor\" href=\"#option-cargo-check---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-check---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check--F\"><a class=\"option-anchor\" href=\"#option-cargo-check--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---features\"><a class=\"option-anchor\" href=\"#option-cargo-check---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-check---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-check---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check---target\"><a class=\"option-anchor\" href=\"#option-cargo-check---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Check for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--r\"><a class=\"option-anchor\" href=\"#option-cargo-check--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---release\"><a class=\"option-anchor\" href=\"#option-cargo-check---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Check optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---profile\"><a class=\"option-anchor\" href=\"#option-cargo-check---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Check with the given profile.</p>\n<p>As a special case, specifying the <code>test</code> profile will also enable checking in\ntest mode which will enable checking tests and enable the <code>test</code> cfg option.\nSee <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc tests</a> for more\ndetail.</p>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---timings\"><a class=\"option-anchor\" href=\"#option-cargo-check---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-check---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check--v\"><a class=\"option-anchor\" href=\"#option-cargo-check--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-check---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--q\"><a class=\"option-anchor\" href=\"#option-cargo-check--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-check---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---color\"><a class=\"option-anchor\" href=\"#option-cargo-check---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-check---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-check---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-check---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---locked\"><a class=\"option-anchor\" href=\"#option-cargo-check---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---offline\"><a class=\"option-anchor\" href=\"#option-cargo-check---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-check---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-check-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---config\"><a class=\"option-anchor\" href=\"#option-cargo-check---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--C\"><a class=\"option-anchor\" href=\"#option-cargo-check--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--h\"><a class=\"option-anchor\" href=\"#option-cargo-check--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---help\"><a class=\"option-anchor\" href=\"#option-cargo-check---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--Z\"><a class=\"option-anchor\" href=\"#option-cargo-check--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check--j\"><a class=\"option-anchor\" href=\"#option-cargo-check--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-check---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-check---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-check---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo check -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo check -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-check---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-check---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Check the local package for errors:\n\n       cargo check\n\n2. Check all targets, including unit tests:\n\n       cargo check --all-targets --profile=test\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n","doc/book/src/commands/cargo-clean.md":"# cargo-clean(1)\n## NAME\n\ncargo-clean --- Remove generated artifacts\n\n## SYNOPSIS\n\n`cargo clean` [_options_]\n\n## DESCRIPTION\n\nRemove artifacts from the target directory that Cargo has generated in the\npast.\n\nWith no options, `cargo clean` will delete the entire target directory.\n\n## OPTIONS\n\n### Package Selection\n\nWhen no packages are selected, all packages and all dependencies in the\nworkspace are cleaned.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean--p\"><a class=\"option-anchor\" href=\"#option-cargo-clean--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---package\"><a class=\"option-anchor\" href=\"#option-cargo-clean---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Clean only the specified packages. This flag may be specified\nmultiple times. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC format.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-clean---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Clean artifacts of the workspace members.</p>\n</dd>\n\n\n</dl>\n\n### Clean Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-clean---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a summary of what would be deleted without deleting anything.\nUse with <code>--verbose</code> to display the actual files that would be deleted.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---doc\"><a class=\"option-anchor\" href=\"#option-cargo-clean---doc\"><code>--doc</code></a></dt>\n<dd class=\"option-desc\"><p>This option will cause <code>cargo clean</code> to remove only the <code>doc</code> directory in\nthe target directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---release\"><a class=\"option-anchor\" href=\"#option-cargo-clean---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Remove artifacts only in the <code>release</code> directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---profile\"><a class=\"option-anchor\" href=\"#option-cargo-clean---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Remove artifacts only in the directory with the given profile name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-clean---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---target\"><a class=\"option-anchor\" href=\"#option-cargo-clean---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Clean for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-clean--v\"><a class=\"option-anchor\" href=\"#option-cargo-clean--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-clean---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--q\"><a class=\"option-anchor\" href=\"#option-cargo-clean--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-clean---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---color\"><a class=\"option-anchor\" href=\"#option-cargo-clean---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-clean---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-clean---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---locked\"><a class=\"option-anchor\" href=\"#option-cargo-clean---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---offline\"><a class=\"option-anchor\" href=\"#option-cargo-clean---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-clean---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-clean-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---config\"><a class=\"option-anchor\" href=\"#option-cargo-clean---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--C\"><a class=\"option-anchor\" href=\"#option-cargo-clean--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--h\"><a class=\"option-anchor\" href=\"#option-cargo-clean--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---help\"><a class=\"option-anchor\" href=\"#option-cargo-clean---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--Z\"><a class=\"option-anchor\" href=\"#option-cargo-clean--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove the entire target directory:\n\n       cargo clean\n\n2. Remove only the release artifacts:\n\n       cargo clean --release\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n","doc/book/src/commands/cargo-clippy.md":"# cargo-clippy(1)\n\n## NAME\n\ncargo-clippy --- Checks a package to catch common mistakes and improve your Rust code\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nFor information about usage and installation,\nsee [Clippy Documentation](../../clippy/index.html).\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-fix(1)](cargo-fix.md),\n[cargo-fmt(1)](cargo-fmt.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n","doc/book/src/commands/cargo-doc.md":"# cargo-doc(1)\n## NAME\n\ncargo-doc --- Build a package's documentation\n\n## SYNOPSIS\n\n`cargo doc` [_options_]\n\n## DESCRIPTION\n\nBuild the documentation for the local package and all dependencies. The output\nis placed in `target/doc` in rustdoc's usual format.\n\n**Note:** Documentation generation is cumulative: existing doc files in the target directory are preserved across different `cargo doc` invocations. To remove existing generated docs, pass `--doc` to [cargo-clean(1)](cargo-clean.html).\n\n## OPTIONS\n\n### Documentation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---open\"><a class=\"option-anchor\" href=\"#option-cargo-doc---open\"><code>--open</code></a></dt>\n<dd class=\"option-desc\"><p>Open the docs in a browser after building them. This will use your default\nbrowser unless you define another one in the <code>BROWSER</code> environment variable\nor use the <a href=\"../reference/config.html#docbrowser\"><code>doc.browser</code></a> configuration\noption.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---no-deps\"><a class=\"option-anchor\" href=\"#option-cargo-doc---no-deps\"><code>--no-deps</code></a></dt>\n<dd class=\"option-desc\"><p>Do not build documentation for dependencies.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---document-private-items\"><a class=\"option-anchor\" href=\"#option-cargo-doc---document-private-items\"><code>--document-private-items</code></a></dt>\n<dd class=\"option-desc\"><p>Include non-public items in the documentation. This will be enabled by default if documenting a binary target.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc--p\"><a class=\"option-anchor\" href=\"#option-cargo-doc--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---package\"><a class=\"option-anchor\" href=\"#option-cargo-doc---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-doc---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Document all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---all\"><a class=\"option-anchor\" href=\"#option-cargo-doc---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-doc---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo doc` will document all\nbinary and library targets of the selected package. The binary will be skipped\nif its name is the same as the lib target. Binaries are skipped if they have\n`required-features` that are missing.\n\nThe default behavior can be changed by setting `doc = false` for the target in\nthe manifest settings. Using target selection options will ignore the `doc`\nflag and will always document the given target.\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-doc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Document the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-doc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-doc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Document all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---example\"><a class=\"option-anchor\" href=\"#option-cargo-doc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-doc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Document all example targets.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc--F\"><a class=\"option-anchor\" href=\"#option-cargo-doc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---target\"><a class=\"option-anchor\" href=\"#option-cargo-doc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Document for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--r\"><a class=\"option-anchor\" href=\"#option-cargo-doc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---release\"><a class=\"option-anchor\" href=\"#option-cargo-doc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Document optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-doc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Document with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-doc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-doc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc--v\"><a class=\"option-anchor\" href=\"#option-cargo-doc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-doc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--q\"><a class=\"option-anchor\" href=\"#option-cargo-doc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-doc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---color\"><a class=\"option-anchor\" href=\"#option-cargo-doc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-doc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-doc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-doc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-doc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-doc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-doc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-doc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---config\"><a class=\"option-anchor\" href=\"#option-cargo-doc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--C\"><a class=\"option-anchor\" href=\"#option-cargo-doc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--h\"><a class=\"option-anchor\" href=\"#option-cargo-doc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---help\"><a class=\"option-anchor\" href=\"#option-cargo-doc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-doc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc--j\"><a class=\"option-anchor\" href=\"#option-cargo-doc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-doc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-doc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo doc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo doc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---output-format\"><a class=\"option-anchor\" href=\"#option-cargo-doc---output-format\"><code>--output-format</code></a></dt>\n<dd class=\"option-desc\"><p>The output type for the documentation emitted. Valid values:</p>\n<ul>\n<li><code>html</code> (default): Emit the documentation in HTML format.</li>\n<li><code>json</code>: Emit the documentation in the <a href=\"https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types\">experimental JSON format</a>.</li>\n</ul>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package documentation and its dependencies and output to\n   `target/doc`.\n\n       cargo doc\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-rustdoc(1)](cargo-rustdoc.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n","doc/book/src/commands/cargo-fetch.md":"# cargo-fetch(1)\n## NAME\n\ncargo-fetch --- Fetch dependencies of a package from the network\n\n## SYNOPSIS\n\n`cargo fetch` [_options_]\n\n## DESCRIPTION\n\nIf a `Cargo.lock` file is available, this command will ensure that all of the\ngit dependencies and/or registry dependencies are downloaded and locally\navailable. Subsequent Cargo commands will be able to run offline after a `cargo\nfetch` unless the lock file changes.\n\nIf the lock file is not available, then this command will generate the lock\nfile before fetching the dependencies.\n\nIf `--target` is not specified, then all target dependencies are fetched.\n\n## OPTIONS\n\n### Fetch options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch---target\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Fetch for the specified target architecture. Flag may be specified multiple times. The default is all architectures. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch--v\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--q\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---color\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---locked\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---offline\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fetch-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-fetch-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---config\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--C\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--h\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---help\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--Z\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Fetch all dependencies:\n\n       cargo fetch\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-update(1)](cargo-update.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\n","doc/book/src/commands/cargo-fix.md":"# cargo-fix(1)\n## NAME\n\ncargo-fix --- Automatically fix lint warnings reported by rustc\n\n## SYNOPSIS\n\n`cargo fix` [_options_]\n\n## DESCRIPTION\n\nThis Cargo subcommand will automatically take rustc's suggestions from\ndiagnostics like warnings and apply them to your source code. This is intended\nto help automate tasks that rustc itself already knows how to tell you to fix!\n\nExecuting `cargo fix` will under the hood execute [cargo-check(1)](cargo-check.html). Any warnings\napplicable to your crate will be automatically fixed (if possible) and all\nremaining warnings will be displayed when the check process is finished. For\nexample if you'd like to apply all fixes to the current package, you can run:\n\n    cargo fix\n\nwhich behaves the same as `cargo check --all-targets`.\n\n`cargo fix` is only capable of fixing code that is normally compiled with\n`cargo check`. If code is conditionally enabled with optional features, you\nwill need to enable those features for that code to be analyzed:\n\n    cargo fix --features foo\n\nSimilarly, other `cfg` expressions like platform-specific code will need to\npass `--target` to fix code for the given target.\n\n    cargo fix --target x86_64-pc-windows-gnu\n\nIf you encounter any problems with `cargo fix` or otherwise have any questions\nor feature requests please don't hesitate to file an issue at\n<https://github.com/rust-lang/cargo>.\n\n### Edition migration\n\nThe `cargo fix` subcommand can also be used to migrate a package from one\n[edition] to the next. The general procedure is:\n\n1. Run `cargo fix --edition`. Consider also using the `--all-features` flag if\n   your project has multiple features. You may also want to run `cargo fix\n   --edition` multiple times with different `--target` flags if your project\n   has platform-specific code gated by `cfg` attributes.\n2. Modify `Cargo.toml` to set the [edition field] to the new edition.\n3. Run your project tests to verify that everything still works. If new\n   warnings are issued, you may want to consider running `cargo fix` again\n   (without the `--edition` flag) to apply any suggestions given by the\n   compiler.\n\nAnd hopefully that's it! Just keep in mind of the caveats mentioned above that\n`cargo fix` cannot update code for inactive features or `cfg` expressions.\nAlso, in some rare cases the compiler is unable to automatically migrate all\ncode to the new edition, and this may require manual changes after building\nwith the new edition.\n\n[edition]: https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html\n[edition field]: ../reference/manifest.html#the-edition-field\n\n## OPTIONS\n\n### Fix options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---broken-code\"><a class=\"option-anchor\" href=\"#option-cargo-fix---broken-code\"><code>--broken-code</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if it already has compiler errors. This is useful if <code>cargo fix</code>\nfails to apply the changes. It will apply the changes and leave the broken\ncode in the working directory for you to inspect and manually fix.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---edition\"><a class=\"option-anchor\" href=\"#option-cargo-fix---edition\"><code>--edition</code></a></dt>\n<dd class=\"option-desc\"><p>Apply changes that will update the code to the next edition. This will not\nupdate the edition in the <code>Cargo.toml</code> manifest, which must be updated\nmanually after <code>cargo fix --edition</code> has finished.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---edition-idioms\"><a class=\"option-anchor\" href=\"#option-cargo-fix---edition-idioms\"><code>--edition-idioms</code></a></dt>\n<dd class=\"option-desc\"><p>Apply suggestions that will update code to the preferred style for the current\nedition.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-no-vcs\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-no-vcs\"><code>--allow-no-vcs</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if a VCS was not detected.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if the working directory has changes (including staged changes).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-staged\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-staged\"><code>--allow-staged</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if the working directory has staged changes.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix--p\"><a class=\"option-anchor\" href=\"#option-cargo-fix--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---package\"><a class=\"option-anchor\" href=\"#option-cargo-fix---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-fix---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-fix---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo fix` will fix all targets\n(`--all-targets` implied). Binaries are skipped if they have\n`required-features` that are missing.\n\nPassing target selection flags will fix only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---lib\"><a class=\"option-anchor\" href=\"#option-cargo-fix---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Fix the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bin\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bins\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---example\"><a class=\"option-anchor\" href=\"#option-cargo-fix---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---examples\"><a class=\"option-anchor\" href=\"#option-cargo-fix---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---test\"><a class=\"option-anchor\" href=\"#option-cargo-fix---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---tests\"><a class=\"option-anchor\" href=\"#option-cargo-fix---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bench\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---benches\"><a class=\"option-anchor\" href=\"#option-cargo-fix---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix--F\"><a class=\"option-anchor\" href=\"#option-cargo-fix--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---target\"><a class=\"option-anchor\" href=\"#option-cargo-fix---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Fix for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--r\"><a class=\"option-anchor\" href=\"#option-cargo-fix--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---release\"><a class=\"option-anchor\" href=\"#option-cargo-fix---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Fix optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---profile\"><a class=\"option-anchor\" href=\"#option-cargo-fix---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Fix with the given profile.</p>\n<p>As a special case, specifying the <code>test</code> profile will also enable checking in\ntest mode which will enable checking tests and enable the <code>test</code> cfg option.\nSee <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc tests</a> for more\ndetail.</p>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---timings\"><a class=\"option-anchor\" href=\"#option-cargo-fix---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-fix---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix--v\"><a class=\"option-anchor\" href=\"#option-cargo-fix--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-fix---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--q\"><a class=\"option-anchor\" href=\"#option-cargo-fix--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-fix---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---color\"><a class=\"option-anchor\" href=\"#option-cargo-fix---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-fix---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-fix---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-fix---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---locked\"><a class=\"option-anchor\" href=\"#option-cargo-fix---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---offline\"><a class=\"option-anchor\" href=\"#option-cargo-fix---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-fix---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-fix-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---config\"><a class=\"option-anchor\" href=\"#option-cargo-fix---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--C\"><a class=\"option-anchor\" href=\"#option-cargo-fix--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--h\"><a class=\"option-anchor\" href=\"#option-cargo-fix--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---help\"><a class=\"option-anchor\" href=\"#option-cargo-fix---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--Z\"><a class=\"option-anchor\" href=\"#option-cargo-fix--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix--j\"><a class=\"option-anchor\" href=\"#option-cargo-fix--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-fix---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-fix---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo fix -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo fix -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Apply compiler suggestions to the local package:\n\n       cargo fix\n\n2. Update a package to prepare it for the next edition:\n\n       cargo fix --edition\n\n3. Apply suggested idioms for the current edition:\n\n       cargo fix --edition-idioms\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-check(1)](cargo-check.html)\n","doc/book/src/commands/cargo-fmt.md":"# cargo-fmt(1)\n\n## NAME\n\ncargo-fmt --- Formats all bin and lib files of the current crate using rustfmt\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nFor information about usage and installation,\nsee <https://github.com/rust-lang/rustfmt>.\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-fix(1)](cargo-fix.md),\n[cargo-clippy(1)](cargo-clippy.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n","doc/book/src/commands/cargo-generate-lockfile.md":"# cargo-generate-lockfile(1)\n\n## NAME\n\ncargo-generate-lockfile --- Generate the lockfile for a package\n\n## SYNOPSIS\n\n`cargo generate-lockfile` [_options_]\n\n## DESCRIPTION\n\nThis command will create the `Cargo.lock` lockfile for the current package or\nworkspace. If the lockfile already exists, it will be rebuilt with the latest\navailable version of every package.\n\nSee also [cargo-update(1)](cargo-update.html) which is also capable of creating a `Cargo.lock`\nlockfile and has more options for controlling update behavior.\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--v\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--q\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---color\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---publish-time\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---publish-time\"><code>--publish-time</code> <em>yyyy-mm-ddThh:mm:ssZ</em></a></dt>\n<dd class=\"option-desc\"><p>Latest publish time allowed for registry packages (Unstable)</p>\n<p>This is a best-effort filter on allowed packages, including:</p>\n<ul>\n<li>packages from unsupported registries are always accepted</li>\n<li>only the current yank state is respected, not the state as of <code>--publish-time</code></li>\n<li>precision of the publish time</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---locked\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---offline\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---config\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--C\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--h\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---help\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--Z\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create or update the lockfile for the current package or workspace:\n\n       cargo generate-lockfile\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-update(1)](cargo-update.html)\n","doc/book/src/commands/cargo-help.md":"# cargo-help(1)\n\n## NAME\n\ncargo-help --- Get help for a Cargo command\n\n## SYNOPSIS\n\n`cargo help` [_subcommand_]\n\n## DESCRIPTION\n\nPrints a help message for the given command.\n\nFor commands with subcommands, separate the command levels with spaces. For\nexample, `cargo help report future-incompatibilities` displays help for the\n`cargo report future-incompatibilities` command.\n\nSpaces separate hierarchy levels only between a parent command and its\nsubcommands. Dashes that are part of a command's name, such as\n`generate-lockfile`, must always be preserved.\n\nMultiple command levels can also be written as a single dash-joined word.\nFor example, `cargo help report-future-incompatibilities` is equivalent to\n`cargo help report future-incompatibilities`.\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-help--v\"><a class=\"option-anchor\" href=\"#option-cargo-help--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-help---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--q\"><a class=\"option-anchor\" href=\"#option-cargo-help--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-help---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---color\"><a class=\"option-anchor\" href=\"#option-cargo-help---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-help---locked\"><a class=\"option-anchor\" href=\"#option-cargo-help---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---offline\"><a class=\"option-anchor\" href=\"#option-cargo-help---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-help---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-help-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-help-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---config\"><a class=\"option-anchor\" href=\"#option-cargo-help---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--C\"><a class=\"option-anchor\" href=\"#option-cargo-help--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--h\"><a class=\"option-anchor\" href=\"#option-cargo-help--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---help\"><a class=\"option-anchor\" href=\"#option-cargo-help---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--Z\"><a class=\"option-anchor\" href=\"#option-cargo-help--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Get help for a command:\n\n       cargo help build\n\n2. Get help for a nested command:\n\n       cargo help report future-incompatibilities\n\n3. The dash-joined form also works:\n\n       cargo help report-future-incompatibilities\n\n4. Help is also available with the `--help` flag:\n\n       cargo build --help\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n","doc/book/src/commands/cargo-info.md":"# cargo-info(1)\n\n## NAME\n\ncargo-info --- Display information about a package.\n\n## SYNOPSIS\n\n`cargo info` [_options_] _spec_\n\n## DESCRIPTION\n\nThis command displays information about a package. It fetches data from the package's Cargo.toml file\nand presents it in a human-readable format.\n\n## OPTIONS\n\n### Info Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-info-spec\"><a class=\"option-anchor\" href=\"#option-cargo-info-spec\"><em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Fetch information about the specified package. The <em>spec</em> can be a package ID, see <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.\nIf the specified package is part of the current workspace, information from the local Cargo.toml file will be displayed.\nIf the <code>Cargo.lock</code> file does not exist, it will be created. If no version is specified, the appropriate version will be\nselected based on the Minimum Supported Rust Version (MSRV).</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-info---index\"><a class=\"option-anchor\" href=\"#option-cargo-info---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-info---registry\"><a class=\"option-anchor\" href=\"#option-cargo-info---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-info--v\"><a class=\"option-anchor\" href=\"#option-cargo-info--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-info---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--q\"><a class=\"option-anchor\" href=\"#option-cargo-info--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-info---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---color\"><a class=\"option-anchor\" href=\"#option-cargo-info---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-info---locked\"><a class=\"option-anchor\" href=\"#option-cargo-info---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---offline\"><a class=\"option-anchor\" href=\"#option-cargo-info---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-info---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-info-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-info-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---config\"><a class=\"option-anchor\" href=\"#option-cargo-info---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--C\"><a class=\"option-anchor\" href=\"#option-cargo-info--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--h\"><a class=\"option-anchor\" href=\"#option-cargo-info--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---help\"><a class=\"option-anchor\" href=\"#option-cargo-info---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--Z\"><a class=\"option-anchor\" href=\"#option-cargo-info--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Inspect the `serde` package from crates.io:\n\n        cargo info serde\n2. Inspect the `serde` package with version `1.0.0`:\n\n        cargo info serde@1.0.0\n3. Inspect the `serde` package from the local registry:\n\n        cargo info serde --registry my-registry\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-search(1)](cargo-search.html)\n","doc/book/src/commands/cargo-init.md":"# cargo-init(1)\n\n## NAME\n\ncargo-init --- Create a new Cargo package in an existing directory\n\n## SYNOPSIS\n\n`cargo init` [_options_] [_path_]\n\n## DESCRIPTION\n\nThis command will create a new Cargo manifest in the current directory. Give a\npath as an argument to create in the given directory.\n\nIf there are typically-named Rust source files already in the directory, those\nwill be used. If not, then a sample `src/main.rs` file will be created, or\n`src/lib.rs` if `--lib` is passed.\n\nIf the directory is not already in a VCS repository, then a new repository\nis created (see `--vcs` below).\n\nSee [cargo-new(1)](cargo-new.html) for a similar command which will create a new package in\na new directory.\n\n## OPTIONS\n\n### Init Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-init---bin\"><a class=\"option-anchor\" href=\"#option-cargo-init---bin\"><code>--bin</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a binary target (<code>src/main.rs</code>).\nThis is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---lib\"><a class=\"option-anchor\" href=\"#option-cargo-init---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a library target (<code>src/lib.rs</code>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---edition\"><a class=\"option-anchor\" href=\"#option-cargo-init---edition\"><code>--edition</code> <em>edition</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the Rust edition to use. Default is 2024.\nPossible values: 2015, 2018, 2021, 2024</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---name\"><a class=\"option-anchor\" href=\"#option-cargo-init---name\"><code>--name</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Set the package name. Defaults to the directory name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---vcs\"><a class=\"option-anchor\" href=\"#option-cargo-init---vcs\"><code>--vcs</code> <em>vcs</em></a></dt>\n<dd class=\"option-desc\"><p>Initialize a new VCS repository for the given version control system (git,\nhg, pijul, or fossil) or do not initialize any version control at all\n(none). If not specified, defaults to <code>git</code> or the configuration value\n<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---registry\"><a class=\"option-anchor\" href=\"#option-cargo-init---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name\nwhich will restrict publishing only to that registry.</p>\n<p>Registry names are defined in <a href=\"../reference/config.html\">Cargo config files</a>.\nIf not specified, the default registry defined by the <code>registry.default</code>\nconfig key is used. If the default registry is not set and <code>--registry</code> is not\nused, the <code>publish</code> field will not be set which means that publishing will not\nbe restricted.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-init--v\"><a class=\"option-anchor\" href=\"#option-cargo-init--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-init---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--q\"><a class=\"option-anchor\" href=\"#option-cargo-init--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-init---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---color\"><a class=\"option-anchor\" href=\"#option-cargo-init---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-init-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-init-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---config\"><a class=\"option-anchor\" href=\"#option-cargo-init---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--C\"><a class=\"option-anchor\" href=\"#option-cargo-init--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--h\"><a class=\"option-anchor\" href=\"#option-cargo-init--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---help\"><a class=\"option-anchor\" href=\"#option-cargo-init---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--Z\"><a class=\"option-anchor\" href=\"#option-cargo-init--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a binary Cargo package in the current directory:\n\n       cargo init\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-new(1)](cargo-new.html)\n","doc/book/src/commands/cargo-install.md":"# cargo-install(1)\n## NAME\n\ncargo-install --- Build and install a Rust binary\n\n## SYNOPSIS\n\n`cargo install` [_options_] _crate_[@_version_]...\\\n`cargo install` [_options_] `--path` _path_\\\n`cargo install` [_options_] `--git` _url_ [_crate_...]\\\n`cargo install` [_options_] `--list`\n\n## DESCRIPTION\n\nThis command manages Cargo's local set of installed binary crates. Only\npackages which have executable `[[bin]]` or `[[example]]` targets can be\ninstalled, and all executables are installed into the installation root's\n`bin` folder. By default only binaries, not examples, are installed.\n\nThe installation root is determined, in order of precedence:\n\n- `--root` option\n- `CARGO_INSTALL_ROOT` environment variable\n- `install.root` Cargo [config value](../reference/config.html)\n- `CARGO_HOME` environment variable\n- `$HOME/.cargo`\n\nThere are multiple sources from which a crate can be installed. The default\nsource location is crates.io but the `--git`, `--path`, and `--registry` flags\ncan change this source. If the source contains more than one package (such as\ncrates.io or a git repository with multiple crates) the _crate_ argument is\nrequired to indicate which crate should be installed.\n\nCrates from crates.io can optionally specify the version they wish to install\nvia the `--version` flags, and similarly packages from git repositories can\noptionally specify the branch, tag, or revision that should be installed. If a\ncrate has multiple binaries, the `--bin` argument can selectively install only\none of them, and if you'd rather install examples the `--example` argument can\nbe used as well.\n\nIf the package is already installed, Cargo will reinstall it if the installed\nversion does not appear to be up-to-date. If any of the following values\nchange, then Cargo will reinstall the package:\n\n- The package version and source.\n- The set of binary names installed.\n- The chosen features.\n- The profile (`--profile`).\n- The target (`--target`).\n\nInstalling with `--path` will always build and install, unless there are\nconflicting binaries from another package. The `--force` flag may be used to\nforce Cargo to always reinstall the package.\n\nIf the source is crates.io or `--git` then by default the crate will be built\nin a temporary target directory. To avoid this, the target directory can be\nspecified by setting the `CARGO_TARGET_DIR` environment variable to a\npath. In particular, this can be useful for caching build artifacts on\ncontinuous integration systems.\n\n### Dealing with the Lockfile\n\nBy default, Cargo uses the `Cargo.lock` file included with the package if it is\navailable. This ensures that the installed executable uses the dependency versions\nselected when the package was published. If no lockfile is available, including for\npackages published with versions of Cargo before 1.37, Cargo resolves the dependencies\nnormally.\n\nThe `--locked` flag does not currently change dependency resolution for `cargo install`.\nIf no `Cargo.lock` is available, using `--locked` emits a warning.\n\n### Configuration Discovery\n\nThis command operates on system or user level, not project level.\nThis means that the local [configuration discovery] is ignored.\nInstead, the configuration discovery begins at `$CARGO_HOME/config.toml`. \nIf the package is installed with `--path $PATH`, the local configuration \nwill be used, beginning discovery at `$PATH/.cargo/config.toml`.\n\n[configuration discovery]: ../reference/config.html#hierarchical-structure\n\n## OPTIONS\n\n### Install Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install---vers\"><a class=\"option-anchor\" href=\"#option-cargo-install---vers\"><code>--vers</code> <em>version</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---version\"><a class=\"option-anchor\" href=\"#option-cargo-install---version\"><code>--version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>Specify a version to install. This may be a <a href=\"../reference/specifying-dependencies.html\">version\nrequirement</a>, like <code>~1.2</code>, to have Cargo\nselect the newest version from the given requirement. If the version does not\nhave a requirement operator (such as <code>^</code> or <code>~</code>), then it must be in the form\n<em>MAJOR.MINOR.PATCH</em>, and will install exactly that version; it is <em>not</em>\ntreated as a caret requirement like Cargo dependencies are.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---git\"><a class=\"option-anchor\" href=\"#option-cargo-install---git\"><code>--git</code> <em>url</em></a></dt>\n<dd class=\"option-desc\"><p>Git URL to install the specified crate from.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---branch\"><a class=\"option-anchor\" href=\"#option-cargo-install---branch\"><code>--branch</code> <em>branch</em></a></dt>\n<dd class=\"option-desc\"><p>Branch to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---tag\"><a class=\"option-anchor\" href=\"#option-cargo-install---tag\"><code>--tag</code> <em>tag</em></a></dt>\n<dd class=\"option-desc\"><p>Tag to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---rev\"><a class=\"option-anchor\" href=\"#option-cargo-install---rev\"><code>--rev</code> <em>sha</em></a></dt>\n<dd class=\"option-desc\"><p>Specific commit to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---path\"><a class=\"option-anchor\" href=\"#option-cargo-install---path\"><code>--path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Filesystem path to local crate to install from.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---list\"><a class=\"option-anchor\" href=\"#option-cargo-install---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List all installed packages and their versions.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--n\"><a class=\"option-anchor\" href=\"#option-cargo-install--n\"><code>-n</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-install---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>(unstable) Perform all checks without installing.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--f\"><a class=\"option-anchor\" href=\"#option-cargo-install--f\"><code>-f</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---force\"><a class=\"option-anchor\" href=\"#option-cargo-install---force\"><code>--force</code></a></dt>\n<dd class=\"option-desc\"><p>Force overwriting existing crates or binaries. This can be used if a package\nhas installed a binary with the same name as another package. This is also\nuseful if something has changed on the system that you want to rebuild with,\nsuch as a newer version of <code>rustc</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---no-track\"><a class=\"option-anchor\" href=\"#option-cargo-install---no-track\"><code>--no-track</code></a></dt>\n<dd class=\"option-desc\"><p>By default, Cargo keeps track of the installed packages with a metadata file\nstored in the installation root directory. This flag tells Cargo not to use or\ncreate that file. With this flag, Cargo will refuse to overwrite any existing\nfiles unless the <code>--force</code> flag is used. This also disables Cargo’s ability to\nprotect against multiple concurrent invocations of Cargo installing at the\nsame time.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---bin\"><a class=\"option-anchor\" href=\"#option-cargo-install---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Install only the specified binary.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---bins\"><a class=\"option-anchor\" href=\"#option-cargo-install---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Install all binaries. This is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---example\"><a class=\"option-anchor\" href=\"#option-cargo-install---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Install only the specified example.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---examples\"><a class=\"option-anchor\" href=\"#option-cargo-install---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Install all examples.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---root\"><a class=\"option-anchor\" href=\"#option-cargo-install---root\"><code>--root</code> <em>dir</em></a></dt>\n<dd class=\"option-desc\"><p>Directory to install packages into.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---registry\"><a class=\"option-anchor\" href=\"#option-cargo-install---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---index\"><a class=\"option-anchor\" href=\"#option-cargo-install---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install--F\"><a class=\"option-anchor\" href=\"#option-cargo-install--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---features\"><a class=\"option-anchor\" href=\"#option-cargo-install---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-install---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-install---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install---target\"><a class=\"option-anchor\" href=\"#option-cargo-install---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Install for the specified target architecture. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-install---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to a new temporary folder located in the\ntemporary directory of the platform.</p>\n<p>When using <code>--path</code>, by default it will use <code>target</code> directory in the workspace\nof the local crate unless <code>--target-dir</code>\nis specified.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---debug\"><a class=\"option-anchor\" href=\"#option-cargo-install---debug\"><code>--debug</code></a></dt>\n<dd class=\"option-desc\"><p>Build with the <code>debug</code> profile instead of the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---profile\"><a class=\"option-anchor\" href=\"#option-cargo-install---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Install with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---timings\"><a class=\"option-anchor\" href=\"#option-cargo-install---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-install---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---locked\"><a class=\"option-anchor\" href=\"#option-cargo-install---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---offline\"><a class=\"option-anchor\" href=\"#option-cargo-install---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-install---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install--j\"><a class=\"option-anchor\" href=\"#option-cargo-install--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-install---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-install---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-install---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo install -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo install -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install--v\"><a class=\"option-anchor\" href=\"#option-cargo-install--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-install---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--q\"><a class=\"option-anchor\" href=\"#option-cargo-install--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-install---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---color\"><a class=\"option-anchor\" href=\"#option-cargo-install---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-install---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-install-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---config\"><a class=\"option-anchor\" href=\"#option-cargo-install---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--C\"><a class=\"option-anchor\" href=\"#option-cargo-install--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--h\"><a class=\"option-anchor\" href=\"#option-cargo-install--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---help\"><a class=\"option-anchor\" href=\"#option-cargo-install---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--Z\"><a class=\"option-anchor\" href=\"#option-cargo-install--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Install or upgrade a package from crates.io:\n\n       cargo install ripgrep\n\n2. Install or reinstall the package in the current directory:\n\n       cargo install --path .\n\n3. View the list of installed packages:\n\n       cargo install --list\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-uninstall(1)](cargo-uninstall.html), [cargo-search(1)](cargo-search.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-locate-project.md":"# cargo-locate-project(1)\n\n## NAME\n\ncargo-locate-project --- Print a JSON representation of a Cargo.toml file's location\n\n## SYNOPSIS\n\n`cargo locate-project` [_options_]\n\n## DESCRIPTION\n\nThis command will print a JSON object to stdout with the full path to the manifest. The\nmanifest is found by searching upward for a file named `Cargo.toml` starting from the current\nworking directory.\n\nIf the project happens to be a part of a workspace, the manifest of the project, rather than\nthe workspace root, is output. This can be overridden by the `--workspace` flag. The root\nworkspace is found by traversing further upward or by using the field `package.workspace` after\nlocating the manifest of a workspace member.\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Locate the <code>Cargo.toml</code> at the root of the workspace, as opposed to the current\nworkspace member.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The representation in which to print the project location. Valid values:</p>\n<ul>\n<li><code>json</code> (default): JSON object with the path under the key “root”.</li>\n<li><code>plain</code>: Just the path.</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--v\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--q\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---color\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---config\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--C\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--h\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---help\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--Z\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the path to the manifest based on the current directory:\n\n       cargo locate-project\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-metadata(1)](cargo-metadata.html)\n","doc/book/src/commands/cargo-login.md":"# cargo-login(1)\n\n## NAME\n\ncargo-login --- Log in to a registry\n\n## SYNOPSIS\n\n`cargo login` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThis command will run a credential provider to save a token so that commands\nthat require authentication, such as [cargo-publish(1)](cargo-publish.html), will be\nautomatically authenticated.\n\nAll the arguments following the two dashes (`--`) are passed to the credential provider.\n\nFor the default `cargo:token` credential provider, the token is saved\nin `$CARGO_HOME/credentials.toml`. `CARGO_HOME` defaults to `.cargo`\nin your home directory.\n\nIf a registry has a credential-provider specified, it will be used. Otherwise,\nthe providers from the config value `registry.global-credential-providers` will\nbe attempted, starting from the end of the list.\n\nThe _token_ will be read from stdin.\n\nThe API token for crates.io may be retrieved from <https://crates.io/me>.\n\nTake care to keep the token secret, it should not be shared with anyone else.\n\n## OPTIONS\n\n### Login Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-login---registry\"><a class=\"option-anchor\" href=\"#option-cargo-login---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-login--v\"><a class=\"option-anchor\" href=\"#option-cargo-login--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-login---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--q\"><a class=\"option-anchor\" href=\"#option-cargo-login--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-login---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login---color\"><a class=\"option-anchor\" href=\"#option-cargo-login---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-login-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-login-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login---config\"><a class=\"option-anchor\" href=\"#option-cargo-login---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--C\"><a class=\"option-anchor\" href=\"#option-cargo-login--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--h\"><a class=\"option-anchor\" href=\"#option-cargo-login--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---help\"><a class=\"option-anchor\" href=\"#option-cargo-login---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--Z\"><a class=\"option-anchor\" href=\"#option-cargo-login--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Save the token for the default registry:\n\n       cargo login\n\n2. Save the token for a specific registry:\n\n       cargo login --registry my-registry\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-logout(1)](cargo-logout.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-logout.md":"# cargo-logout(1)\n\n## NAME\n\ncargo-logout --- Remove an API token from the registry locally\n\n## SYNOPSIS\n\n`cargo logout` [_options_]\n\n## DESCRIPTION\n\nThis command will run a credential provider to remove a saved token.\n\nFor the default `cargo:token` credential provider, credentials are stored\nin `$CARGO_HOME/credentials.toml` where `$CARGO_HOME` defaults to `.cargo`\nin your home directory.\n\nIf a registry has a credential-provider specified, it will be used. Otherwise,\nthe providers from the config value `registry.global-credential-providers` will\nbe attempted, starting from the end of the list.\n\nIf `--registry` is not specified, then the credentials for the default\nregistry will be removed (configured by\n[`registry.default`](../reference/config.html#registrydefault), which defaults\nto <https://crates.io/>).\n\nThis will not revoke the token on the server. If you need to revoke the token,\nvisit the registry website and follow its instructions (see\n<https://crates.io/me> to revoke the token for <https://crates.io/>).\n\n## OPTIONS\n\n### Logout Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-logout---registry\"><a class=\"option-anchor\" href=\"#option-cargo-logout---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-logout--v\"><a class=\"option-anchor\" href=\"#option-cargo-logout--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-logout---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--q\"><a class=\"option-anchor\" href=\"#option-cargo-logout--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-logout---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout---color\"><a class=\"option-anchor\" href=\"#option-cargo-logout---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-logout-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-logout-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout---config\"><a class=\"option-anchor\" href=\"#option-cargo-logout---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--C\"><a class=\"option-anchor\" href=\"#option-cargo-logout--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--h\"><a class=\"option-anchor\" href=\"#option-cargo-logout--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---help\"><a class=\"option-anchor\" href=\"#option-cargo-logout---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--Z\"><a class=\"option-anchor\" href=\"#option-cargo-logout--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove the default registry token:\n\n       cargo logout\n\n2. Remove the token for a specific registry:\n\n       cargo logout --registry my-registry\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html)\n","doc/book/src/commands/cargo-metadata.md":"# cargo-metadata(1)\n\n## NAME\n\ncargo-metadata --- Machine-readable metadata about the current package\n\n## SYNOPSIS\n\n`cargo metadata` [_options_]\n\n## DESCRIPTION\n\nOutput JSON to stdout containing information about the workspace members and\nresolved dependencies of the current package.\n\nThe output format is subject to change in future versions of Cargo. It\nis recommended to include the `--format-version` flag to future-proof your code\nand ensure the output is in the format you are expecting. For more on the\nexpectations, see [\"Compatibility\"](#compatibility).\n\nSee the [cargo_metadata crate](https://crates.io/crates/cargo_metadata)\nfor a Rust API for reading the metadata.\n\n## OUTPUT FORMAT\n\n### Compatibility\n\nWithin the same output format version, the compatibility is maintained, except\nsome scenarios. The following is a non-exhaustive list of changes that are not\nconsidered as incompatible:\n\n* **Adding new fields** — New fields will be added when needed. Reserving this\n  helps Cargo evolve without bumping the format version too often.\n* **Adding new values for enum-like fields** — Same as adding new fields. It\n  keeps metadata evolving without stagnation.\n* **Changing opaque representations** — The inner representations of some\n  fields are implementation details. For example, fields related to\n  \"Source ID\" are treated as opaque identifiers to differentiate packages or\n  sources. Consumers shouldn't rely on those representations unless specified.\n\n### JSON format\n\nThe JSON output has the following format:\n\n```javascript\n{\n    /* Array of all packages in the workspace.\n       It also includes all feature-enabled dependencies unless --no-deps is used.\n    */\n    \"packages\": [\n        {\n            /* The name of the package. */\n            \"name\": \"my-package\",\n            /* The version of the package. */\n            \"version\": \"0.1.0\",\n            /* The Package ID for referring to the\n               package within the document and as the `--package` argument to many commands\n            */\n            \"id\": \"file:///path/to/my-package#0.1.0\",\n            /* The license value from the manifest, or null. */\n            \"license\": \"MIT/Apache-2.0\",\n            /* The license-file value from the manifest, or null. */\n            \"license_file\": \"LICENSE\",\n            /* The description value from the manifest, or null. */\n            \"description\": \"Package description.\",\n            /* The source ID of the package, an \"opaque\" identifier representing\n               where a package is retrieved from. See \"Compatibility\" above for\n               the stability guarantee.\n\n               This is null for path dependencies and workspace members.\n\n               For other dependencies, it is a string with the format:\n               - \"registry+URL\" for registry-based dependencies.\n                 Example: \"registry+https://github.com/rust-lang/crates.io-index\"\n               - \"git+URL\" for git-based dependencies.\n                 Example: \"git+https://github.com/rust-lang/cargo?rev=5e85ba14aaa20f8133863373404cb0af69eeef2c#5e85ba14aaa20f8133863373404cb0af69eeef2c\"\n               - \"sparse+URL\" for dependencies from a sparse registry\n                 Example: \"sparse+https://my-sparse-registry.org\"\n\n               The value after the `+` is not explicitly defined, and may change\n               between versions of Cargo and may not directly correlate to other\n               things, such as registry definitions in a config file. New source\n               kinds may be added in the future which will have different `+`\n               prefixed identifiers.\n            */\n            \"source\": null,\n            /* Array of dependencies declared in the package's manifest. */\n            \"dependencies\": [\n                {\n                    /* The name of the dependency. */\n                    \"name\": \"bitflags\",\n                    /* The source ID of the dependency. May be null, see\n                       description for the package source.\n                    */\n                    \"source\": \"registry+https://github.com/rust-lang/crates.io-index\",\n                    /* The version requirement for the dependency.\n                       Dependencies without a version requirement have a value of \"*\".\n                    */\n                    \"req\": \"^1.0\",\n                    /* The dependency kind.\n                       \"dev\", \"build\", or null for a normal dependency.\n                    */\n                    \"kind\": null,\n                    /* If the dependency is renamed, this is the new name for\n                       the dependency as a string.  null if it is not renamed.\n                    */\n                    \"rename\": null,\n                    /* Boolean of whether or not this is an optional dependency. */\n                    \"optional\": false,\n                    /* Boolean of whether or not default features are enabled. */\n                    \"uses_default_features\": true,\n                    /* Array of features enabled. */\n                    \"features\": [],\n                    /* The target platform for the dependency.\n                       null if not a target dependency.\n                    */\n                    \"target\": \"cfg(windows)\",\n                    /* The file system path for a local path dependency.\n                       not present if not a path dependency.\n                    */\n                    \"path\": \"/path/to/dep\",\n                    /* A string of the URL of the registry this dependency is from.\n                       If not specified or null, the dependency is from the default\n                       registry (crates.io).\n                    */\n                    \"registry\": null,\n                    /* (unstable) Boolean flag of whether or not this is a pulbic\n                       dependency. This field is only present when\n                       `-Zpublic-dependency` is enabled.\n                    */\n                    \"public\": false\n                }\n            ],\n            /* Array of Cargo targets. */\n            \"targets\": [\n                {\n                    /* Array of target kinds.\n                       - lib targets list the `crate-type` values from the\n                         manifest such as \"lib\", \"rlib\", \"dylib\",\n                         \"proc-macro\", etc. (default [\"lib\"])\n                       - binary is [\"bin\"]\n                       - example is [\"example\"]\n                       - integration test is [\"test\"]\n                       - benchmark is [\"bench\"]\n                       - build script is [\"custom-build\"]\n                    */\n                    \"kind\": [\n                        \"bin\"\n                    ],\n                    /* Array of crate types.\n                       - lib and example libraries list the `crate-type` values\n                         from the manifest such as \"lib\", \"rlib\", \"dylib\",\n                         \"proc-macro\", etc. (default [\"lib\"])\n                       - all other target kinds are [\"bin\"]\n                    */\n                    \"crate_types\": [\n                        \"bin\"\n                    ],\n                    /* The name of the target.\n                       For lib targets, dashes will be replaced with underscores.\n                    */\n                    \"name\": \"my-package\",\n                    /* Absolute path to the root source file of the target. */\n                    \"src_path\": \"/path/to/my-package/src/main.rs\",\n                    /* The Rust edition of the target.\n                       Defaults to the package edition.\n                    */\n                    \"edition\": \"2018\",\n                    /* Array of required features.\n                       This property is not included if no required features are set.\n                    */\n                    \"required-features\": [\"feat1\"],\n                    /* Whether the target should be documented by `cargo doc`. */\n                    \"doc\": true,\n                    /* Whether or not this target has doc tests enabled, and\n                       the target is compatible with doc testing.\n                    */\n                    \"doctest\": false,\n                    /* Whether or not this target should be built and run with `--test`\n                    */\n                    \"test\": true\n                }\n            ],\n            /* Set of features defined for the package.\n               Each feature maps to an array of features or dependencies it\n               enables.\n            */\n            \"features\": {\n                \"default\": [\n                    \"feat1\"\n                ],\n                \"feat1\": [],\n                \"feat2\": []\n            },\n            /* Absolute path to this package's manifest. */\n            \"manifest_path\": \"/path/to/my-package/Cargo.toml\",\n            /* Package metadata.\n               This is null if no metadata is specified.\n            */\n            \"metadata\": {\n                \"docs\": {\n                    \"rs\": {\n                        \"all-features\": true\n                    }\n                }\n            },\n            /* List of registries to which this package may be published.\n               Publishing is unrestricted if null, and forbidden if an empty array. */\n            \"publish\": [\n                \"crates-io\"\n            ],\n            /* Array of authors from the manifest.\n               Empty array if no authors specified.\n            */\n            \"authors\": [\n                \"Jane Doe <user@example.com>\"\n            ],\n            /* Array of categories from the manifest. */\n            \"categories\": [\n                \"command-line-utilities\"\n            ],\n            /* Optional string that is the default binary picked by cargo run. */\n            \"default_run\": null,\n            /* Optional string that is the minimum supported rust version */\n            \"rust_version\": \"1.56\",\n            /* Array of keywords from the manifest. */\n            \"keywords\": [\n                \"cli\"\n            ],\n            /* The readme value from the manifest or null if not specified. */\n            \"readme\": \"README.md\",\n            /* The repository value from the manifest or null if not specified. */\n            \"repository\": \"https://github.com/rust-lang/cargo\",\n            /* The homepage value from the manifest or null if not specified. */\n            \"homepage\": \"https://rust-lang.org\",\n            /* The documentation value from the manifest or null if not specified. */\n            \"documentation\": \"https://doc.rust-lang.org/stable/std\",\n            /* The default edition of the package.\n               Note that individual targets may have different editions.\n            */\n            \"edition\": \"2018\",\n            /* Optional string that is the name of a native library the package\n               is linking to.\n            */\n            \"links\": null,\n        }\n    ],\n    /* Array of members of the workspace.\n       Each entry is the Package ID for the package.\n    */\n    \"workspace_members\": [\n        \"file:///path/to/my-package#0.1.0\",\n    ],\n    /* Array of default members of the workspace.\n       Each entry is the Package ID for the package.\n    */\n    \"workspace_default_members\": [\n        \"file:///path/to/my-package#0.1.0\",\n    ],\n    // The resolved dependency graph for the entire workspace. The enabled\n    // features are based on the enabled features for the \"current\" package.\n    // Inactivated optional dependencies are not listed.\n    //\n    // This is null if --no-deps is specified.\n    //\n    // By default, this includes all dependencies for all target platforms.\n    // The `--filter-platform` flag may be used to narrow to a specific\n    // target tuple.\n    \"resolve\": {\n        /* Array of nodes within the dependency graph.\n           Each node is a package.\n        */\n        \"nodes\": [\n            {\n                /* The Package ID of this node. */\n                \"id\": \"file:///path/to/my-package#0.1.0\",\n                /* The dependencies of this package, an array of Package IDs. */\n                \"dependencies\": [\n                    \"https://github.com/rust-lang/crates.io-index#bitflags@1.0.4\"\n                ],\n                /* The dependencies of this package. This is an alternative to\n                   \"dependencies\" which contains additional information. In\n                   particular, this handles renamed dependencies.\n                */\n                \"deps\": [\n                    {\n                        /* The name of the dependency's library target.\n                           If this is a renamed dependency, this is the new\n                           name.\n                        */\n                        \"name\": \"bitflags\",\n                        /* The Package ID of the dependency. */\n                        \"pkg\": \"https://github.com/rust-lang/crates.io-index#bitflags@1.0.4\"\n                        /* Array of dependency kinds. Added in Cargo 1.40. */\n                        \"dep_kinds\": [\n                            {\n                                /* The dependency kind.\n                                   \"dev\", \"build\", or null for a normal dependency.\n                                */\n                                \"kind\": null,\n                                /* The target platform for the dependency.\n                                   null if not a target dependency.\n                                */\n                                \"target\": \"cfg(windows)\"\n                            }\n                        ]\n                    }\n                ],\n                /* Array of features enabled on this package. */\n                \"features\": [\n                    \"default\"\n                ]\n            }\n        ],\n        /* The package in the current working directory (if --manifest-path is not given).\n           This is null if there is a virtual workspace. Otherwise it is\n           the Package ID of the package.\n        */\n        \"root\": \"file:///path/to/my-package#0.1.0\",\n    },\n    /* The absolute path to the target directory where Cargo places its output. */\n    \"target_directory\": \"/path/to/my-package/target\",\n    /* The absolute path to the build directory where Cargo places intermediate build artifacts. (unstable) */\n    \"build_directory\": \"/path/to/my-package/build-dir\",\n    /* The version of the schema for this metadata structure.\n       This will be changed if incompatible changes are ever made.\n    */\n    \"version\": 1,\n    /* The absolute path to the root of the workspace. */\n    \"workspace_root\": \"/path/to/my-package\"\n    /* Workspace metadata.\n       This is null if no metadata is specified. */\n    \"metadata\": {\n        \"docs\": {\n            \"rs\": {\n                \"all-features\": true\n            }\n        }\n    }\n}\n````\n\nNotes:\n- For `\"id\"` field syntax, see [Package ID Specifications] in the reference.\n\n## OPTIONS\n\n### Output Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---no-deps\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---no-deps\"><code>--no-deps</code></a></dt>\n<dd class=\"option-desc\"><p>Output information only about the workspace members and don’t fetch\ndependencies.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---format-version\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---format-version\"><code>--format-version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the version of the output format to use. Currently <code>1</code> is the only\npossible value.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---filter-platform\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---filter-platform\"><code>--filter-platform</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>This filters the <code>resolve</code> output to only include dependencies for the\ngiven <a href=\"../appendix/glossary.html#target\">target tuple</a>.\nA literal <code>\"host-tuple\"</code> can be used, which will internally be substituted by the host’s target.\nWithout this flag, the resolve includes all targets.</p>\n<p>Note that the dependencies listed in the “packages” array still includes all\ndependencies. Each package definition is intended to be an unaltered\nreproduction of the information within <code>Cargo.toml</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--F\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-metadata--v\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--q\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---color\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-metadata---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---locked\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---offline\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-metadata-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---config\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--C\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--h\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---help\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--Z\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Output JSON about the current package:\n\n       cargo metadata --format-version=1\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-pkgid(1)](cargo-pkgid.html), [Package ID Specifications], [JSON messages]\n\n[Package ID Specifications]: ../reference/pkgid-spec.html\n[JSON messages]: ../reference/external-tools.html#json-messages\n","doc/book/src/commands/cargo-miri.md":"# cargo-miri(1)\n\n## NAME\n\ncargo-miri --- Runs binary crates and tests in Miri\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nThis command is only available on the [nightly](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) channel.\n\nFor information about usage and installation,\nsee <https://github.com/rust-lang/miri>.\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-run(1)](cargo-run.md),\n[cargo-test(1)](cargo-test.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n","doc/book/src/commands/cargo-new.md":"# cargo-new(1)\n\n## NAME\n\ncargo-new --- Create a new Cargo package\n\n## SYNOPSIS\n\n`cargo new` [_options_] _path_\n\n## DESCRIPTION\n\nThis command will create a new Cargo package in the given directory. This\nincludes a simple template with a `Cargo.toml` manifest, sample source file,\nand a VCS ignore file. If the directory is not already in a VCS repository,\nthen a new repository is created (see `--vcs` below).\n\nSee [cargo-init(1)](cargo-init.html) for a similar command which will create a new manifest\nin an existing directory.\n\n## OPTIONS\n\n### New Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-new---bin\"><a class=\"option-anchor\" href=\"#option-cargo-new---bin\"><code>--bin</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a binary target (<code>src/main.rs</code>).\nThis is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---lib\"><a class=\"option-anchor\" href=\"#option-cargo-new---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a library target (<code>src/lib.rs</code>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---edition\"><a class=\"option-anchor\" href=\"#option-cargo-new---edition\"><code>--edition</code> <em>edition</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the Rust edition to use. Default is 2024.\nPossible values: 2015, 2018, 2021, 2024</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---name\"><a class=\"option-anchor\" href=\"#option-cargo-new---name\"><code>--name</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Set the package name. Defaults to the directory name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---vcs\"><a class=\"option-anchor\" href=\"#option-cargo-new---vcs\"><code>--vcs</code> <em>vcs</em></a></dt>\n<dd class=\"option-desc\"><p>Initialize a new VCS repository for the given version control system (git,\nhg, pijul, or fossil) or do not initialize any version control at all\n(none). If not specified, defaults to <code>git</code> or the configuration value\n<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---registry\"><a class=\"option-anchor\" href=\"#option-cargo-new---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name\nwhich will restrict publishing only to that registry.</p>\n<p>Registry names are defined in <a href=\"../reference/config.html\">Cargo config files</a>.\nIf not specified, the default registry defined by the <code>registry.default</code>\nconfig key is used. If the default registry is not set and <code>--registry</code> is not\nused, the <code>publish</code> field will not be set which means that publishing will not\nbe restricted.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-new--v\"><a class=\"option-anchor\" href=\"#option-cargo-new--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-new---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--q\"><a class=\"option-anchor\" href=\"#option-cargo-new--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-new---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---color\"><a class=\"option-anchor\" href=\"#option-cargo-new---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-new-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-new-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---config\"><a class=\"option-anchor\" href=\"#option-cargo-new---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--C\"><a class=\"option-anchor\" href=\"#option-cargo-new--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--h\"><a class=\"option-anchor\" href=\"#option-cargo-new--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---help\"><a class=\"option-anchor\" href=\"#option-cargo-new---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--Z\"><a class=\"option-anchor\" href=\"#option-cargo-new--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a binary Cargo package in the given directory:\n\n       cargo new foo\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-init(1)](cargo-init.html)\n","doc/book/src/commands/cargo-owner.md":"# cargo-owner(1)\n\n## NAME\n\ncargo-owner --- Manage the owners of a crate on the registry\n\n## SYNOPSIS\n\n`cargo owner` [_options_] `--add` _login_ [_crate_]\\\n`cargo owner` [_options_] `--remove` _login_ [_crate_]\\\n`cargo owner` [_options_] `--list` [_crate_]\n\n## DESCRIPTION\n\nThis command will modify the owners for a crate on the registry. Owners of a\ncrate can upload new versions and yank old versions. Non-team owners can also\nmodify the set of owners, so take care!\n\nThis command requires you to be authenticated with either the `--token` option\nor using [cargo-login(1)](cargo-login.html).\n\nIf the crate name is not specified, it will use the package name from the\ncurrent directory.\n\nSee [the reference](../reference/publishing.html#cargo-owner) for more\ninformation about owners and publishing.\n\n## OPTIONS\n\n### Owner Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-owner--a\"><a class=\"option-anchor\" href=\"#option-cargo-owner--a\"><code>-a</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---add\"><a class=\"option-anchor\" href=\"#option-cargo-owner---add\"><code>--add</code> <em>login</em>…</a></dt>\n<dd class=\"option-desc\"><p>Invite the given user or team as an owner.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--r\"><a class=\"option-anchor\" href=\"#option-cargo-owner--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---remove\"><a class=\"option-anchor\" href=\"#option-cargo-owner---remove\"><code>--remove</code> <em>login</em>…</a></dt>\n<dd class=\"option-desc\"><p>Remove the given user or team as an owner.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--l\"><a class=\"option-anchor\" href=\"#option-cargo-owner--l\"><code>-l</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---list\"><a class=\"option-anchor\" href=\"#option-cargo-owner---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List owners of a crate.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---token\"><a class=\"option-anchor\" href=\"#option-cargo-owner---token\"><code>--token</code> <em>token</em></a></dt>\n<dd class=\"option-desc\"><p>API token to use when authenticating. This overrides the token stored in\nthe credentials file (which is created by <a href=\"cargo-login.html\">cargo-login(1)</a>).</p>\n<p><a href=\"../reference/config.html\">Cargo config</a> environment variables can be\nused to override the tokens stored in the credentials file. The token for\ncrates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment\nvariable. Tokens for other registries may be specified with environment\nvariables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name\nof the registry in all capital letters.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---index\"><a class=\"option-anchor\" href=\"#option-cargo-owner---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---registry\"><a class=\"option-anchor\" href=\"#option-cargo-owner---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-owner--v\"><a class=\"option-anchor\" href=\"#option-cargo-owner--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-owner---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--q\"><a class=\"option-anchor\" href=\"#option-cargo-owner--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-owner---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---color\"><a class=\"option-anchor\" href=\"#option-cargo-owner---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-owner-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-owner-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---config\"><a class=\"option-anchor\" href=\"#option-cargo-owner---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--C\"><a class=\"option-anchor\" href=\"#option-cargo-owner--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--h\"><a class=\"option-anchor\" href=\"#option-cargo-owner--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---help\"><a class=\"option-anchor\" href=\"#option-cargo-owner---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--Z\"><a class=\"option-anchor\" href=\"#option-cargo-owner--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. List owners of a package:\n\n       cargo owner --list foo\n\n2. Invite an owner to a package:\n\n       cargo owner --add username foo\n\n3. Remove an owner from a package:\n\n       cargo owner --remove username foo\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-package.md":"# cargo-package(1)\n## NAME\n\ncargo-package --- Assemble the local package into a distributable tarball\n\n## SYNOPSIS\n\n`cargo package` [_options_]\n\n## DESCRIPTION\n\nThis command will create a distributable, compressed `.crate` file with the\nsource code of the package in the current directory. The resulting file will be\nstored in the `target/package` directory. This performs the following steps:\n\n1. Load and check the current workspace, performing some basic checks.\n    - Path dependencies are not allowed unless they have a version key. Cargo\n      will ignore the path key for dependencies in published packages.\n      `dev-dependencies` do not have this restriction.\n2. Create the compressed `.crate` file.\n    - The original `Cargo.toml` file is rewritten and normalized.\n    - `[patch]`, `[replace]`, and `[workspace]` sections are removed from the\n      manifest.\n    - `Cargo.lock` is always included. When missing, a new lock file will be\n      generated unless the `--exclude-lockfile` flag is used. [cargo-install(1)](cargo-install.html)\n      will use the packaged lock file if the `--locked` flag is used.\n    - A `.cargo_vcs_info.json` file is included that contains information\n      about the current VCS checkout hash if available, as well as a flag if the\n      worktree is dirty.\n    - Symlinks are flattened to their target files.\n    - Files and directories are included or excluded based on rules mentioned in\n      [the `[include]` and `[exclude]` fields](../reference/manifest.html#the-exclude-and-include-fields).\n\n3. Extract the `.crate` file and build it to verify it can build.\n    - This will rebuild your package from scratch to ensure that it can be\n      built from a pristine state. The `--no-verify` flag can be used to skip\n      this step.\n4. Check that build scripts did not modify any source files.\n\nThe list of files included can be controlled with the `include` and `exclude`\nfields in the manifest.\n\nSee [the reference](../reference/publishing.html) for more details about\npackaging and publishing.\n\n### .cargo_vcs_info.json format\n\nWill generate a `.cargo_vcs_info.json` in the following format\n\n```javascript\n{\n \"git\": {\n   \"sha1\": \"aac20b6e7e543e6dd4118b246c77225e3a3a1302\",\n   \"dirty\": true\n },\n \"path_in_vcs\": \"\"\n}\n```\n\n`dirty` indicates that the Git worktree was dirty when the package\nwas built.\n\n`path_in_vcs` will be set to a repo-relative path for packages\nin subdirectories of the version control repository.\n\nThe compatibility of this file is maintained under the same policy\nas the JSON output of [cargo-metadata(1)](cargo-metadata.html).\n\nNote that this file provides a best-effort snapshot of the VCS information.\nHowever, the provenance of the package is not verified.\nThere is no guarantee that the source code in the tarball matches the VCS information.\n\n## OPTIONS\n\n### Package Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--l\"><a class=\"option-anchor\" href=\"#option-cargo-package--l\"><code>-l</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---list\"><a class=\"option-anchor\" href=\"#option-cargo-package---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>Print files included in a package without making one.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-verify\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-verify\"><code>--no-verify</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t verify the contents by building them.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-metadata\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-metadata\"><code>--no-metadata</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore warnings about a lack of human-usable metadata (such as the description\nor the license).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-package---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Allow working directories with uncommitted VCS changes to be packaged.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---exclude-lockfile\"><a class=\"option-anchor\" href=\"#option-cargo-package---exclude-lockfile\"><code>--exclude-lockfile</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t include the lock file when packaging.</p>\n<p>This flag is not for general use.\nSome tools may expect a lock file to be present (e.g. <code>cargo install --locked</code>).\nConsider other options before using this.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---index\"><a class=\"option-anchor\" href=\"#option-cargo-package---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---registry\"><a class=\"option-anchor\" href=\"#option-cargo-package---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to package for; see <code>cargo publish --help</code> for more details\nabout configuration of registry names. The packages will not be published\nto this registry, but if we are packaging multiple inter-dependent crates,\nlock-files will be generated under the assumption that dependencies will be\npublished to this registry.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-package---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>Specifies the output message format.\nCurrently, it only works with <code>--list</code> and affects the file listing format.\nThis is unstable and requires <code>-Zunstable-options</code>.\nValid output formats:</p>\n<ul>\n<li><code>human</code> (default): Display in a file-per-line format.</li>\n<li><code>json</code>: Emit machine-readable JSON information about each package.\nOne package per JSON line (Newline delimited JSON).\n<pre><code class=\"language-javascript\">{\n  /* The Package ID Spec of the package. */\n  \"id\": \"path+file:///home/foo#0.0.0\",\n  /* Files of this package */\n  \"files\" {\n    /* Relative path in the archive file. */\n    \"Cargo.toml.orig\": {\n      /* Where the file is from.\n         - \"generate\" for file being generated during packaging\n         - \"copy\" for file being copied from another location.\n      */\n      \"kind\": \"copy\",\n      /* For the \"copy\" kind,\n         it is an absolute path to the actual file content.\n         For the \"generate\" kind,\n         it is the original file the generated one is based on.\n      */\n      \"path\": \"/home/foo/Cargo.toml\"\n    },\n    \"Cargo.toml\": {\n      \"kind\": \"generate\",\n      \"path\": \"/home/foo/Cargo.toml\"\n    },\n    \"src/main.rs\": {\n      \"kind\": \"copy\",\n      \"path\": \"/home/foo/src/main.rs\"\n    }\n  }\n}\n</code></pre>\n</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--p\"><a class=\"option-anchor\" href=\"#option-cargo-package--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---package\"><a class=\"option-anchor\" href=\"#option-cargo-package---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-package---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Package all members in the workspace.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-package---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package---target\"><a class=\"option-anchor\" href=\"#option-cargo-package---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Package for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-package---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--F\"><a class=\"option-anchor\" href=\"#option-cargo-package--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---features\"><a class=\"option-anchor\" href=\"#option-cargo-package---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-package---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-package---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---locked\"><a class=\"option-anchor\" href=\"#option-cargo-package---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---offline\"><a class=\"option-anchor\" href=\"#option-cargo-package---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-package---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-package--j\"><a class=\"option-anchor\" href=\"#option-cargo-package--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-package---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-package---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-package---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo package -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo package -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-package--v\"><a class=\"option-anchor\" href=\"#option-cargo-package--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-package---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--q\"><a class=\"option-anchor\" href=\"#option-cargo-package--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-package---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---color\"><a class=\"option-anchor\" href=\"#option-cargo-package---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-package-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---config\"><a class=\"option-anchor\" href=\"#option-cargo-package---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--C\"><a class=\"option-anchor\" href=\"#option-cargo-package--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--h\"><a class=\"option-anchor\" href=\"#option-cargo-package--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---help\"><a class=\"option-anchor\" href=\"#option-cargo-package---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--Z\"><a class=\"option-anchor\" href=\"#option-cargo-package--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a compressed `.crate` file of the current package:\n\n       cargo package\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-pkgid.md":"# cargo-pkgid(1)\n\n## NAME\n\ncargo-pkgid --- Print a fully qualified package specification\n\n## SYNOPSIS\n\n`cargo pkgid` [_options_] [_spec_]\n\n## DESCRIPTION\n\nGiven a _spec_ argument, print out the fully qualified package ID specifier\nfor a package or dependency in the current workspace. This command will\ngenerate an error if _spec_ is ambiguous as to which package it refers to in\nthe dependency graph. If no _spec_ is given, then the specifier for the local\npackage is printed.\n\nThis command requires that a lockfile is available and dependencies have been\nfetched.\n\nA package specifier consists of a name, version, and source URL. You are\nallowed to use partial specifiers to succinctly match a specific package as\nlong as it matches only one package. This specifier is also used by other parts\nin Cargo, such as [cargo-metadata(1)](cargo-metadata.html) and [JSON messages] emitted by Cargo.\n\nThe format of a _spec_ can be one of the following:\n\nSPEC Structure             | Example SPEC\n---------------------------|--------------\n_name_                     | `bitflags`\n_name_`@`_version_         | `bitflags@1.0.4`\n_url_                      | `https://github.com/rust-lang/cargo`\n_url_`#`_version_          | `https://github.com/rust-lang/cargo#0.33.0`\n_url_`#`_name_             | `https://github.com/rust-lang/crates.io-index#bitflags`\n_url_`#`_name_`@`_version_ | `https://github.com/rust-lang/cargo#crates-io@0.21.0`\n\nThe specification grammar can be found in chapter [Package ID Specifications].\n\n## OPTIONS\n\n### Package Selection\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--p\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---package\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Get the package ID for the given package instead of the current package.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-pkgid--v\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--q\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---color\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---locked\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---offline\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---config\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--C\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--h\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---help\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--Z\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Retrieve package specification for `foo` package:\n\n       cargo pkgid foo\n\n2. Retrieve package specification for version 1.0.0 of `foo`:\n\n       cargo pkgid foo@1.0.0\n\n3. Retrieve package specification for `foo` from crates.io:\n\n       cargo pkgid https://github.com/rust-lang/crates.io-index#foo\n\n4. Retrieve package specification for `foo` from a local package:\n\n       cargo pkgid file:///path/to/local/package#foo\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html), [cargo-metadata(1)](cargo-metadata.html),\n[Package ID Specifications], [JSON messages]\n\n[Package ID Specifications]: ../reference/pkgid-spec.html\n[JSON messages]: ../reference/external-tools.html#json-messages\n","doc/book/src/commands/cargo-publish.md":"# cargo-publish(1)\n## NAME\n\ncargo-publish --- Upload a package to the registry\n\n## SYNOPSIS\n\n`cargo publish` [_options_]\n\n## DESCRIPTION\n\nThis command will create a distributable, compressed `.crate` file with the\nsource code of the package in the current directory and upload it to a\nregistry. The default registry is <https://crates.io>. This performs the\nfollowing steps:\n\n1. Performs a few checks, including:\n   - Checks the `package.publish` key in the manifest for restrictions on\n     which registries you are allowed to publish to.\n2. Create a `.crate` file by following the steps in [cargo-package(1)](cargo-package.html).\n3. Upload the crate to the registry. The server will perform additional\n   checks on the crate. \n4. The client will poll waiting for the package to appear in the index,\n   and may timeout. In that case, you will need to check for completion\n   manually. This timeout does not affect the upload.\n\nThis command requires you to be authenticated using [cargo-login(1)](cargo-login.html)\nor environment variables of the [`registry.token`](../reference/config.html#registrytoken)\nand [`registries.<name>.token`](../reference/config.html#registriesnametoken) config fields.\n\nSee [the reference](../reference/publishing.html) for more details about\npackaging and publishing.\n\n## OPTIONS\n\n### Publish Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-publish---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Perform all checks without uploading.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---no-verify\"><a class=\"option-anchor\" href=\"#option-cargo-publish---no-verify\"><code>--no-verify</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t verify the contents by building them.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-publish---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Allow working directories with uncommitted VCS changes to be packaged.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---index\"><a class=\"option-anchor\" href=\"#option-cargo-publish---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---registry\"><a class=\"option-anchor\" href=\"#option-cargo-publish---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to publish to. Registry names are defined in <a href=\"../reference/config.html\">Cargo\nconfig files</a>. If not specified, and there is a\n<a href=\"../reference/manifest.html#the-publish-field\"><code>package.publish</code></a> field in\n<code>Cargo.toml</code> with a single registry, then it will publish to that registry.\nOtherwise it will use the default registry, which is defined by the\n<a href=\"../reference/config.html#registrydefault\"><code>registry.default</code></a> config key\nwhich defaults to <code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish--p\"><a class=\"option-anchor\" href=\"#option-cargo-publish--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---package\"><a class=\"option-anchor\" href=\"#option-cargo-publish---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Publish only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-publish---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Publish all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---all\"><a class=\"option-anchor\" href=\"#option-cargo-publish---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-publish---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---target\"><a class=\"option-anchor\" href=\"#option-cargo-publish---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Publish for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-publish---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish--F\"><a class=\"option-anchor\" href=\"#option-cargo-publish--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-publish---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---locked\"><a class=\"option-anchor\" href=\"#option-cargo-publish---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---offline\"><a class=\"option-anchor\" href=\"#option-cargo-publish---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-publish---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-publish--j\"><a class=\"option-anchor\" href=\"#option-cargo-publish--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-publish---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-publish---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo publish -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo publish -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-publish--v\"><a class=\"option-anchor\" href=\"#option-cargo-publish--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-publish---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--q\"><a class=\"option-anchor\" href=\"#option-cargo-publish--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-publish---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---color\"><a class=\"option-anchor\" href=\"#option-cargo-publish---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-publish-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---config\"><a class=\"option-anchor\" href=\"#option-cargo-publish---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--C\"><a class=\"option-anchor\" href=\"#option-cargo-publish--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--h\"><a class=\"option-anchor\" href=\"#option-cargo-publish--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---help\"><a class=\"option-anchor\" href=\"#option-cargo-publish---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--Z\"><a class=\"option-anchor\" href=\"#option-cargo-publish--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Publish the current package:\n\n       cargo publish\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-package(1)](cargo-package.html), [cargo-login(1)](cargo-login.html)\n","doc/book/src/commands/cargo-remove.md":"# cargo-remove(1)\n## NAME\n\ncargo-remove --- Remove dependencies from a Cargo.toml manifest file\n\n## SYNOPSIS\n\n`cargo remove` [_options_] _dependency_...\n\n## DESCRIPTION\n\nRemove one or more dependencies from a `Cargo.toml` manifest.\n\n## OPTIONS\n\n### Section options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove---dev\"><a class=\"option-anchor\" href=\"#option-cargo-remove---dev\"><code>--dev</code></a></dt>\n<dd class=\"option-desc\"><p>Remove as a <a href=\"../reference/specifying-dependencies.html#development-dependencies\">development dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---build\"><a class=\"option-anchor\" href=\"#option-cargo-remove---build\"><code>--build</code></a></dt>\n<dd class=\"option-desc\"><p>Remove as a <a href=\"../reference/specifying-dependencies.html#build-dependencies\">build dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---target\"><a class=\"option-anchor\" href=\"#option-cargo-remove---target\"><code>--target</code> <em>target</em></a></dt>\n<dd class=\"option-desc\"><p>Remove as a dependency to the <a href=\"../reference/specifying-dependencies.html#platform-specific-dependencies\">given target platform</a>.</p>\n<p>To avoid unexpected shell expansions, you may use quotes around each target, e.g., <code>--target 'cfg(unix)'</code>.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-remove---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t actually write to the manifest.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-remove--v\"><a class=\"option-anchor\" href=\"#option-cargo-remove--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-remove---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--q\"><a class=\"option-anchor\" href=\"#option-cargo-remove--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-remove---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---color\"><a class=\"option-anchor\" href=\"#option-cargo-remove---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-remove---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-remove---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---locked\"><a class=\"option-anchor\" href=\"#option-cargo-remove---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---offline\"><a class=\"option-anchor\" href=\"#option-cargo-remove---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-remove---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove--p\"><a class=\"option-anchor\" href=\"#option-cargo-remove--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---package\"><a class=\"option-anchor\" href=\"#option-cargo-remove---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package to remove from.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-remove-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---config\"><a class=\"option-anchor\" href=\"#option-cargo-remove---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--C\"><a class=\"option-anchor\" href=\"#option-cargo-remove--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--h\"><a class=\"option-anchor\" href=\"#option-cargo-remove--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---help\"><a class=\"option-anchor\" href=\"#option-cargo-remove---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--Z\"><a class=\"option-anchor\" href=\"#option-cargo-remove--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove `regex` as a dependency\n\n       cargo remove regex\n\n2. Remove `trybuild` as a dev-dependency\n\n       cargo remove --dev trybuild\n\n3. Remove `nom` from the `wasm32-unknown-unknown` dependencies table\n\n       cargo remove --target wasm32-unknown-unknown nom\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-add(1)](cargo-add.html)\n","doc/book/src/commands/cargo-report-future-incompatibilities.md":"# cargo-report-future-incompatibilities(1)\n## NAME\n\ncargo-report-future-incompatibilities --- Reports any crates which will eventually stop compiling\n\n## SYNOPSIS\n\n`cargo report future-incompatibilities` [_options_]\n\n## DESCRIPTION\n\nDisplays a report of future-incompatible warnings that were emitted during\nprevious builds.\nThese are warnings for changes that may become hard errors in the future,\ncausing dependencies to stop building in a future version of rustc.\n\nFor more, see the chapter on [Future incompat report](../reference/future-incompat-report.html).\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---id\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---id\"><code>--id</code> <em>id</em></a></dt>\n<dd class=\"option-desc\"><p>Show the report with the specified Cargo-generated id.\nIf not specified, shows the most recent report.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--p\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---package\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to display a report for. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--v\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--q\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---color\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---locked\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---offline\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---config\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--C\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--h\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---help\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--Z\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the latest future-incompat report:\n\n       cargo report future-incompat\n\n2. Display the latest future-incompat report for a specific package:\n\n       cargo report future-incompat --package my-dep@0.0.1\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-report(1)](cargo-report.html), [cargo-build(1)](cargo-build.html)\n","doc/book/src/commands/cargo-report.md":"# cargo-report(1)\n\n## NAME\n\ncargo-report --- Generate and display various kinds of reports\n\n## SYNOPSIS\n\n`cargo report` _type_ [_options_]\n\n## DESCRIPTION\n\nDisplays a report of the given _type_ --- currently, only `future-incompat` is supported\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report--v\"><a class=\"option-anchor\" href=\"#option-cargo-report--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-report---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--q\"><a class=\"option-anchor\" href=\"#option-cargo-report--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-report---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---color\"><a class=\"option-anchor\" href=\"#option-cargo-report---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report---locked\"><a class=\"option-anchor\" href=\"#option-cargo-report---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---offline\"><a class=\"option-anchor\" href=\"#option-cargo-report---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-report---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-report-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---config\"><a class=\"option-anchor\" href=\"#option-cargo-report---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--C\"><a class=\"option-anchor\" href=\"#option-cargo-report--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--h\"><a class=\"option-anchor\" href=\"#option-cargo-report--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---help\"><a class=\"option-anchor\" href=\"#option-cargo-report---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--Z\"><a class=\"option-anchor\" href=\"#option-cargo-report--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the available kinds of reports:\n\n       cargo report --help\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-report-future-incompatibilities(1)](cargo-report-future-incompatibilities.html)\n","doc/book/src/commands/cargo-run.md":"# cargo-run(1)\n## NAME\n\ncargo-run --- Run the current package\n\n## SYNOPSIS\n\n`cargo run` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nRun a binary or example of the local package.\n\nAll the arguments following the two dashes (`--`) are passed to the binary to\nrun. If you're passing arguments to both Cargo and the binary, the ones after\n`--` go to the binary, the ones before go to Cargo.\n\nUnlike [cargo-test(1)](cargo-test.html) and [cargo-bench(1)](cargo-bench.html), `cargo run` sets the \nworking directory of the binary executed to the current working directory, same \nas if it was executed in the shell directly.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--p\"><a class=\"option-anchor\" href=\"#option-cargo-run--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---package\"><a class=\"option-anchor\" href=\"#option-cargo-run---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to run. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo run` will run the binary\ntarget. If there are multiple binary targets, you must pass a target flag to\nchoose one. Or, the `default-run` field may be specified in the `[package]`\nsection of `Cargo.toml` to choose the name of the binary to run by default.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---bin\"><a class=\"option-anchor\" href=\"#option-cargo-run---bin\"><code>--bin</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run the specified binary.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---example\"><a class=\"option-anchor\" href=\"#option-cargo-run---example\"><code>--example</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run the specified example.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--F\"><a class=\"option-anchor\" href=\"#option-cargo-run--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---features\"><a class=\"option-anchor\" href=\"#option-cargo-run---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-run---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-run---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---target\"><a class=\"option-anchor\" href=\"#option-cargo-run---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Run for the specified target architecture. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--r\"><a class=\"option-anchor\" href=\"#option-cargo-run--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---release\"><a class=\"option-anchor\" href=\"#option-cargo-run---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Run optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---profile\"><a class=\"option-anchor\" href=\"#option-cargo-run---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---timings\"><a class=\"option-anchor\" href=\"#option-cargo-run---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-run---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-run---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--v\"><a class=\"option-anchor\" href=\"#option-cargo-run--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-run---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--q\"><a class=\"option-anchor\" href=\"#option-cargo-run--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-run---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---color\"><a class=\"option-anchor\" href=\"#option-cargo-run---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-run---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-run---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-run---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---locked\"><a class=\"option-anchor\" href=\"#option-cargo-run---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---offline\"><a class=\"option-anchor\" href=\"#option-cargo-run---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-run---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-run-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---config\"><a class=\"option-anchor\" href=\"#option-cargo-run---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--C\"><a class=\"option-anchor\" href=\"#option-cargo-run--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--h\"><a class=\"option-anchor\" href=\"#option-cargo-run--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---help\"><a class=\"option-anchor\" href=\"#option-cargo-run---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--Z\"><a class=\"option-anchor\" href=\"#option-cargo-run--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-run--j\"><a class=\"option-anchor\" href=\"#option-cargo-run--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-run---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-run---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-run---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo run -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo run -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package and run its main target (assuming only one binary):\n\n       cargo run\n\n2. Run an example with extra arguments:\n\n       cargo run --example exname -- --exoption exarg1 exarg2\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n","doc/book/src/commands/cargo-rustc.md":"# cargo-rustc(1)\n## NAME\n\ncargo-rustc --- Compile the current package, and pass extra options to the compiler\n\n## SYNOPSIS\n\n`cargo rustc` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThe specified target for the current package (or package specified by `-p` if\nprovided) will be compiled along with all of its dependencies. The specified\n_args_ will all be passed to the final compiler invocation, not any of the\ndependencies. Note that the compiler will still unconditionally receive\narguments such as `-L`, `--extern`, and `--crate-type`, and the specified\n_args_ will simply be added to the compiler invocation.\n\nSee <https://doc.rust-lang.org/rustc/index.html> for documentation on rustc\nflags.\n\nThis command requires that only one target is being compiled when additional\narguments are provided. If more than one target is available for the current\npackage the filters of `--lib`, `--bin`, etc, must be used to select which\ntarget is compiled.\n\nTo pass flags to all compiler processes spawned by Cargo, use the `RUSTFLAGS`\n[environment variable](../reference/environment-variables.html) or the\n`build.rustflags` [config value](../reference/config.html).\n\n## OPTIONS\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--p\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---package\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to build. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo rustc` will build all\nbinary and library targets of the selected package.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to build. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will build only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Build the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Build all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---example\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Build all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---test\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---tests\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---bench\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---benches\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--F\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---features\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---target\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--r\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---release\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Build optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Build with the given profile.</p>\n<p>The <code>rustc</code> subcommand will treat the following named profiles with special behaviors:</p>\n<ul>\n<li><code>check</code> — Builds in the same way as the <a href=\"cargo-check.html\">cargo-check(1)</a> command with\nthe <code>dev</code> profile.</li>\n<li><code>test</code> — Builds in the same way as the <a href=\"cargo-test.html\">cargo-test(1)</a> command,\nenabling building in test mode which will enable tests and enable the <code>test</code>\ncfg option. See <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc\ntests</a> for more detail.</li>\n<li><code>bench</code> — Builds in the same was as the <a href=\"cargo-bench.html\">cargo-bench(1)</a> command,\nsimilar to the <code>test</code> profile.</li>\n</ul>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---crate-type\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---crate-type\"><code>--crate-type</code> <em>crate-type</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the given crate type. This flag accepts a comma-separated list of\n1 or more crate types, of which the allowed values are the same as <code>crate-type</code>\nfield in the manifest for configuring a Cargo target. See\n<a href=\"../reference/cargo-targets.html#the-crate-type-field\"><code>crate-type</code> field</a>\nfor possible values.</p>\n<p>If the manifest contains a list, and <code>--crate-type</code> is provided,\nthe command-line argument value will override what is in the manifest.</p>\n<p>This flag only works when building a <code>lib</code> or <code>example</code> library target.</p>\n</dd>\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--v\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--q\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---color\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-rustc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---config\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--C\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--h\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---help\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustc--j\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo rustc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo rustc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Check if your package (not including dependencies) uses unsafe code:\n\n       cargo rustc --lib -- -D unsafe-code\n\n2. Try an experimental flag on the nightly compiler, such as this which prints\n   the size of every type:\n\n       cargo rustc --lib -- -Z print-type-sizes\n\n3. Override `crate-type` field in Cargo.toml with command-line option:\n\n       cargo rustc --lib --crate-type lib,cdylib\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html), [rustc(1)](https://doc.rust-lang.org/rustc/index.html)\n","doc/book/src/commands/cargo-rustdoc.md":"# cargo-rustdoc(1)\n## NAME\n\ncargo-rustdoc --- Build a package's documentation, using specified custom flags\n\n## SYNOPSIS\n\n`cargo rustdoc` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThe specified target for the current package (or package specified by `-p` if\nprovided) will be documented with the specified _args_ being passed to the\nfinal rustdoc invocation. Dependencies will not be documented as part of this\ncommand. Note that rustdoc will still unconditionally receive arguments such\nas `-L`, `--extern`, and `--crate-type`, and the specified _args_ will simply\nbe added to the rustdoc invocation.\n\nSee <https://doc.rust-lang.org/rustdoc/index.html> for documentation on rustdoc\nflags.\n\nThis command requires that only one target is being compiled when additional\narguments are provided. If more than one target is available for the current\npackage the filters of `--lib`, `--bin`, etc, must be used to select which\ntarget is compiled.\n\nTo pass flags to all rustdoc processes spawned by Cargo, use the\n`RUSTDOCFLAGS` [environment variable](../reference/environment-variables.html)\nor the `build.rustdocflags` [config value](../reference/config.html).\n\n## OPTIONS\n\n### Documentation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---open\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---open\"><code>--open</code></a></dt>\n<dd class=\"option-desc\"><p>Open the docs in a browser after building them. This will use your default\nbrowser unless you define another one in the <code>BROWSER</code> environment variable\nor use the <a href=\"../reference/config.html#docbrowser\"><code>doc.browser</code></a> configuration\noption.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--p\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---package\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to document. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo rustdoc` will document all\nbinary and library targets of the selected package. The binary will be skipped\nif its name is the same as the lib target. Binaries are skipped if they have\n`required-features` that are missing.\n\nPassing target selection flags will document only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Document the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Document all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---example\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Document all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---test\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---tests\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Document all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---bench\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---benches\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Document all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Document all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--F\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---features\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---target\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Document for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--r\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---release\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Document optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Document with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--v\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--q\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---color\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---config\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--C\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--h\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---help\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--j\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo rustdoc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo rustdoc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---output-format\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---output-format\"><code>--output-format</code></a></dt>\n<dd class=\"option-desc\"><p>The output type for the documentation emitted. Valid values:</p>\n<ul>\n<li><code>html</code> (default): Emit the documentation in HTML format.</li>\n<li><code>json</code>: Emit the documentation in the <a href=\"https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types\">experimental JSON format</a>.</li>\n</ul>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build documentation with custom CSS included from a given file:\n\n       cargo rustdoc --lib -- --extend-css extra.css\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-doc(1)](cargo-doc.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n","doc/book/src/commands/cargo-search.md":"# cargo-search(1)\n\n## NAME\n\ncargo-search --- Search packages in the registry. Default registry is crates.io\n\n## SYNOPSIS\n\n`cargo search` [_options_] [_query_...]\n\n## DESCRIPTION\n\nThis performs a textual search for crates on <https://crates.io>. The matching\ncrates will be displayed along with their description in TOML format suitable\nfor copying into a `Cargo.toml` manifest.\n\n## OPTIONS\n\n### Search Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-search---limit\"><a class=\"option-anchor\" href=\"#option-cargo-search---limit\"><code>--limit</code> <em>limit</em></a></dt>\n<dd class=\"option-desc\"><p>Limit the number of results (default: 10, max: 100).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---index\"><a class=\"option-anchor\" href=\"#option-cargo-search---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---registry\"><a class=\"option-anchor\" href=\"#option-cargo-search---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-search--v\"><a class=\"option-anchor\" href=\"#option-cargo-search--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-search---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-search---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--q\"><a class=\"option-anchor\" href=\"#option-cargo-search--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-search---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-search---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---color\"><a class=\"option-anchor\" href=\"#option-cargo-search---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-search-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-search-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---config\"><a class=\"option-anchor\" href=\"#option-cargo-search---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--C\"><a class=\"option-anchor\" href=\"#option-cargo-search--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--h\"><a class=\"option-anchor\" href=\"#option-cargo-search--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-search---help\"><a class=\"option-anchor\" href=\"#option-cargo-search---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--Z\"><a class=\"option-anchor\" href=\"#option-cargo-search--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Search for a package from crates.io:\n\n       cargo search serde\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-install(1)](cargo-install.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo-test.md":"# cargo-test(1)\n## NAME\n\ncargo-test --- Execute unit and integration tests of a package\n\n## SYNOPSIS\n\n`cargo test` [_options_] [_testname_] [`--` _test-options_]\n\n## DESCRIPTION\n\nCompile and execute unit, integration, and documentation tests.\n\nThe test filtering argument `TESTNAME` and all the arguments following the two\ndashes (`--`) are passed to the test binaries and thus to _libtest_ (rustc's\nbuilt in unit-test and micro-benchmarking framework).  If you're passing\narguments to both Cargo and the binary, the ones after `--` go to the binary,\nthe ones before go to Cargo.  For details about libtest's arguments see the\noutput of `cargo test -- --help` and check out the rustc book's chapter on\nhow tests work at <https://doc.rust-lang.org/rustc/tests/index.html>.\n\nAs an example, this will filter for tests with `foo` in their name and run them\non 3 threads in parallel:\n\n    cargo test foo -- --test-threads 3\n\nTests are built with the `--test` option to `rustc` which creates a special\nexecutable by linking your code with libtest. The executable automatically\nruns all functions annotated with the `#[test]` attribute in multiple threads.\n`#[bench]` annotated functions will also be run with one iteration to verify\nthat they are functional.\n\nIf the package contains multiple test targets, each target compiles to a\nspecial executable as aforementioned, and then is run serially.\n\nThe libtest harness may be disabled by setting `harness = false` in the target\nmanifest settings, in which case your code will need to provide its own `main`\nfunction to handle running tests.\n\nBy default, `cargo test` uses the [`test` profile], which enables\nsome optimizations and disables debugging information for fast feedback. If you need to debug a\ntest, you can use the `--profile=debug` command-line option to switch to\nthe debug profile. You can then run the debug-enabled test within a\ndebugger.\n\n[`test` profile]: ../reference/profiles.html#test\n\n### Documentation tests\n\nDocumentation tests are also run by default, which is handled by `rustdoc`. It\nextracts code samples from documentation comments of the library target, and\nthen executes them.\n\nDifferent from normal test targets, each code block compiles to a doctest\nexecutable on the fly with `rustc`. These executables run in parallel in\nseparate processes. The compilation of a code block is in fact a part of test\nfunction controlled by libtest, so some options such as `--jobs` might not\ntake effect. Note that this execution model of doctests is not guaranteed\nand may change in the future; beware of depending on it.\n\nSee the [rustdoc book](https://doc.rust-lang.org/rustdoc/) for more information\non writing doc tests.\n\n### Working directory of tests\n\nThe working directory when running each unit and integration test is set to the\nroot directory of the package the test belongs to.\nSetting the working directory of tests to the package's root directory makes it\npossible for tests to reliably access the package's files using relative paths,\nregardless from where `cargo test` was executed from.\n\nFor documentation tests, the working directory when invoking `rustdoc` is set to\nthe workspace root directory, and is also the directory `rustdoc` uses as the\ncompilation directory of each documentation test.\nThe working directory when running each documentation test is set to the root\ndirectory of the package the test belongs to, and is controlled via `rustdoc`'s\n`--test-run-directory` option.\n\n## OPTIONS\n\n### Test Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---no-run\"><a class=\"option-anchor\" href=\"#option-cargo-test---no-run\"><code>--no-run</code></a></dt>\n<dd class=\"option-desc\"><p>Compile, but don’t run tests.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---no-fail-fast\"><a class=\"option-anchor\" href=\"#option-cargo-test---no-fail-fast\"><code>--no-fail-fast</code></a></dt>\n<dd class=\"option-desc\"><p>Run all tests regardless of failure. Without this flag, Cargo will exit\nafter the first executable fails. The Rust test harness will run all tests\nwithin the executable to completion, this flag only applies to the executable\nas a whole.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--p\"><a class=\"option-anchor\" href=\"#option-cargo-test--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---package\"><a class=\"option-anchor\" href=\"#option-cargo-test---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-test---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Test all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---all\"><a class=\"option-anchor\" href=\"#option-cargo-test---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-test---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo test` will build the\nfollowing targets of the selected packages:\n\n- lib --- used to link with binaries, examples, integration tests, and doc tests\n- bins (only if integration tests are built and required features are\n  available)\n- examples --- to ensure they compile\n- lib as a unit test\n- bins as unit tests\n- integration tests\n- doc tests for the lib target\n\nThe default behavior can be changed by setting the `test` flag for the target\nin the manifest settings. Setting examples to `test = true` will build and run\nthe example as a test, replacing the example's `main` function with the\nlibtest harness. If you don't want the `main` function replaced, also include\n`harness = false`, in which case the example will be built and executed as-is.\n\nSetting targets to `test = false` will stop them from being tested by default.\nTarget selection options that take a target by name (such as `--example foo`)\nignore the `test` flag and will always test the given target.\n\nDoc tests for libraries may be disabled by setting `doctest = false` for the\nlibrary in the manifest.\n\nSee [Configuring a target](../reference/cargo-targets.html#configuring-a-target)\nfor more information on per-target settings.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to test. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will test only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---lib\"><a class=\"option-anchor\" href=\"#option-cargo-test---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Test the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---bin\"><a class=\"option-anchor\" href=\"#option-cargo-test---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---bins\"><a class=\"option-anchor\" href=\"#option-cargo-test---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Test all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---example\"><a class=\"option-anchor\" href=\"#option-cargo-test---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---examples\"><a class=\"option-anchor\" href=\"#option-cargo-test---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Test all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---test\"><a class=\"option-anchor\" href=\"#option-cargo-test---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---tests\"><a class=\"option-anchor\" href=\"#option-cargo-test---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Test all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---bench\"><a class=\"option-anchor\" href=\"#option-cargo-test---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---benches\"><a class=\"option-anchor\" href=\"#option-cargo-test---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Test all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-test---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Test all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---doc\"><a class=\"option-anchor\" href=\"#option-cargo-test---doc\"><code>--doc</code></a></dt>\n<dd class=\"option-desc\"><p>Test only the library’s documentation. This cannot be mixed with other\ntarget options.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--F\"><a class=\"option-anchor\" href=\"#option-cargo-test--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---features\"><a class=\"option-anchor\" href=\"#option-cargo-test---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-test---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-test---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---target\"><a class=\"option-anchor\" href=\"#option-cargo-test---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Test for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--r\"><a class=\"option-anchor\" href=\"#option-cargo-test--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---release\"><a class=\"option-anchor\" href=\"#option-cargo-test---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Test optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---profile\"><a class=\"option-anchor\" href=\"#option-cargo-test---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Test with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---timings\"><a class=\"option-anchor\" href=\"#option-cargo-test---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-test---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-test---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\nBy default the Rust test harness hides output from test execution to keep\nresults readable. Test output can be recovered (e.g., for debugging) by passing\n`--no-capture` to the test binaries:\n\n    cargo test -- --no-capture\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--v\"><a class=\"option-anchor\" href=\"#option-cargo-test--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-test---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--q\"><a class=\"option-anchor\" href=\"#option-cargo-test--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-test---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---color\"><a class=\"option-anchor\" href=\"#option-cargo-test---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-test---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-test---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-test---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---locked\"><a class=\"option-anchor\" href=\"#option-cargo-test---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---offline\"><a class=\"option-anchor\" href=\"#option-cargo-test---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-test---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-test-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---config\"><a class=\"option-anchor\" href=\"#option-cargo-test---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--C\"><a class=\"option-anchor\" href=\"#option-cargo-test--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--h\"><a class=\"option-anchor\" href=\"#option-cargo-test--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---help\"><a class=\"option-anchor\" href=\"#option-cargo-test---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--Z\"><a class=\"option-anchor\" href=\"#option-cargo-test--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\nThe `--jobs` argument affects the building of the test executable but does not\naffect how many threads are used when running the tests. The Rust test harness\nincludes an option to control the number of threads used:\n\n    cargo test -j 2 -- --test-threads=2\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--j\"><a class=\"option-anchor\" href=\"#option-cargo-test--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-test---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-test---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-test---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n\n</dl>\n\nWhile `cargo test` involves compilation, it does not provide a `--keep-going`\nflag. Use `--no-fail-fast` to run as many tests as possible without stopping at\nthe first failure. To \"compile\" as many tests as possible, use `--tests` to\nbuild test binaries separately. For example:\n\n    cargo build --tests --keep-going\n    cargo test --tests --no-fail-fast\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Execute all the unit and integration tests of the current package:\n\n       cargo test\n\n2. Run only tests whose names match against a filter string:\n\n       cargo test name_filter\n\n3. Run only a specific test within a specific integration test:\n\n       cargo test --test int_test_name -- modname::test_name\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-bench(1)](cargo-bench.html), [types of tests](../reference/cargo-targets.html#tests), [how to write tests](https://doc.rust-lang.org/rustc/tests/index.html)\n","doc/book/src/commands/cargo-tree.md":"# cargo-tree(1)\n## NAME\n\ncargo-tree --- Display a tree visualization of a dependency graph\n\n## SYNOPSIS\n\n`cargo tree` [_options_]\n\n## DESCRIPTION\n\nThis command will display a tree of dependencies to the terminal. An example\nof a simple project that depends on the \"rand\" package:\n\n```\nmyproject v0.1.0 (/myproject)\n└── rand v0.7.3\n    ├── getrandom v0.1.14\n    │   ├── cfg-if v0.1.10\n    │   └── libc v0.2.68\n    ├── libc v0.2.68 (*)\n    ├── rand_chacha v0.2.2\n    │   ├── ppv-lite86 v0.2.6\n    │   └── rand_core v0.5.1\n    │       └── getrandom v0.1.14 (*)\n    └── rand_core v0.5.1 (*)\n[build-dependencies]\n└── cc v1.0.50\n```\n\nPackages marked with `(*)` have been \"de-duplicated\". The dependencies for the\npackage have already been shown elsewhere in the graph, and so are not\nrepeated. Use the `--no-dedupe` option to repeat the duplicates.\n\nThe `-e` flag can be used to select the dependency kinds to display. The\n\"features\" kind changes the output to display the features enabled by\neach dependency. For example, `cargo tree -e features`:\n\n```\nmyproject v0.1.0 (/myproject)\n└── log feature \"serde\"\n    └── log v0.4.8\n        ├── serde v1.0.106\n        └── cfg-if feature \"default\"\n            └── cfg-if v0.1.10\n```\n\nIn this tree, `myproject` depends on `log` with the `serde` feature. `log` in\nturn depends on `cfg-if` with \"default\" features. When using `-e features` it\ncan be helpful to use `-i` flag to show how the features flow into a package.\nSee the examples below for more detail.\n\n### Feature Unification\n\nThis command shows a graph much closer to a feature-unified graph Cargo will\nbuild, rather than what you list in `Cargo.toml`. For instance, if you specify\nthe same dependency in both `[dependencies]` and `[dev-dependencies]` but with\ndifferent features on. This command may merge all features and show a `(*)` on\none of the dependency to indicate the duplicate.\n\nAs a result, for a mostly equivalent overview of what `cargo build` does,\n`cargo tree -e normal,build` is pretty close; for a mostly equivalent overview\nof what `cargo test` does, `cargo tree` is pretty close. However, it doesn't\nguarantee the exact equivalence to what Cargo is going to build, since a\ncompilation is complex and depends on lots of different factors.\n\nTo learn more about feature unification, check out this\n[dedicated section](../reference/features.html#feature-unification).\n\n## OPTIONS\n\n### Tree Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--i\"><a class=\"option-anchor\" href=\"#option-cargo-tree--i\"><code>-i</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---invert\"><a class=\"option-anchor\" href=\"#option-cargo-tree---invert\"><code>--invert</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Show the reverse dependencies for the given package. This flag will invert\nthe tree and display the packages that depend on the given package.</p>\n<p>Note that in a workspace, by default it will only display the package’s\nreverse dependencies inside the tree of the workspace member in the current\ndirectory. The <code>--workspace</code> flag can be used to extend it so that it will\nshow the package’s reverse dependencies across the entire workspace. The <code>-p</code>\nflag can be used to display the package’s reverse dependencies only with the\nsubtree of the package given to <code>-p</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---prune\"><a class=\"option-anchor\" href=\"#option-cargo-tree---prune\"><code>--prune</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Prune the given package from the display of the dependency tree.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---depth\"><a class=\"option-anchor\" href=\"#option-cargo-tree---depth\"><code>--depth</code> <em>depth</em></a></dt>\n<dd class=\"option-desc\"><p>Maximum display depth of the dependency tree. A depth of 1 displays the direct\ndependencies, for example.</p>\n<p>If the given value is <code>workspace</code>, only shows the dependencies that are member\nof the current workspace, instead.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---no-dedupe\"><a class=\"option-anchor\" href=\"#option-cargo-tree---no-dedupe\"><code>--no-dedupe</code></a></dt>\n<dd class=\"option-desc\"><p>Do not de-duplicate repeated dependencies. Usually, when a package has already\ndisplayed its dependencies, further occurrences will not re-display its\ndependencies, and will include a <code>(*)</code> to indicate it has already been shown.\nThis flag will cause those duplicates to be repeated.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--d\"><a class=\"option-anchor\" href=\"#option-cargo-tree--d\"><code>-d</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---duplicates\"><a class=\"option-anchor\" href=\"#option-cargo-tree---duplicates\"><code>--duplicates</code></a></dt>\n<dd class=\"option-desc\"><p>Show only dependencies which come in multiple versions (implies <code>--invert</code>).\nWhen used with the <code>-p</code> flag, only shows duplicates within the subtree of the\ngiven package.</p>\n<p>It can be beneficial for build times and executable sizes to avoid building\nthat same package multiple times. This flag can help identify the offending\npackages. You can then investigate if the package that depends on the\nduplicate with the older version can be updated to the newer version so that\nonly one instance is built.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--e\"><a class=\"option-anchor\" href=\"#option-cargo-tree--e\"><code>-e</code> <em>kinds</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---edges\"><a class=\"option-anchor\" href=\"#option-cargo-tree---edges\"><code>--edges</code> <em>kinds</em></a></dt>\n<dd class=\"option-desc\"><p>The dependency kinds to display. Takes a comma separated list of values:</p>\n<ul>\n<li><code>all</code> — Show all edge kinds.</li>\n<li><code>normal</code> — Show normal dependencies.</li>\n<li><code>build</code> — Show build dependencies.</li>\n<li><code>dev</code> — Show development dependencies.</li>\n<li><code>features</code> — Show features enabled by each dependency. If this is the only\nkind given, then it will automatically include the other dependency kinds.</li>\n<li><code>no-normal</code> — Do not include normal dependencies.</li>\n<li><code>no-build</code> — Do not include build dependencies.</li>\n<li><code>no-dev</code> — Do not include development dependencies.</li>\n<li><code>no-proc-macro</code> — Do not include procedural macro dependencies.</li>\n</ul>\n<p>The <code>normal</code>, <code>build</code>, <code>dev</code>, and <code>all</code> dependency kinds cannot be mixed with\n<code>no-normal</code>, <code>no-build</code>, or <code>no-dev</code> dependency kinds.</p>\n<p>The default is <code>normal,build,dev</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---target\"><a class=\"option-anchor\" href=\"#option-cargo-tree---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Filter dependencies matching the given <a href=\"../appendix/glossary.html#target\">target tuple</a>.\nThe default is the host platform. Use the value <code>all</code> to include <em>all</em> targets.</p>\n</dd>\n\n\n</dl>\n\n### Tree Formatting Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree---charset\"><a class=\"option-anchor\" href=\"#option-cargo-tree---charset\"><code>--charset</code> <em>charset</em></a></dt>\n<dd class=\"option-desc\"><p>Chooses the character set to use for the tree. Valid values are “utf8” or\n“ascii”. When unspecified, cargo will auto-select a value.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--f\"><a class=\"option-anchor\" href=\"#option-cargo-tree--f\"><code>-f</code> <em>format</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---format\"><a class=\"option-anchor\" href=\"#option-cargo-tree---format\"><code>--format</code> <em>format</em></a></dt>\n<dd class=\"option-desc\"><p>Set the format string for each package. The default is “{p}”.</p>\n<p>This is an arbitrary string which will be used to display each package. The following\nstrings will be replaced with the corresponding value:</p>\n<ul>\n<li><code>{p}</code>, <code>{package}</code> — The package name.</li>\n<li><code>{l}</code>, <code>{license}</code> — The package license.</li>\n<li><code>{r}</code>, <code>{repository}</code> — The package repository URL.</li>\n<li><code>{f}</code>, <code>{features}</code> — Comma-separated list of package features that are enabled.</li>\n<li><code>{lib}</code> — The name, as used in a <code>use</code> statement, of the package’s library.</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---prefix\"><a class=\"option-anchor\" href=\"#option-cargo-tree---prefix\"><code>--prefix</code> <em>prefix</em></a></dt>\n<dd class=\"option-desc\"><p>Sets how each line is displayed. The <em>prefix</em> value can be one of:</p>\n<ul>\n<li><code>indent</code> (default) — Shows each line indented as a tree.</li>\n<li><code>depth</code> — Show as a list, with the numeric depth printed before each entry.</li>\n<li><code>none</code> — Show as a flat list.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--p\"><a class=\"option-anchor\" href=\"#option-cargo-tree--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---package\"><a class=\"option-anchor\" href=\"#option-cargo-tree---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Display only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-tree---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Display all members in the workspace.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-tree---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-tree---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---locked\"><a class=\"option-anchor\" href=\"#option-cargo-tree---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---offline\"><a class=\"option-anchor\" href=\"#option-cargo-tree---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-tree---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--F\"><a class=\"option-anchor\" href=\"#option-cargo-tree--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---features\"><a class=\"option-anchor\" href=\"#option-cargo-tree---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-tree---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-tree---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--v\"><a class=\"option-anchor\" href=\"#option-cargo-tree--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-tree---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--q\"><a class=\"option-anchor\" href=\"#option-cargo-tree--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-tree---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---color\"><a class=\"option-anchor\" href=\"#option-cargo-tree---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-tree-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---config\"><a class=\"option-anchor\" href=\"#option-cargo-tree---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--C\"><a class=\"option-anchor\" href=\"#option-cargo-tree--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--h\"><a class=\"option-anchor\" href=\"#option-cargo-tree--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---help\"><a class=\"option-anchor\" href=\"#option-cargo-tree---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--Z\"><a class=\"option-anchor\" href=\"#option-cargo-tree--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the tree for the package in the current directory:\n\n       cargo tree\n\n2. Display all the packages that depend on the `syn` package:\n\n       cargo tree -i syn\n\n3. Show the features enabled on each package:\n\n       cargo tree --format \"{p} {f}\"\n\n4. Show all packages that are built multiple times. This can happen if multiple\n   semver-incompatible versions appear in the tree (like 1.0.0 and 2.0.0).\n\n       cargo tree -d\n\n5. Explain why features are enabled for the `syn` package:\n\n       cargo tree -e features -i syn\n\n   The `-e features` flag is used to show features. The `-i` flag is used to\n   invert the graph so that it displays the packages that depend on `syn`. An\n   example of what this would display:\n\n   ```\n   syn v1.0.17\n   ├── syn feature \"clone-impls\"\n   │   └── syn feature \"default\"\n   │       └── rustversion v1.0.2\n   │           └── rustversion feature \"default\"\n   │               └── myproject v0.1.0 (/myproject)\n   │                   └── myproject feature \"default\" (command-line)\n   ├── syn feature \"default\" (*)\n   ├── syn feature \"derive\"\n   │   └── syn feature \"default\" (*)\n   ├── syn feature \"full\"\n   │   └── rustversion v1.0.2 (*)\n   ├── syn feature \"parsing\"\n   │   └── syn feature \"default\" (*)\n   ├── syn feature \"printing\"\n   │   └── syn feature \"default\" (*)\n   ├── syn feature \"proc-macro\"\n   │   └── syn feature \"default\" (*)\n   └── syn feature \"quote\"\n       ├── syn feature \"printing\" (*)\n       └── syn feature \"proc-macro\" (*)\n   ```\n\n   To read this graph, you can follow the chain for each feature from the root\n   to see why it is included. For example, the \"full\" feature is added by the\n   `rustversion` crate which is included from `myproject` (with the default\n   features), and `myproject` is the package selected on the command-line. All\n   of the other `syn` features are added by the \"default\" feature (\"quote\" is\n   added by \"printing\" and \"proc-macro\", both of which are default features).\n\n   If you're having difficulty cross-referencing the de-duplicated `(*)`\n   entries, try with the `--no-dedupe` flag to get the full output.\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-metadata(1)](cargo-metadata.html)\n","doc/book/src/commands/cargo-uninstall.md":"# cargo-uninstall(1)\n\n## NAME\n\ncargo-uninstall --- Remove a Rust binary\n\n## SYNOPSIS\n\n`cargo uninstall` [_options_] [_spec_...]\n\n## DESCRIPTION\n\nThis command removes a package installed with [cargo-install(1)](cargo-install.html). The _spec_\nargument is a package ID specification of the package to remove (see\n[cargo-pkgid(1)](cargo-pkgid.html)).\n\nBy default all binaries are removed for a crate but the `--bin` and\n`--example` flags can be used to only remove particular binaries.\n\nThe installation root is determined, in order of precedence:\n\n- `--root` option\n- `CARGO_INSTALL_ROOT` environment variable\n- `install.root` Cargo [config value](../reference/config.html)\n- `CARGO_HOME` environment variable\n- `$HOME/.cargo`\n\n## OPTIONS\n\n### Uninstall Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--p\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--p\"><code>-p</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---package\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package to uninstall.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---bin\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Only uninstall the binary <em>name</em>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---root\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---root\"><code>--root</code> <em>dir</em></a></dt>\n<dd class=\"option-desc\"><p>Directory to uninstall packages from.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--v\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--q\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---color\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---config\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--C\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--h\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---help\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--Z\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Uninstall a previously installed package.\n\n       cargo uninstall ripgrep\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-install(1)](cargo-install.html)\n","doc/book/src/commands/cargo-update.md":"# cargo-update(1)\n\n## NAME\n\ncargo-update --- Update dependencies as recorded in the local lock file\n\n## SYNOPSIS\n\n`cargo update` [_options_] _spec_\n\n## DESCRIPTION\n\nThis command will update dependencies in the `Cargo.lock` file to the latest\nversion. If the `Cargo.lock` file does not exist, it will be created with the\nlatest available versions.\n\n## OPTIONS\n\n### Update Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-update-spec…\"><a class=\"option-anchor\" href=\"#option-cargo-update-spec…\"><em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Update only the specified packages. This flag may be specified\nmultiple times. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC format.</p>\n<p>If packages are specified with <em>spec</em>, then a conservative update of\nthe lockfile will be performed. This means that only the dependency specified\nby SPEC will be updated. Its transitive dependencies will be updated only if\nSPEC cannot be updated without updating dependencies.  All other dependencies\nwill remain locked at their currently recorded versions.</p>\n<p>If <em>spec</em> is not specified, all dependencies are updated.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---recursive\"><a class=\"option-anchor\" href=\"#option-cargo-update---recursive\"><code>--recursive</code></a></dt>\n<dd class=\"option-desc\"><p>When used with <em>spec</em>, dependencies of <em>spec</em> are forced to update as well.\nCannot be used with <code>--precise</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---precise\"><a class=\"option-anchor\" href=\"#option-cargo-update---precise\"><code>--precise</code> <em>precise</em></a></dt>\n<dd class=\"option-desc\"><p>When used with <em>spec</em>, allows you to specify a specific version number to set\nthe package to. If the package comes from a git repository, this can be a git\nrevision (such as a SHA hash or tag).</p>\n<p>While not recommended, you can specify a yanked version of a package.\nWhen possible, try other non-yanked SemVer-compatible versions or seek help\nfrom the maintainers of the package.</p>\n<p>A compatible <code>pre-release</code> version can also be specified even when the version\nrequirement in <code>Cargo.toml</code> doesn’t contain any pre-release identifier (nightly only).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--w\"><a class=\"option-anchor\" href=\"#option-cargo-update--w\"><code>-w</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-update---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Attempt to update only packages defined in the workspace. Other packages\nare updated only if they don’t already exist in the lockfile. This\noption is useful for updating <code>Cargo.lock</code> after you’ve changed version\nnumbers in <code>Cargo.toml</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-update---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Displays what would be updated, but doesn’t actually write the lockfile.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-update--v\"><a class=\"option-anchor\" href=\"#option-cargo-update--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-update---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--q\"><a class=\"option-anchor\" href=\"#option-cargo-update--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-update---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---color\"><a class=\"option-anchor\" href=\"#option-cargo-update---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-update---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-update---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-update---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---locked\"><a class=\"option-anchor\" href=\"#option-cargo-update---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---offline\"><a class=\"option-anchor\" href=\"#option-cargo-update---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-update---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-update-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-update-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---config\"><a class=\"option-anchor\" href=\"#option-cargo-update---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--C\"><a class=\"option-anchor\" href=\"#option-cargo-update--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--h\"><a class=\"option-anchor\" href=\"#option-cargo-update--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---help\"><a class=\"option-anchor\" href=\"#option-cargo-update---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--Z\"><a class=\"option-anchor\" href=\"#option-cargo-update--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Update all dependencies in the lockfile:\n\n       cargo update\n\n2. Update only specific dependencies:\n\n       cargo update foo bar\n\n3. Set a specific dependency to a specific version:\n\n       cargo update foo --precise 1.2.3\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\n","doc/book/src/commands/cargo-vendor.md":"# cargo-vendor(1)\n\n## NAME\n\ncargo-vendor --- Vendor all dependencies locally\n\n## SYNOPSIS\n\n`cargo vendor` [_options_] [_path_]\n\n## DESCRIPTION\n\nThis cargo subcommand will vendor all crates.io and git dependencies for a\nproject into the specified directory at `<path>`. After this command completes\nthe vendor directory specified by `<path>` will contain all remote sources from\ndependencies specified. Additional manifests beyond the default one can be\nspecified with the `-s` option.\n\nThe configuration necessary to use the vendored sources would be printed to\nstdout after `cargo vendor` completes the vendoring process.\nYou will need to add or redirect it to your Cargo configuration file,\nwhich is usually `.cargo/config.toml` locally for the current package.\n\nCargo treats vendored sources as read-only as it does to registry and git sources.\nIf you intend to modify a crate from a remote source,\nuse `[patch]` or a `path` dependency pointing to a local copy of that crate.\nCargo will then correctly handle the crate on incremental rebuilds,\nas it knows that it is no longer a read-only dependency.\n\n## OPTIONS\n\n### Vendor Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--s\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--s\"><code>-s</code> <em>manifest</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---sync\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---sync\"><code>--sync</code> <em>manifest</em></a></dt>\n<dd class=\"option-desc\"><p>Specify an extra <code>Cargo.toml</code> manifest to workspaces which should also be\nvendored and synced to the output. May be specified multiple times.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---no-delete\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---no-delete\"><code>--no-delete</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t delete the “vendor” directory when vendoring, but rather keep all\nexisting contents of the vendor directory</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---respect-source-config\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---respect-source-config\"><code>--respect-source-config</code></a></dt>\n<dd class=\"option-desc\"><p>Instead of ignoring <code>[source]</code> configuration by default in <code>.cargo/config.toml</code>,\nread it and use it when downloading crates.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---versioned-dirs\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---versioned-dirs\"><code>--versioned-dirs</code></a></dt>\n<dd class=\"option-desc\"><p>Normally versions are only added to disambiguate multiple versions of the\nsame package. This option causes all directories in the “vendor” directory\nto be versioned, which makes it easier to track the history of vendored\npackages over time, and can help with the performance of re-vendoring when\nonly a subset of the packages have changed.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---locked\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---offline\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--v\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--q\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---color\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-vendor-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---config\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--C\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--h\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---help\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--Z\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Vendor all dependencies into a local \"vendor\" folder\n\n       cargo vendor\n\n2. Vendor all dependencies into a local \"third-party/vendor\" folder\n\n       cargo vendor third-party/vendor\n\n3. Vendor the current workspace as well as another to \"vendor\"\n\n       cargo vendor -s ../path/to/Cargo.toml\n\n4. Vendor and redirect the necessary vendor configs to a config file.\n\n       cargo vendor > path/to/my/cargo/config.toml\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n\n","doc/book/src/commands/cargo-version.md":"# cargo-version(1)\n\n## NAME\n\ncargo-version --- Show version information\n\n## SYNOPSIS\n\n`cargo version` [_options_]\n\n## DESCRIPTION\n\nDisplays the version of Cargo.\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-version--v\"><a class=\"option-anchor\" href=\"#option-cargo-version--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-version---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-version---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Display additional version information.</p>\n</dd>\n\n\n</dl>\n\n## EXAMPLES\n\n1. Display the version:\n\n       cargo version\n\n2. The version is also available via flags:\n\n       cargo --version\n       cargo -V\n\n3. Display extra version information:\n\n       cargo -Vv\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n","doc/book/src/commands/cargo-yank.md":"# cargo-yank(1)\n\n## NAME\n\ncargo-yank --- Remove a pushed crate from the index\n\n## SYNOPSIS\n\n`cargo yank` [_options_] _crate_@_version_\\\n`cargo yank` [_options_] `--version` _version_ [_crate_]\n\n## DESCRIPTION\n\nThe yank command removes a previously published crate's version from the\nserver's index. This command does not delete any data, and the crate will\nstill be available for download via the registry's download link.\n\nCargo will not use a yanked version for any new project or checkout without a\npre-existing lockfile, and will generate an error if there are no longer\nany compatible versions for your crate.\n\nThis command requires you to be authenticated with either the `--token` option\nor using [cargo-login(1)](cargo-login.html).\n\nIf the crate name is not specified, it will use the package name from the\ncurrent directory.\n\n### How yank works\n\nFor example, the `foo` crate published version `1.5.0` and another crate `bar`\ndeclared a dependency on version `foo = \"1.5\"`. Now `foo` releases a new, but\nnot semver compatible, version `2.0.0`, and finds a critical issue with `1.5.0`.\nIf `1.5.0` is yanked, no new project or checkout without an existing lockfile\nwill be able to use crate `bar` as it relies on `1.5`.\n\nIn this case, the maintainers of `foo` should first publish a semver compatible\nversion such as `1.5.1` prior to yanking `1.5.0` so that `bar` and all projects\nthat depend on `bar` will continue to work.\n\nAs another example, consider a crate `bar` with published versions `1.5.0`,\n`1.5.1`, `1.5.2`, `2.0.0` and `3.0.0`. The following table identifies the\nversions cargo could use in the absence of a lockfile for different SemVer\nrequirements, following a given release being yanked:\n\n| Yanked Version / SemVer requirement | `bar = \"1.5.0\"`                         | `bar = \"=1.5.0\"` | `bar = \"2.0.0\"`  |\n|-------------------------------------|-----------------------------------------|------------------|------------------|\n| `1.5.0`                             | Use either `1.5.1` or `1.5.2`           | **Return Error** | Use `2.0.0`      |\n| `1.5.1`                             | Use either `1.5.0` or `1.5.2`           | Use `1.5.0`      | Use `2.0.0`      |\n| `2.0.0`                             | Use either `1.5.0`, `1.5.1` or `1.5.2`  | Use `1.5.0`      | **Return Error** |\n\n### When to yank\n\nCrates should only be yanked in exceptional circumstances, for example, an\naccidental publish, unintentional SemVer breakages, or a significantly\nbroken and unusable crate. In the case of security vulnerabilities, [RustSec]\nis typically a less disruptive mechanism to inform users and encourage them\nto upgrade, and avoids the possibility of significant downstream disruption\nirrespective of susceptibility to the vulnerability in question.\n\nA common workflow is to yank a crate having already published a semver\ncompatible version, to reduce the probability of preventing dependent\ncrates from compiling.\n\nWhen addressing copyright, licensing, or personal data issues with a published\ncrate, simply yanking it may not suffice. In such cases, contact the maintainers\nof the registry you used. For crates.io, refer to their [policies] and contact\nthem at <help@crates.io>.\n\nIf credentials have been leaked, the recommended course of action is to revoke\nthem immediately. Once a crate has been published, it is impossible to determine\nif the leaked credentials have been copied. Yanking only prevents Cargo from\nselecting this version when resolving dependencies by default. Existing lock\nfiles or direct downloads are not affected, so yanking cannot stop further\nspreading of the leaked credentials.\n\n[RustSec]: https://rustsec.org/\n[policies]: https://crates.io/policies\n\n## OPTIONS\n\n### Yank Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-yank---vers\"><a class=\"option-anchor\" href=\"#option-cargo-yank---vers\"><code>--vers</code> <em>version</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---version\"><a class=\"option-anchor\" href=\"#option-cargo-yank---version\"><code>--version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>The version to yank or un-yank.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---undo\"><a class=\"option-anchor\" href=\"#option-cargo-yank---undo\"><code>--undo</code></a></dt>\n<dd class=\"option-desc\"><p>Undo a yank, putting a version back into the index.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---token\"><a class=\"option-anchor\" href=\"#option-cargo-yank---token\"><code>--token</code> <em>token</em></a></dt>\n<dd class=\"option-desc\"><p>API token to use when authenticating. This overrides the token stored in\nthe credentials file (which is created by <a href=\"cargo-login.html\">cargo-login(1)</a>).</p>\n<p><a href=\"../reference/config.html\">Cargo config</a> environment variables can be\nused to override the tokens stored in the credentials file. The token for\ncrates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment\nvariable. Tokens for other registries may be specified with environment\nvariables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name\nof the registry in all capital letters.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---index\"><a class=\"option-anchor\" href=\"#option-cargo-yank---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---registry\"><a class=\"option-anchor\" href=\"#option-cargo-yank---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-yank--v\"><a class=\"option-anchor\" href=\"#option-cargo-yank--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-yank---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--q\"><a class=\"option-anchor\" href=\"#option-cargo-yank--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-yank---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---color\"><a class=\"option-anchor\" href=\"#option-cargo-yank---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-yank-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-yank-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---config\"><a class=\"option-anchor\" href=\"#option-cargo-yank---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--C\"><a class=\"option-anchor\" href=\"#option-cargo-yank--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--h\"><a class=\"option-anchor\" href=\"#option-cargo-yank--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---help\"><a class=\"option-anchor\" href=\"#option-cargo-yank---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--Z\"><a class=\"option-anchor\" href=\"#option-cargo-yank--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Yank a crate from the index:\n\n       cargo yank foo@1.0.7\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html), [cargo-publish(1)](cargo-publish.html)\n","doc/book/src/commands/cargo.md":"# cargo(1)\n\n## NAME\n\ncargo --- The Rust package manager\n\n## SYNOPSIS\n\n`cargo` [_options_] _command_ [_args_]\\\n`cargo` [_options_] `--version`\\\n`cargo` [_options_] `--list`\\\n`cargo` [_options_] `--help`\\\n`cargo` [_options_] `--explain` _code_\n\n## DESCRIPTION\n\nThis program is a package manager and build tool for the Rust language,\navailable at <https://rust-lang.org>.\n\n_command_ may be one of:\n- built-in commands, see below\n- [aliases]\n- [external tools]\n\n[aliases]: ../reference/config.html#alias\n[external tools]: ../reference/external-tools.html#custom-subcommands\n\n## COMMANDS\n\n### Build Commands\n\n[cargo-bench(1)](cargo-bench.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Execute benchmarks of a package.\n\n[cargo-build(1)](cargo-build.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Compile a package.\n\n[cargo-check(1)](cargo-check.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Check a local package and all of its dependencies for errors.\n\n[cargo-clean(1)](cargo-clean.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove artifacts that Cargo has generated in the past.\n\n[cargo-doc(1)](cargo-doc.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Build a package's documentation.\n\n[cargo-fetch(1)](cargo-fetch.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Fetch dependencies of a package from the network.\n\n[cargo-fix(1)](cargo-fix.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Automatically fix lint warnings reported by rustc.\n\n[cargo-run(1)](cargo-run.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Run a binary or example of the local package.\n\n[cargo-rustc(1)](cargo-rustc.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Compile a package, and pass extra options to the compiler.\n\n[cargo-rustdoc(1)](cargo-rustdoc.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Build a package's documentation, using specified custom flags.\n\n[cargo-test(1)](cargo-test.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Execute unit and integration tests of a package.\n\n### Manifest Commands\n\n[cargo-add(1)](cargo-add.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Add dependencies to a `Cargo.toml` manifest file.\n\n[cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Generate `Cargo.lock` for a project.\n\n[cargo-info(1)](cargo-info.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Display information about a package in the registry. Default registry is crates.io.\n\n[cargo-locate-project(1)](cargo-locate-project.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Print a JSON representation of a `Cargo.toml` file's location.\n\n[cargo-metadata(1)](cargo-metadata.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Output the resolved dependencies of a package in machine-readable format.\n\n[cargo-pkgid(1)](cargo-pkgid.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Print a fully qualified package specification.\n\n[cargo-remove(1)](cargo-remove.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove dependencies from a `Cargo.toml` manifest file.\n\n[cargo-tree(1)](cargo-tree.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Display a tree visualization of a dependency graph.\n\n[cargo-update(1)](cargo-update.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Update dependencies as recorded in the local lock file.\n\n[cargo-vendor(1)](cargo-vendor.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Vendor all dependencies locally.\n\n### Package Commands\n\n[cargo-init(1)](cargo-init.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Create a new Cargo package in an existing directory.\n\n[cargo-install(1)](cargo-install.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Build and install a Rust binary.\n\n[cargo-new(1)](cargo-new.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Create a new Cargo package.\n\n[cargo-search(1)](cargo-search.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Search packages in crates.io.\n\n[cargo-uninstall(1)](cargo-uninstall.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove a Rust binary.\n\n### Publishing Commands\n\n[cargo-login(1)](cargo-login.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Save an API token from the registry locally.\n\n[cargo-logout(1)](cargo-logout.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove an API token from the registry locally.\n\n[cargo-owner(1)](cargo-owner.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Manage the owners of a crate on the registry.\n\n[cargo-package(1)](cargo-package.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Assemble the local package into a distributable tarball.\n\n[cargo-publish(1)](cargo-publish.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Upload a package to the registry.\n\n[cargo-yank(1)](cargo-yank.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove a pushed crate from the index.\n\n### Report Commands\n\n[cargo-report(1)](cargo-report.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Generate and display various kinds of reports.\n\n[cargo-report-future-incompatibilities(1)](cargo-report-future-incompatibilities.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Reports any crates which will eventually stop compiling.\n\n### General Commands\n\n[cargo-help(1)](cargo-help.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Display help information about Cargo.\n\n[cargo-version(1)](cargo-version.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Show version information.\n\n## OPTIONS\n\n### Special Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo--V\"><a class=\"option-anchor\" href=\"#option-cargo--V\"><code>-V</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---version\"><a class=\"option-anchor\" href=\"#option-cargo---version\"><code>--version</code></a></dt>\n<dd class=\"option-desc\"><p>Print version info and exit. If used with <code>--verbose</code>, prints extra\ninformation.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---list\"><a class=\"option-anchor\" href=\"#option-cargo---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List all installed Cargo subcommands. If used with <code>--verbose</code>, prints extra\ninformation.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---explain\"><a class=\"option-anchor\" href=\"#option-cargo---explain\"><code>--explain</code> <em>code</em></a></dt>\n<dd class=\"option-desc\"><p>Run <code>rustc --explain CODE</code> which will print out a detailed explanation of an\nerror message (for example, <code>E0004</code>).</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo--v\"><a class=\"option-anchor\" href=\"#option-cargo--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---verbose\"><a class=\"option-anchor\" href=\"#option-cargo---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--q\"><a class=\"option-anchor\" href=\"#option-cargo--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---quiet\"><a class=\"option-anchor\" href=\"#option-cargo---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---color\"><a class=\"option-anchor\" href=\"#option-cargo---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo---locked\"><a class=\"option-anchor\" href=\"#option-cargo---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---offline\"><a class=\"option-anchor\" href=\"#option-cargo---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---frozen\"><a class=\"option-anchor\" href=\"#option-cargo---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---config\"><a class=\"option-anchor\" href=\"#option-cargo---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--C\"><a class=\"option-anchor\" href=\"#option-cargo--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--h\"><a class=\"option-anchor\" href=\"#option-cargo--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---help\"><a class=\"option-anchor\" href=\"#option-cargo---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--Z\"><a class=\"option-anchor\" href=\"#option-cargo--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## FILES\n\n`~/.cargo/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Default location for Cargo's \"home\" directory where it\nstores various files. The location can be changed with the `CARGO_HOME`\nenvironment variable.\n\n`$CARGO_HOME/bin/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Binaries installed by [cargo-install(1)](cargo-install.html) will be located here. If using\n[rustup], executables distributed with Rust are also located here.\n\n`$CARGO_HOME/config.toml`\\\n&nbsp;&nbsp;&nbsp;&nbsp;The global configuration file. See [the reference](../reference/config.html)\nfor more information about configuration files.\n\n`.cargo/config.toml`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Cargo automatically searches for a file named `.cargo/config.toml` in the\ncurrent directory, and all parent directories. These configuration files\nwill be merged with the global configuration file.\n\n`$CARGO_HOME/credentials.toml`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Private authentication information for logging in to a registry.\n\n`$CARGO_HOME/registry/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;This directory contains cached downloads of the registry index and any\ndownloaded dependencies.\n\n`$CARGO_HOME/git/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;This directory contains cached downloads of git dependencies.\n\nPlease note that the internal structure of the `$CARGO_HOME` directory is not\nstable yet and may be subject to change.\n\n[rustup]: https://rust-lang.github.io/rustup/\n\n## EXAMPLES\n\n1. Build a local package and all of its dependencies:\n\n       cargo build\n\n2. Build a package with optimizations:\n\n       cargo build --release\n\n3. Run tests for a cross-compiled target:\n\n       cargo test --target i686-unknown-linux-gnu\n\n4. Create a new package that builds an executable:\n\n       cargo new foobar\n\n5. Create a package in the current directory:\n\n       mkdir foo && cd foo\n       cargo init .\n\n6. Learn about a command's options and usage:\n\n       cargo help clean\n\n## BUGS\n\nSee <https://github.com/rust-lang/cargo/issues> for issues.\n\n## SEE ALSO\n\n[rustc(1)](https://doc.rust-lang.org/rustc/index.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n","doc/book/src/commands/deprecated-and-removed.md":"## Deprecated and Removed Commands\n\nThese commands have been deprecated or removed in early Rust releases.\nDeprecated commands receive only critical bug fixes,\nand may be removed in future versions.\nRemoved commands are no longer functional and are unsupported.\n\n* `read-manifest` --- deprecated since Rust 1.13\n* `git-checkout` --- removed since Rust 1.44\n* `verify-project` --- deprecated since Rust 1.84\n","doc/book/src/commands/general-commands.md":"# General Commands\n* [cargo](cargo.md)\n* [cargo help](cargo-help.md)\n* [cargo version](cargo-version.md)\n","doc/book/src/commands/index.md":"# Cargo Commands\n* [General Commands](general-commands.md)\n* [Build Commands](build-commands.md)\n* [Manifest Commands](manifest-commands.md)\n* [Package Commands](package-commands.md)\n* [Publishing Commands](publishing-commands.md)\n* [Report Commands](report-commands.md)\n* [Deprecated and Removed](deprecated-and-removed.md)\n","doc/book/src/commands/manifest-commands.md":"# Manifest Commands\n\n* [cargo add](cargo-add.md)\n* [cargo_info](cargo-info.md)\n* [cargo generate-lockfile](cargo-generate-lockfile.md)\n* [cargo locate-project](cargo-locate-project.md)\n* [cargo metadata](cargo-metadata.md)\n* [cargo pkgid](cargo-pkgid.md)\n* [cargo remove](cargo-remove.md)\n* [cargo tree](cargo-tree.md)\n* [cargo update](cargo-update.md)\n* [cargo vendor](cargo-vendor.md)\n","doc/book/src/commands/package-commands.md":"# Package Commands\n* [cargo init](cargo-init.md)\n* [cargo install](cargo-install.md)\n* [cargo new](cargo-new.md)\n* [cargo search](cargo-search.md)\n* [cargo uninstall](cargo-uninstall.md)\n","doc/book/src/commands/publishing-commands.md":"# Publishing Commands\n* [cargo login](cargo-login.md)\n* [cargo logout](cargo-logout.md)\n* [cargo owner](cargo-owner.md)\n* [cargo package](cargo-package.md)\n* [cargo publish](cargo-publish.md)\n* [cargo yank](cargo-yank.md)\n","doc/book/src/commands/report-commands.md":"# Report Commands\n\n* [cargo report](cargo-report.md)\n* [cargo report future-incompatibilities](cargo-report-future-incompatibilities.md)\n"},"items":[{"name":"build-commands.md","path":"doc/book/src/commands/build-commands.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/build-commands.md","title":"Command: /build-commands","category":"command-prompt","format":"markdown","content":"# Build Commands\n* [cargo bench](cargo-bench.md)\n* [cargo build](cargo-build.md)\n* [cargo check](cargo-check.md)\n* [cargo clean](cargo-clean.md)\n* [cargo clippy](cargo-clippy.md)\n* [cargo doc](cargo-doc.md)\n* [cargo fetch](cargo-fetch.md)\n* [cargo fix](cargo-fix.md)\n* [cargo fmt](cargo-fmt.md)\n* [cargo miri](cargo-miri.md)\n* [cargo run](cargo-run.md)\n* [cargo rustc](cargo-rustc.md)\n* [cargo rustdoc](cargo-rustdoc.md)\n* [cargo test](cargo-test.md)\n","isInternal":false,"tokens":142,"sizeBytes":451},{"name":"cargo-add.md","path":"doc/book/src/commands/cargo-add.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-add.md","title":"Command: /cargo-add","category":"command-prompt","format":"markdown","content":"# cargo-add(1)\n## NAME\n\ncargo-add --- Add dependencies to a Cargo.toml manifest file\n\n## SYNOPSIS\n\n`cargo add` [_options_] _crate_...\\\n`cargo add` [_options_] `--path` _path_\\\n`cargo add` [_options_] `--git` _url_ [_crate_...]\n\n\n## DESCRIPTION\n\nThis command can add or modify dependencies.\n\nThe source for the dependency can be specified with:\n\n* _crate_`@`_version_: Fetch from a registry with a version constraint of \"_version_\"\n* `--path` _path_: Fetch from the specified _path_\n* `--git` _url_: Pull from a git repo at _url_\n\nIf no source is specified, then a best effort will be made to select one, including:\n\n* Existing dependencies in other tables (like `dev-dependencies`)\n* Workspace members\n* Latest release in the registry\n\nWhen you add a package that is already present, the existing entry will be updated with the flags specified.\n\nUpon successful invocation, the enabled (`+`) and disabled (`-`) [features] of the specified\ndependency will be listed in the command's output.\n\n[features]: ../reference/features.html\n\n## OPTIONS\n\n### Source options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---git\"><a class=\"option-anchor\" href=\"#option-cargo-add---git\"><code>--git</code> <em>url</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories\">Git URL to add the specified crate from</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---branch\"><a class=\"option-anchor\" href=\"#option-cargo-add---branch\"><code>--branch</code> <em>branch</em></a></dt>\n<dd class=\"option-desc\"><p>Branch to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---tag\"><a class=\"option-anchor\" href=\"#option-cargo-add---tag\"><code>--tag</code> <em>tag</em></a></dt>\n<dd class=\"option-desc\"><p>Tag to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---rev\"><a class=\"option-anchor\" href=\"#option-cargo-add---rev\"><code>--rev</code> <em>sha</em></a></dt>\n<dd class=\"option-desc\"><p>Specific commit to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---path\"><a class=\"option-anchor\" href=\"#option-cargo-add---path\"><code>--path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#specifying-path-dependencies\">Filesystem path</a> to local crate to add.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---base\"><a class=\"option-anchor\" href=\"#option-cargo-add---base\"><code>--base</code> <em>base</em></a></dt>\n<dd class=\"option-desc\"><p>The <a href=\"../reference/unstable.html#path-bases\">path base</a> to use when adding a local crate.</p>\n<p><a href=\"../reference/unstable.html#path-bases\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---registry\"><a class=\"option-anchor\" href=\"#option-cargo-add---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Section options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---dev\"><a class=\"option-anchor\" href=\"#option-cargo-add---dev\"><code>--dev</code></a></dt>\n<dd class=\"option-desc\"><p>Add as a <a href=\"../reference/specifying-dependencies.html#development-dependencies\">development dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---build\"><a class=\"option-anchor\" href=\"#option-cargo-add---build\"><code>--build</code></a></dt>\n<dd class=\"option-desc\"><p>Add as a <a href=\"../reference/specifying-dependencies.html#build-dependencies\">build dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---target\"><a class=\"option-anchor\" href=\"#option-cargo-add---target\"><code>--target</code> <em>target</em></a></dt>\n<dd class=\"option-desc\"><p>Add as a dependency to the <a href=\"../reference/specifying-dependencies.html#platform-specific-dependencies\">given target platform</a>.</p>\n<p>To avoid unexpected shell expansions, you may use quotes around each target, e.g., <code>--target 'cfg(unix)'</code>.</p>\n</dd>\n\n\n</dl>\n\n### Dependency options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-add---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t actually write the manifest</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---rename\"><a class=\"option-anchor\" href=\"#option-cargo-add---rename\"><code>--rename</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml\">Rename</a> the dependency.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---optional\"><a class=\"option-anchor\" href=\"#option-cargo-add---optional\"><code>--optional</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as <a href=\"../reference/features.html#optional-dependencies\">optional</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-optional\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-optional\"><code>--no-optional</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as <a href=\"../reference/features.html#optional-dependencies\">required</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---public\"><a class=\"option-anchor\" href=\"#option-cargo-add---public\"><code>--public</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as public.</p>\n<p>The dependency can be referenced in your library’s public API.</p>\n<p><a href=\"../reference/unstable.html#public-dependency\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-public\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-public\"><code>--no-public</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as private.</p>\n<p>While you can use the crate in your implementation, it cannot be referenced in your public API.</p>\n<p><a href=\"../reference/unstable.html#public-dependency\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Disable the <a href=\"../reference/features.html#dependency-features\">default features</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---default-features\"><a class=\"option-anchor\" href=\"#option-cargo-add---default-features\"><code>--default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Re-enable the <a href=\"../reference/features.html#dependency-features\">default features</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--F\"><a class=\"option-anchor\" href=\"#option-cargo-add--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---features\"><a class=\"option-anchor\" href=\"#option-cargo-add---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of <a href=\"../reference/features.html#dependency-features\">features to\nactivate</a>. When adding multiple\ncrates, the features for a specific crate may be enabled with\n<code>package-name/feature-name</code> syntax. This flag may be specified multiple times,\nwhich enables all specified features.</p>\n</dd>\n\n\n</dl>\n\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-add--v\"><a class=\"option-anchor\" href=\"#option-cargo-add--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-add---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--q\"><a class=\"option-anchor\" href=\"#option-cargo-add--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-add---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---color\"><a class=\"option-anchor\" href=\"#option-cargo-add---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-add---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-add---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--p\"><a class=\"option-anchor\" href=\"#option-cargo-add--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---package\"><a class=\"option-anchor\" href=\"#option-cargo-add---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Add dependencies to only the specified package.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-add---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---locked\"><a class=\"option-anchor\" href=\"#option-cargo-add---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---offline\"><a class=\"option-anchor\" href=\"#option-cargo-add---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-add---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-add-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---config\"><a class=\"option-anchor\" href=\"#option-cargo-add---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--C\"><a class=\"option-anchor\" href=\"#option-cargo-add--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--h\"><a class=\"option-anchor\" href=\"#option-cargo-add--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---help\"><a class=\"option-anchor\" href=\"#option-cargo-add---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--Z\"><a class=\"option-anchor\" href=\"#option-cargo-add--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Add `regex` as a dependency\n\n       cargo add regex\n\n2. Add `trybuild` as a dev-dependency\n\n       cargo add --dev trybuild\n\n3. Add an older version of `nom` as a dependency\n\n       cargo add nom@5\n\n4. Add support for serializing data structures to json with `derive`s\n\n       cargo add serde serde_json -F serde/derive\n\n5. Add `windows` as a platform specific dependency on `cfg(windows)`\n\n       cargo add windows --target 'cfg(windows)'\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-remove(1)](cargo-remove.html)\n","isInternal":false,"tokens":4146,"sizeBytes":15448},{"name":"cargo-bench.md","path":"doc/book/src/commands/cargo-bench.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-bench.md","title":"Command: /cargo-bench","category":"command-prompt","format":"markdown","content":"# cargo-bench(1)\n## NAME\n\ncargo-bench --- Execute benchmarks of a package\n\n## SYNOPSIS\n\n`cargo bench` [_options_] [_benchname_] [`--` _bench-options_]\n\n## DESCRIPTION\n\nCompile and execute benchmarks.\n\nThe benchmark filtering argument _benchname_ and all the arguments following\nthe two dashes (`--`) are passed to the benchmark binaries and thus to\n_libtest_ (rustc's built in unit-test and micro-benchmarking framework). If\nyou are passing arguments to both Cargo and the binary, the ones after `--` go\nto the binary, the ones before go to Cargo. For details about libtest's\narguments see the output of `cargo bench -- --help` and check out the rustc\nbook's chapter on how tests work at\n<https://doc.rust-lang.org/rustc/tests/index.html>.\n\nAs an example, this will run only the benchmark named `foo` (and skip other\nsimilarly named benchmarks like `foobar`):\n\n    cargo bench -- foo --exact\n\nBenchmarks are built with the `--test` option to `rustc` which creates a\nspecial executable by linking your code with libtest. The executable\nautomatically runs all functions annotated with the `#[bench]` attribute.\nCargo passes the `--bench` flag to the test harness to tell it to run\nonly benchmarks, regardless of whether the harness is libtest or a custom harness.\n\nThe libtest harness may be disabled by setting `harness = false` in the target\nmanifest settings, in which case your code will need to provide its own `main`\nfunction to handle running benchmarks.\n\n> **Note**: The\n> [`#[bench]` attribute](https://doc.rust-lang.org/nightly/unstable-book/library-features/test.html)\n> is currently unstable and only available on the\n> [nightly channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html).\n> There are some packages available on\n> [crates.io](https://crates.io/keywords/benchmark) that may help with\n> running benchmarks on the stable channel, such as\n> [Criterion](https://crates.io/crates/criterion).\n\nBy default, `cargo bench` uses the [`bench` profile], which enables\noptimizations and disables debugging information. If you need to debug a\nbenchmark, you can use the `--profile=debug` command-line option to switch to\nthe debug profile. You can then run the debug-enabled benchmark within a\ndebugger.\n\n[`bench` profile]: ../reference/profiles.html#bench\n\n### Working directory of benchmarks\n\nThe working directory of every benchmark is set to the root directory of the \npackage the benchmark belongs to.\nSetting the working directory of benchmarks to the package's root directory \nmakes it possible for benchmarks to reliably access the package's files using \nrelative paths, regardless from where `cargo bench` was executed from.\n\n## OPTIONS\n\n### Benchmark Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-run\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-run\"><code>--no-run</code></a></dt>\n<dd class=\"option-desc\"><p>Compile, but don’t run benchmarks.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-fail-fast\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-fail-fast\"><code>--no-fail-fast</code></a></dt>\n<dd class=\"option-desc\"><p>Run all benchmarks regardless of failure. Without this flag, Cargo will exit\nafter the first executable fails. The Rust test harness will run all benchmarks\nwithin the executable to completion, this flag only applies to the executable\nas a whole.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--p\"><a class=\"option-anchor\" href=\"#option-cargo-bench--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---package\"><a class=\"option-anchor\" href=\"#option-cargo-bench---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-bench---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-bench---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo bench` will build the\nfollowing targets of the selected packages:\n\n- lib --- used to link with binaries and benchmarks\n- bins (only if benchmark targets are built and required features are\n  available)\n- lib as a benchmark\n- bins as benchmarks\n- benchmark targets\n\nThe default behavior can be changed by setting the `bench` flag for the target\nin the manifest settings. Setting examples to `bench = true` will build and\nrun the example as a benchmark, replacing the example's `main` function with\nthe libtest harness.\n\nSetting targets to `bench = false` will stop them from being benchmarked by\ndefault. Target selection options that take a target by name (such as\n`--example foo`) ignore the `bench` flag and will always benchmark the given\ntarget.\n\nSee [Configuring a target](../reference/cargo-targets.html#configuring-a-target)\nfor more information on per-target settings.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to benchmark. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will benchmark only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---lib\"><a class=\"option-anchor\" href=\"#option-cargo-bench---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bin\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bins\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---example\"><a class=\"option-anchor\" href=\"#option-cargo-bench---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---examples\"><a class=\"option-anchor\" href=\"#option-cargo-bench---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---test\"><a class=\"option-anchor\" href=\"#option-cargo-bench---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---tests\"><a class=\"option-anchor\" href=\"#option-cargo-bench---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bench\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---benches\"><a class=\"option-anchor\" href=\"#option-cargo-bench---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--F\"><a class=\"option-anchor\" href=\"#option-cargo-bench--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---target\"><a class=\"option-anchor\" href=\"#option-cargo-bench---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Benchmark for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---profile\"><a class=\"option-anchor\" href=\"#option-cargo-bench---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Benchmark with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---timings\"><a class=\"option-anchor\" href=\"#option-cargo-bench---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-bench---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\nBy default the Rust test harness hides output from benchmark execution to keep\nresults readable. Benchmark output can be recovered (e.g., for debugging) by\npassing `--no-capture` to the benchmark binaries:\n\n    cargo bench -- --no-capture\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--v\"><a class=\"option-anchor\" href=\"#option-cargo-bench--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-bench---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--q\"><a class=\"option-anchor\" href=\"#option-cargo-bench--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-bench---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---color\"><a class=\"option-anchor\" href=\"#option-cargo-bench---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-bench---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-bench---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-bench---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---locked\"><a class=\"option-anchor\" href=\"#option-cargo-bench---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---offline\"><a class=\"option-anchor\" href=\"#option-cargo-bench---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-bench---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-bench-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---config\"><a class=\"option-anchor\" href=\"#option-cargo-bench---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--C\"><a class=\"option-anchor\" href=\"#option-cargo-bench--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--h\"><a class=\"option-anchor\" href=\"#option-cargo-bench--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---help\"><a class=\"option-anchor\" href=\"#option-cargo-bench---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--Z\"><a class=\"option-anchor\" href=\"#option-cargo-bench--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\nThe `--jobs` argument affects the building of the benchmark executable but\ndoes not affect how many threads are used when running the benchmarks. The\nRust test harness runs benchmarks serially in a single thread.\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench--j\"><a class=\"option-anchor\" href=\"#option-cargo-bench--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-bench---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n</dl>\n\nWhile `cargo bench` involves compilation, it does not provide a `--keep-going`\nflag. Use `--no-fail-fast` to run as many benchmarks as possible without\nstopping at the first failure. To \"compile\" as many benchmarks as possible, use\n`--benches` to build benchmark binaries separately. For example:\n\n    cargo build --benches --release --keep-going\n    cargo bench --no-fail-fast\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build and execute all the benchmarks of the current package:\n\n       cargo bench\n\n2. Run only a specific benchmark within a specific benchmark target:\n\n       cargo bench --bench bench_name -- modname::some_benchmark\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-test(1)](cargo-test.html)\n","isInternal":false,"tokens":6715,"sizeBytes":26342},{"name":"cargo-build.md","path":"doc/book/src/commands/cargo-build.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-build.md","title":"Command: /cargo-build","category":"command-prompt","format":"markdown","content":"# cargo-build(1)\n## NAME\n\ncargo-build --- Compile the current package\n\n## SYNOPSIS\n\n`cargo build` [_options_]\n\n## DESCRIPTION\n\nCompile local packages and all of their dependencies.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build--p\"><a class=\"option-anchor\" href=\"#option-cargo-build--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---package\"><a class=\"option-anchor\" href=\"#option-cargo-build---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-build---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Build all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all\"><a class=\"option-anchor\" href=\"#option-cargo-build---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-build---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo build` will build all\nbinary and library targets of the selected packages. Binaries are skipped if\nthey have `required-features` that are missing.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to build. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will build only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build---lib\"><a class=\"option-anchor\" href=\"#option-cargo-build---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Build the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bin\"><a class=\"option-anchor\" href=\"#option-cargo-build---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bins\"><a class=\"option-anchor\" href=\"#option-cargo-build---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Build all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---example\"><a class=\"option-anchor\" href=\"#option-cargo-build---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---examples\"><a class=\"option-anchor\" href=\"#option-cargo-build---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Build all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---test\"><a class=\"option-anchor\" href=\"#option-cargo-build---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---tests\"><a class=\"option-anchor\" href=\"#option-cargo-build---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bench\"><a class=\"option-anchor\" href=\"#option-cargo-build---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---benches\"><a class=\"option-anchor\" href=\"#option-cargo-build---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-build---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build--F\"><a class=\"option-anchor\" href=\"#option-cargo-build--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---features\"><a class=\"option-anchor\" href=\"#option-cargo-build---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-build---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-build---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build---target\"><a class=\"option-anchor\" href=\"#option-cargo-build---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--r\"><a class=\"option-anchor\" href=\"#option-cargo-build--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---release\"><a class=\"option-anchor\" href=\"#option-cargo-build---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Build optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---profile\"><a class=\"option-anchor\" href=\"#option-cargo-build---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Build with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---timings\"><a class=\"option-anchor\" href=\"#option-cargo-build---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-build---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---artifact-dir\"><a class=\"option-anchor\" href=\"#option-cargo-build---artifact-dir\"><code>--artifact-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Copy final artifacts to this directory.</p>\n<p>This option is unstable and available only on the\n<a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.\nSee <a href=\"https://github.com/rust-lang/cargo/issues/6790\">https://github.com/rust-lang/cargo/issues/6790</a> for more information.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build--v\"><a class=\"option-anchor\" href=\"#option-cargo-build--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-build---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--q\"><a class=\"option-anchor\" href=\"#option-cargo-build--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-build---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---color\"><a class=\"option-anchor\" href=\"#option-cargo-build---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-build---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-build---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-build---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---locked\"><a class=\"option-anchor\" href=\"#option-cargo-build---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---offline\"><a class=\"option-anchor\" href=\"#option-cargo-build---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-build---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-build-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---config\"><a class=\"option-anchor\" href=\"#option-cargo-build---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--C\"><a class=\"option-anchor\" href=\"#option-cargo-build--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--h\"><a class=\"option-anchor\" href=\"#option-cargo-build--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---help\"><a class=\"option-anchor\" href=\"#option-cargo-build---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--Z\"><a class=\"option-anchor\" href=\"#option-cargo-build--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build--j\"><a class=\"option-anchor\" href=\"#option-cargo-build--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-build---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-build---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-build---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo build -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo build -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-build---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-build---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package and all of its dependencies:\n\n       cargo build\n\n2. Build with optimizations:\n\n       cargo build --release\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-rustc(1)](cargo-rustc.html)\n","isInternal":false,"tokens":6095,"sizeBytes":23657},{"name":"cargo-check.md","path":"doc/book/src/commands/cargo-check.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-check.md","title":"Command: /cargo-check","category":"command-prompt","format":"markdown","content":"# cargo-check(1)\n## NAME\n\ncargo-check --- Check the current package\n\n## SYNOPSIS\n\n`cargo check` [_options_]\n\n## DESCRIPTION\n\nCheck a local package and all of its dependencies for errors. This will\nessentially compile the packages without performing the final step of code\ngeneration, which is faster than running `cargo build`. The compiler will save\nmetadata files to disk so that future runs will reuse them if the source has\nnot been modified. Some diagnostics and errors are only emitted during code\ngeneration, so they inherently won't be reported with `cargo check`.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check--p\"><a class=\"option-anchor\" href=\"#option-cargo-check--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---package\"><a class=\"option-anchor\" href=\"#option-cargo-check---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-check---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Check all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all\"><a class=\"option-anchor\" href=\"#option-cargo-check---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-check---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo check` will check all\nbinary and library targets of the selected packages. Binaries are skipped if\nthey have `required-features` that are missing.\n\nPassing target selection flags will check only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check---lib\"><a class=\"option-anchor\" href=\"#option-cargo-check---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Check the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bin\"><a class=\"option-anchor\" href=\"#option-cargo-check---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bins\"><a class=\"option-anchor\" href=\"#option-cargo-check---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Check all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---example\"><a class=\"option-anchor\" href=\"#option-cargo-check---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---examples\"><a class=\"option-anchor\" href=\"#option-cargo-check---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Check all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---test\"><a class=\"option-anchor\" href=\"#option-cargo-check---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---tests\"><a class=\"option-anchor\" href=\"#option-cargo-check---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bench\"><a class=\"option-anchor\" href=\"#option-cargo-check---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---benches\"><a class=\"option-anchor\" href=\"#option-cargo-check---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-check---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check--F\"><a class=\"option-anchor\" href=\"#option-cargo-check--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---features\"><a class=\"option-anchor\" href=\"#option-cargo-check---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-check---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-check---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check---target\"><a class=\"option-anchor\" href=\"#option-cargo-check---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Check for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--r\"><a class=\"option-anchor\" href=\"#option-cargo-check--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---release\"><a class=\"option-anchor\" href=\"#option-cargo-check---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Check optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---profile\"><a class=\"option-anchor\" href=\"#option-cargo-check---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Check with the given profile.</p>\n<p>As a special case, specifying the <code>test</code> profile will also enable checking in\ntest mode which will enable checking tests and enable the <code>test</code> cfg option.\nSee <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc tests</a> for more\ndetail.</p>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---timings\"><a class=\"option-anchor\" href=\"#option-cargo-check---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-check---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check--v\"><a class=\"option-anchor\" href=\"#option-cargo-check--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-check---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--q\"><a class=\"option-anchor\" href=\"#option-cargo-check--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-check---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---color\"><a class=\"option-anchor\" href=\"#option-cargo-check---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-check---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-check---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-check---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---locked\"><a class=\"option-anchor\" href=\"#option-cargo-check---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---offline\"><a class=\"option-anchor\" href=\"#option-cargo-check---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-check---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-check-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---config\"><a class=\"option-anchor\" href=\"#option-cargo-check---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--C\"><a class=\"option-anchor\" href=\"#option-cargo-check--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--h\"><a class=\"option-anchor\" href=\"#option-cargo-check--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---help\"><a class=\"option-anchor\" href=\"#option-cargo-check---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--Z\"><a class=\"option-anchor\" href=\"#option-cargo-check--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check--j\"><a class=\"option-anchor\" href=\"#option-cargo-check--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-check---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-check---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-check---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo check -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo check -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-check---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-check---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Check the local package for errors:\n\n       cargo check\n\n2. Check all targets, including unit tests:\n\n       cargo check --all-targets --profile=test\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n","isInternal":false,"tokens":5955,"sizeBytes":23172},{"name":"cargo-clean.md","path":"doc/book/src/commands/cargo-clean.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-clean.md","title":"Command: /cargo-clean","category":"command-prompt","format":"markdown","content":"# cargo-clean(1)\n## NAME\n\ncargo-clean --- Remove generated artifacts\n\n## SYNOPSIS\n\n`cargo clean` [_options_]\n\n## DESCRIPTION\n\nRemove artifacts from the target directory that Cargo has generated in the\npast.\n\nWith no options, `cargo clean` will delete the entire target directory.\n\n## OPTIONS\n\n### Package Selection\n\nWhen no packages are selected, all packages and all dependencies in the\nworkspace are cleaned.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean--p\"><a class=\"option-anchor\" href=\"#option-cargo-clean--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---package\"><a class=\"option-anchor\" href=\"#option-cargo-clean---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Clean only the specified packages. This flag may be specified\nmultiple times. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC format.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-clean---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Clean artifacts of the workspace members.</p>\n</dd>\n\n\n</dl>\n\n### Clean Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-clean---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a summary of what would be deleted without deleting anything.\nUse with <code>--verbose</code> to display the actual files that would be deleted.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---doc\"><a class=\"option-anchor\" href=\"#option-cargo-clean---doc\"><code>--doc</code></a></dt>\n<dd class=\"option-desc\"><p>This option will cause <code>cargo clean</code> to remove only the <code>doc</code> directory in\nthe target directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---release\"><a class=\"option-anchor\" href=\"#option-cargo-clean---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Remove artifacts only in the <code>release</code> directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---profile\"><a class=\"option-anchor\" href=\"#option-cargo-clean---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Remove artifacts only in the directory with the given profile name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-clean---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---target\"><a class=\"option-anchor\" href=\"#option-cargo-clean---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Clean for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-clean--v\"><a class=\"option-anchor\" href=\"#option-cargo-clean--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-clean---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--q\"><a class=\"option-anchor\" href=\"#option-cargo-clean--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-clean---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---color\"><a class=\"option-anchor\" href=\"#option-cargo-clean---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-clean---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-clean---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---locked\"><a class=\"option-anchor\" href=\"#option-cargo-clean---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---offline\"><a class=\"option-anchor\" href=\"#option-cargo-clean---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-clean---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-clean-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---config\"><a class=\"option-anchor\" href=\"#option-cargo-clean---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--C\"><a class=\"option-anchor\" href=\"#option-cargo-clean--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--h\"><a class=\"option-anchor\" href=\"#option-cargo-clean--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---help\"><a class=\"option-anchor\" href=\"#option-cargo-clean---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--Z\"><a class=\"option-anchor\" href=\"#option-cargo-clean--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove the entire target directory:\n\n       cargo clean\n\n2. Remove only the release artifacts:\n\n       cargo clean --release\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n","isInternal":false,"tokens":2938,"sizeBytes":11216},{"name":"cargo-clippy.md","path":"doc/book/src/commands/cargo-clippy.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-clippy.md","title":"Command: /cargo-clippy","category":"command-prompt","format":"markdown","content":"# cargo-clippy(1)\n\n## NAME\n\ncargo-clippy --- Checks a package to catch common mistakes and improve your Rust code\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nFor information about usage and installation,\nsee [Clippy Documentation](../../clippy/index.html).\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-fix(1)](cargo-fix.md),\n[cargo-fmt(1)](cargo-fmt.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n","isInternal":false,"tokens":131,"sizeBytes":558},{"name":"cargo-doc.md","path":"doc/book/src/commands/cargo-doc.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-doc.md","title":"Command: /cargo-doc","category":"command-prompt","format":"markdown","content":"# cargo-doc(1)\n## NAME\n\ncargo-doc --- Build a package's documentation\n\n## SYNOPSIS\n\n`cargo doc` [_options_]\n\n## DESCRIPTION\n\nBuild the documentation for the local package and all dependencies. The output\nis placed in `target/doc` in rustdoc's usual format.\n\n**Note:** Documentation generation is cumulative: existing doc files in the target directory are preserved across different `cargo doc` invocations. To remove existing generated docs, pass `--doc` to [cargo-clean(1)](cargo-clean.html).\n\n## OPTIONS\n\n### Documentation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---open\"><a class=\"option-anchor\" href=\"#option-cargo-doc---open\"><code>--open</code></a></dt>\n<dd class=\"option-desc\"><p>Open the docs in a browser after building them. This will use your default\nbrowser unless you define another one in the <code>BROWSER</code> environment variable\nor use the <a href=\"../reference/config.html#docbrowser\"><code>doc.browser</code></a> configuration\noption.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---no-deps\"><a class=\"option-anchor\" href=\"#option-cargo-doc---no-deps\"><code>--no-deps</code></a></dt>\n<dd class=\"option-desc\"><p>Do not build documentation for dependencies.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---document-private-items\"><a class=\"option-anchor\" href=\"#option-cargo-doc---document-private-items\"><code>--document-private-items</code></a></dt>\n<dd class=\"option-desc\"><p>Include non-public items in the documentation. This will be enabled by default if documenting a binary target.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc--p\"><a class=\"option-anchor\" href=\"#option-cargo-doc--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---package\"><a class=\"option-anchor\" href=\"#option-cargo-doc---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-doc---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Document all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---all\"><a class=\"option-anchor\" href=\"#option-cargo-doc---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-doc---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo doc` will document all\nbinary and library targets of the selected package. The binary will be skipped\nif its name is the same as the lib target. Binaries are skipped if they have\n`required-features` that are missing.\n\nThe default behavior can be changed by setting `doc = false` for the target in\nthe manifest settings. Using target selection options will ignore the `doc`\nflag and will always document the given target.\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-doc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Document the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-doc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-doc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Document all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---example\"><a class=\"option-anchor\" href=\"#option-cargo-doc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-doc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Document all example targets.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc--F\"><a class=\"option-anchor\" href=\"#option-cargo-doc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---target\"><a class=\"option-anchor\" href=\"#option-cargo-doc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Document for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--r\"><a class=\"option-anchor\" href=\"#option-cargo-doc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---release\"><a class=\"option-anchor\" href=\"#option-cargo-doc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Document optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-doc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Document with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-doc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-doc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc--v\"><a class=\"option-anchor\" href=\"#option-cargo-doc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-doc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--q\"><a class=\"option-anchor\" href=\"#option-cargo-doc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-doc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---color\"><a class=\"option-anchor\" href=\"#option-cargo-doc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-doc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-doc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-doc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-doc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-doc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-doc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-doc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---config\"><a class=\"option-anchor\" href=\"#option-cargo-doc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--C\"><a class=\"option-anchor\" href=\"#option-cargo-doc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--h\"><a class=\"option-anchor\" href=\"#option-cargo-doc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---help\"><a class=\"option-anchor\" href=\"#option-cargo-doc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-doc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc--j\"><a class=\"option-anchor\" href=\"#option-cargo-doc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-doc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-doc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo doc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo doc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---output-format\"><a class=\"option-anchor\" href=\"#option-cargo-doc---output-format\"><code>--output-format</code></a></dt>\n<dd class=\"option-desc\"><p>The output type for the documentation emitted. Valid values:</p>\n<ul>\n<li><code>html</code> (default): Emit the documentation in HTML format.</li>\n<li><code>json</code>: Emit the documentation in the <a href=\"https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types\">experimental JSON format</a>.</li>\n</ul>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package documentation and its dependencies and output to\n   `target/doc`.\n\n       cargo doc\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-rustdoc(1)](cargo-rustdoc.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n","isInternal":false,"tokens":5647,"sizeBytes":21729},{"name":"cargo-fetch.md","path":"doc/book/src/commands/cargo-fetch.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-fetch.md","title":"Command: /cargo-fetch","category":"command-prompt","format":"markdown","content":"# cargo-fetch(1)\n## NAME\n\ncargo-fetch --- Fetch dependencies of a package from the network\n\n## SYNOPSIS\n\n`cargo fetch` [_options_]\n\n## DESCRIPTION\n\nIf a `Cargo.lock` file is available, this command will ensure that all of the\ngit dependencies and/or registry dependencies are downloaded and locally\navailable. Subsequent Cargo commands will be able to run offline after a `cargo\nfetch` unless the lock file changes.\n\nIf the lock file is not available, then this command will generate the lock\nfile before fetching the dependencies.\n\nIf `--target` is not specified, then all target dependencies are fetched.\n\n## OPTIONS\n\n### Fetch options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch---target\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Fetch for the specified target architecture. Flag may be specified multiple times. The default is all architectures. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch--v\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--q\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---color\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---locked\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---offline\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fetch-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-fetch-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---config\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--C\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--h\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---help\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--Z\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Fetch all dependencies:\n\n       cargo fetch\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-update(1)](cargo-update.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\n","isInternal":false,"tokens":2292,"sizeBytes":8849},{"name":"cargo-fix.md","path":"doc/book/src/commands/cargo-fix.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-fix.md","title":"Command: /cargo-fix","category":"command-prompt","format":"markdown","content":"# cargo-fix(1)\n## NAME\n\ncargo-fix --- Automatically fix lint warnings reported by rustc\n\n## SYNOPSIS\n\n`cargo fix` [_options_]\n\n## DESCRIPTION\n\nThis Cargo subcommand will automatically take rustc's suggestions from\ndiagnostics like warnings and apply them to your source code. This is intended\nto help automate tasks that rustc itself already knows how to tell you to fix!\n\nExecuting `cargo fix` will under the hood execute [cargo-check(1)](cargo-check.html). Any warnings\napplicable to your crate will be automatically fixed (if possible) and all\nremaining warnings will be displayed when the check process is finished. For\nexample if you'd like to apply all fixes to the current package, you can run:\n\n    cargo fix\n\nwhich behaves the same as `cargo check --all-targets`.\n\n`cargo fix` is only capable of fixing code that is normally compiled with\n`cargo check`. If code is conditionally enabled with optional features, you\nwill need to enable those features for that code to be analyzed:\n\n    cargo fix --features foo\n\nSimilarly, other `cfg` expressions like platform-specific code will need to\npass `--target` to fix code for the given target.\n\n    cargo fix --target x86_64-pc-windows-gnu\n\nIf you encounter any problems with `cargo fix` or otherwise have any questions\nor feature requests please don't hesitate to file an issue at\n<https://github.com/rust-lang/cargo>.\n\n### Edition migration\n\nThe `cargo fix` subcommand can also be used to migrate a package from one\n[edition] to the next. The general procedure is:\n\n1. Run `cargo fix --edition`. Consider also using the `--all-features` flag if\n   your project has multiple features. You may also want to run `cargo fix\n   --edition` multiple times with different `--target` flags if your project\n   has platform-specific code gated by `cfg` attributes.\n2. Modify `Cargo.toml` to set the [edition field] to the new edition.\n3. Run your project tests to verify that everything still works. If new\n   warnings are issued, you may want to consider running `cargo fix` again\n   (without the `--edition` flag) to apply any suggestions given by the\n   compiler.\n\nAnd hopefully that's it! Just keep in mind of the caveats mentioned above that\n`cargo fix` cannot update code for inactive features or `cfg` expressions.\nAlso, in some rare cases the compiler is unable to automatically migrate all\ncode to the new edition, and this may require manual changes after building\nwith the new edition.\n\n[edition]: https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html\n[edition field]: ../reference/manifest.html#the-edition-field\n\n## OPTIONS\n\n### Fix options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---broken-code\"><a class=\"option-anchor\" href=\"#option-cargo-fix---broken-code\"><code>--broken-code</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if it already has compiler errors. This is useful if <code>cargo fix</code>\nfails to apply the changes. It will apply the changes and leave the broken\ncode in the working directory for you to inspect and manually fix.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---edition\"><a class=\"option-anchor\" href=\"#option-cargo-fix---edition\"><code>--edition</code></a></dt>\n<dd class=\"option-desc\"><p>Apply changes that will update the code to the next edition. This will not\nupdate the edition in the <code>Cargo.toml</code> manifest, which must be updated\nmanually after <code>cargo fix --edition</code> has finished.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---edition-idioms\"><a class=\"option-anchor\" href=\"#option-cargo-fix---edition-idioms\"><code>--edition-idioms</code></a></dt>\n<dd class=\"option-desc\"><p>Apply suggestions that will update code to the preferred style for the current\nedition.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-no-vcs\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-no-vcs\"><code>--allow-no-vcs</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if a VCS was not detected.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if the working directory has changes (including staged changes).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-staged\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-staged\"><code>--allow-staged</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if the working directory has staged changes.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix--p\"><a class=\"option-anchor\" href=\"#option-cargo-fix--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---package\"><a class=\"option-anchor\" href=\"#option-cargo-fix---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-fix---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-fix---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo fix` will fix all targets\n(`--all-targets` implied). Binaries are skipped if they have\n`required-features` that are missing.\n\nPassing target selection flags will fix only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---lib\"><a class=\"option-anchor\" href=\"#option-cargo-fix---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Fix the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bin\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bins\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---example\"><a class=\"option-anchor\" href=\"#option-cargo-fix---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---examples\"><a class=\"option-anchor\" href=\"#option-cargo-fix---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---test\"><a class=\"option-anchor\" href=\"#option-cargo-fix---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---tests\"><a class=\"option-anchor\" href=\"#option-cargo-fix---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bench\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---benches\"><a class=\"option-anchor\" href=\"#option-cargo-fix---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix--F\"><a class=\"option-anchor\" href=\"#option-cargo-fix--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---target\"><a class=\"option-anchor\" href=\"#option-cargo-fix---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Fix for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--r\"><a class=\"option-anchor\" href=\"#option-cargo-fix--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---release\"><a class=\"option-anchor\" href=\"#option-cargo-fix---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Fix optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---profile\"><a class=\"option-anchor\" href=\"#option-cargo-fix---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Fix with the given profile.</p>\n<p>As a special case, specifying the <code>test</code> profile will also enable checking in\ntest mode which will enable checking tests and enable the <code>test</code> cfg option.\nSee <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc tests</a> for more\ndetail.</p>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---timings\"><a class=\"option-anchor\" href=\"#option-cargo-fix---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-fix---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix--v\"><a class=\"option-anchor\" href=\"#option-cargo-fix--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-fix---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--q\"><a class=\"option-anchor\" href=\"#option-cargo-fix--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-fix---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---color\"><a class=\"option-anchor\" href=\"#option-cargo-fix---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-fix---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-fix---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-fix---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---locked\"><a class=\"option-anchor\" href=\"#option-cargo-fix---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---offline\"><a class=\"option-anchor\" href=\"#option-cargo-fix---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-fix---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-fix-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---config\"><a class=\"option-anchor\" href=\"#option-cargo-fix---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--C\"><a class=\"option-anchor\" href=\"#option-cargo-fix--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--h\"><a class=\"option-anchor\" href=\"#option-cargo-fix--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---help\"><a class=\"option-anchor\" href=\"#option-cargo-fix---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--Z\"><a class=\"option-anchor\" href=\"#option-cargo-fix--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix--j\"><a class=\"option-anchor\" href=\"#option-cargo-fix--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-fix---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-fix---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo fix -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo fix -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Apply compiler suggestions to the local package:\n\n       cargo fix\n\n2. Update a package to prepare it for the next edition:\n\n       cargo fix --edition\n\n3. Apply suggested idioms for the current edition:\n\n       cargo fix --edition-idioms\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-check(1)](cargo-check.html)\n","isInternal":false,"tokens":6867,"sizeBytes":26607},{"name":"cargo-fmt.md","path":"doc/book/src/commands/cargo-fmt.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-fmt.md","title":"Command: /cargo-fmt","category":"command-prompt","format":"markdown","content":"# cargo-fmt(1)\n\n## NAME\n\ncargo-fmt --- Formats all bin and lib files of the current crate using rustfmt\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nFor information about usage and installation,\nsee <https://github.com/rust-lang/rustfmt>.\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-fix(1)](cargo-fix.md),\n[cargo-clippy(1)](cargo-clippy.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n","isInternal":false,"tokens":133,"sizeBytes":545},{"name":"cargo-generate-lockfile.md","path":"doc/book/src/commands/cargo-generate-lockfile.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-generate-lockfile.md","title":"Command: /cargo-generate-lockfile","category":"command-prompt","format":"markdown","content":"# cargo-generate-lockfile(1)\n\n## NAME\n\ncargo-generate-lockfile --- Generate the lockfile for a package\n\n## SYNOPSIS\n\n`cargo generate-lockfile` [_options_]\n\n## DESCRIPTION\n\nThis command will create the `Cargo.lock` lockfile for the current package or\nworkspace. If the lockfile already exists, it will be rebuilt with the latest\navailable version of every package.\n\nSee also [cargo-update(1)](cargo-update.html) which is also capable of creating a `Cargo.lock`\nlockfile and has more options for controlling update behavior.\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--v\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--q\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---color\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---publish-time\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---publish-time\"><code>--publish-time</code> <em>yyyy-mm-ddThh:mm:ssZ</em></a></dt>\n<dd class=\"option-desc\"><p>Latest publish time allowed for registry packages (Unstable)</p>\n<p>This is a best-effort filter on allowed packages, including:</p>\n<ul>\n<li>packages from unsupported registries are always accepted</li>\n<li>only the current yank state is respected, not the state as of <code>--publish-time</code></li>\n<li>precision of the publish time</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---locked\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---offline\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---config\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--C\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--h\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---help\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--Z\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create or update the lockfile for the current package or workspace:\n\n       cargo generate-lockfile\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-update(1)](cargo-update.html)\n","isInternal":false,"tokens":2272,"sizeBytes":8719},{"name":"cargo-help.md","path":"doc/book/src/commands/cargo-help.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-help.md","title":"Command: /cargo-help","category":"command-prompt","format":"markdown","content":"# cargo-help(1)\n\n## NAME\n\ncargo-help --- Get help for a Cargo command\n\n## SYNOPSIS\n\n`cargo help` [_subcommand_]\n\n## DESCRIPTION\n\nPrints a help message for the given command.\n\nFor commands with subcommands, separate the command levels with spaces. For\nexample, `cargo help report future-incompatibilities` displays help for the\n`cargo report future-incompatibilities` command.\n\nSpaces separate hierarchy levels only between a parent command and its\nsubcommands. Dashes that are part of a command's name, such as\n`generate-lockfile`, must always be preserved.\n\nMultiple command levels can also be written as a single dash-joined word.\nFor example, `cargo help report-future-incompatibilities` is equivalent to\n`cargo help report future-incompatibilities`.\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-help--v\"><a class=\"option-anchor\" href=\"#option-cargo-help--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-help---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--q\"><a class=\"option-anchor\" href=\"#option-cargo-help--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-help---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---color\"><a class=\"option-anchor\" href=\"#option-cargo-help---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-help---locked\"><a class=\"option-anchor\" href=\"#option-cargo-help---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---offline\"><a class=\"option-anchor\" href=\"#option-cargo-help---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-help---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-help-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-help-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---config\"><a class=\"option-anchor\" href=\"#option-cargo-help---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--C\"><a class=\"option-anchor\" href=\"#option-cargo-help--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--h\"><a class=\"option-anchor\" href=\"#option-cargo-help--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---help\"><a class=\"option-anchor\" href=\"#option-cargo-help---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--Z\"><a class=\"option-anchor\" href=\"#option-cargo-help--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Get help for a command:\n\n       cargo help build\n\n2. Get help for a nested command:\n\n       cargo help report future-incompatibilities\n\n3. The dash-joined form also works:\n\n       cargo help report-future-incompatibilities\n\n4. Help is also available with the `--help` flag:\n\n       cargo build --help\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n","isInternal":false,"tokens":1924,"sizeBytes":7430},{"name":"cargo-info.md","path":"doc/book/src/commands/cargo-info.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-info.md","title":"Command: /cargo-info","category":"command-prompt","format":"markdown","content":"# cargo-info(1)\n\n## NAME\n\ncargo-info --- Display information about a package.\n\n## SYNOPSIS\n\n`cargo info` [_options_] _spec_\n\n## DESCRIPTION\n\nThis command displays information about a package. It fetches data from the package's Cargo.toml file\nand presents it in a human-readable format.\n\n## OPTIONS\n\n### Info Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-info-spec\"><a class=\"option-anchor\" href=\"#option-cargo-info-spec\"><em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Fetch information about the specified package. The <em>spec</em> can be a package ID, see <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.\nIf the specified package is part of the current workspace, information from the local Cargo.toml file will be displayed.\nIf the <code>Cargo.lock</code> file does not exist, it will be created. If no version is specified, the appropriate version will be\nselected based on the Minimum Supported Rust Version (MSRV).</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-info---index\"><a class=\"option-anchor\" href=\"#option-cargo-info---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-info---registry\"><a class=\"option-anchor\" href=\"#option-cargo-info---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-info--v\"><a class=\"option-anchor\" href=\"#option-cargo-info--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-info---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--q\"><a class=\"option-anchor\" href=\"#option-cargo-info--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-info---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---color\"><a class=\"option-anchor\" href=\"#option-cargo-info---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-info---locked\"><a class=\"option-anchor\" href=\"#option-cargo-info---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---offline\"><a class=\"option-anchor\" href=\"#option-cargo-info---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-info---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-info-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-info-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---config\"><a class=\"option-anchor\" href=\"#option-cargo-info---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--C\"><a class=\"option-anchor\" href=\"#option-cargo-info--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--h\"><a class=\"option-anchor\" href=\"#option-cargo-info--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---help\"><a class=\"option-anchor\" href=\"#option-cargo-info---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--Z\"><a class=\"option-anchor\" href=\"#option-cargo-info--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Inspect the `serde` package from crates.io:\n\n        cargo info serde\n2. Inspect the `serde` package with version `1.0.0`:\n\n        cargo info serde@1.0.0\n3. Inspect the `serde` package from the local registry:\n\n        cargo info serde --registry my-registry\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-search(1)](cargo-search.html)\n","isInternal":false,"tokens":2205,"sizeBytes":8349},{"name":"cargo-init.md","path":"doc/book/src/commands/cargo-init.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-init.md","title":"Command: /cargo-init","category":"command-prompt","format":"markdown","content":"# cargo-init(1)\n\n## NAME\n\ncargo-init --- Create a new Cargo package in an existing directory\n\n## SYNOPSIS\n\n`cargo init` [_options_] [_path_]\n\n## DESCRIPTION\n\nThis command will create a new Cargo manifest in the current directory. Give a\npath as an argument to create in the given directory.\n\nIf there are typically-named Rust source files already in the directory, those\nwill be used. If not, then a sample `src/main.rs` file will be created, or\n`src/lib.rs` if `--lib` is passed.\n\nIf the directory is not already in a VCS repository, then a new repository\nis created (see `--vcs` below).\n\nSee [cargo-new(1)](cargo-new.html) for a similar command which will create a new package in\na new directory.\n\n## OPTIONS\n\n### Init Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-init---bin\"><a class=\"option-anchor\" href=\"#option-cargo-init---bin\"><code>--bin</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a binary target (<code>src/main.rs</code>).\nThis is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---lib\"><a class=\"option-anchor\" href=\"#option-cargo-init---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a library target (<code>src/lib.rs</code>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---edition\"><a class=\"option-anchor\" href=\"#option-cargo-init---edition\"><code>--edition</code> <em>edition</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the Rust edition to use. Default is 2024.\nPossible values: 2015, 2018, 2021, 2024</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---name\"><a class=\"option-anchor\" href=\"#option-cargo-init---name\"><code>--name</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Set the package name. Defaults to the directory name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---vcs\"><a class=\"option-anchor\" href=\"#option-cargo-init---vcs\"><code>--vcs</code> <em>vcs</em></a></dt>\n<dd class=\"option-desc\"><p>Initialize a new VCS repository for the given version control system (git,\nhg, pijul, or fossil) or do not initialize any version control at all\n(none). If not specified, defaults to <code>git</code> or the configuration value\n<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---registry\"><a class=\"option-anchor\" href=\"#option-cargo-init---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name\nwhich will restrict publishing only to that registry.</p>\n<p>Registry names are defined in <a href=\"../reference/config.html\">Cargo config files</a>.\nIf not specified, the default registry defined by the <code>registry.default</code>\nconfig key is used. If the default registry is not set and <code>--registry</code> is not\nused, the <code>publish</code> field will not be set which means that publishing will not\nbe restricted.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-init--v\"><a class=\"option-anchor\" href=\"#option-cargo-init--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-init---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--q\"><a class=\"option-anchor\" href=\"#option-cargo-init--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-init---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---color\"><a class=\"option-anchor\" href=\"#option-cargo-init---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-init-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-init-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---config\"><a class=\"option-anchor\" href=\"#option-cargo-init---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--C\"><a class=\"option-anchor\" href=\"#option-cargo-init--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--h\"><a class=\"option-anchor\" href=\"#option-cargo-init--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---help\"><a class=\"option-anchor\" href=\"#option-cargo-init---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--Z\"><a class=\"option-anchor\" href=\"#option-cargo-init--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a binary Cargo package in the current directory:\n\n       cargo init\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-new(1)](cargo-new.html)\n","isInternal":false,"tokens":2086,"sizeBytes":7661},{"name":"cargo-install.md","path":"doc/book/src/commands/cargo-install.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-install.md","title":"Command: /cargo-install","category":"command-prompt","format":"markdown","content":"# cargo-install(1)\n## NAME\n\ncargo-install --- Build and install a Rust binary\n\n## SYNOPSIS\n\n`cargo install` [_options_] _crate_[@_version_]...\\\n`cargo install` [_options_] `--path` _path_\\\n`cargo install` [_options_] `--git` _url_ [_crate_...]\\\n`cargo install` [_options_] `--list`\n\n## DESCRIPTION\n\nThis command manages Cargo's local set of installed binary crates. Only\npackages which have executable `[[bin]]` or `[[example]]` targets can be\ninstalled, and all executables are installed into the installation root's\n`bin` folder. By default only binaries, not examples, are installed.\n\nThe installation root is determined, in order of precedence:\n\n- `--root` option\n- `CARGO_INSTALL_ROOT` environment variable\n- `install.root` Cargo [config value](../reference/config.html)\n- `CARGO_HOME` environment variable\n- `$HOME/.cargo`\n\nThere are multiple sources from which a crate can be installed. The default\nsource location is crates.io but the `--git`, `--path`, and `--registry` flags\ncan change this source. If the source contains more than one package (such as\ncrates.io or a git repository with multiple crates) the _crate_ argument is\nrequired to indicate which crate should be installed.\n\nCrates from crates.io can optionally specify the version they wish to install\nvia the `--version` flags, and similarly packages from git repositories can\noptionally specify the branch, tag, or revision that should be installed. If a\ncrate has multiple binaries, the `--bin` argument can selectively install only\none of them, and if you'd rather install examples the `--example` argument can\nbe used as well.\n\nIf the package is already installed, Cargo will reinstall it if the installed\nversion does not appear to be up-to-date. If any of the following values\nchange, then Cargo will reinstall the package:\n\n- The package version and source.\n- The set of binary names installed.\n- The chosen features.\n- The profile (`--profile`).\n- The target (`--target`).\n\nInstalling with `--path` will always build and install, unless there are\nconflicting binaries from another package. The `--force` flag may be used to\nforce Cargo to always reinstall the package.\n\nIf the source is crates.io or `--git` then by default the crate will be built\nin a temporary target directory. To avoid this, the target directory can be\nspecified by setting the `CARGO_TARGET_DIR` environment variable to a\npath. In particular, this can be useful for caching build artifacts on\ncontinuous integration systems.\n\n### Dealing with the Lockfile\n\nBy default, Cargo uses the `Cargo.lock` file included with the package if it is\navailable. This ensures that the installed executable uses the dependency versions\nselected when the package was published. If no lockfile is available, including for\npackages published with versions of Cargo before 1.37, Cargo resolves the dependencies\nnormally.\n\nThe `--locked` flag does not currently change dependency resolution for `cargo install`.\nIf no `Cargo.lock` is available, using `--locked` emits a warning.\n\n### Configuration Discovery\n\nThis command operates on system or user level, not project level.\nThis means that the local [configuration discovery] is ignored.\nInstead, the configuration discovery begins at `$CARGO_HOME/config.toml`. \nIf the package is installed with `--path $PATH`, the local configuration \nwill be used, beginning discovery at `$PATH/.cargo/config.toml`.\n\n[configuration discovery]: ../reference/config.html#hierarchical-structure\n\n## OPTIONS\n\n### Install Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install---vers\"><a class=\"option-anchor\" href=\"#option-cargo-install---vers\"><code>--vers</code> <em>version</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---version\"><a class=\"option-anchor\" href=\"#option-cargo-install---version\"><code>--version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>Specify a version to install. This may be a <a href=\"../reference/specifying-dependencies.html\">version\nrequirement</a>, like <code>~1.2</code>, to have Cargo\nselect the newest version from the given requirement. If the version does not\nhave a requirement operator (such as <code>^</code> or <code>~</code>), then it must be in the form\n<em>MAJOR.MINOR.PATCH</em>, and will install exactly that version; it is <em>not</em>\ntreated as a caret requirement like Cargo dependencies are.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---git\"><a class=\"option-anchor\" href=\"#option-cargo-install---git\"><code>--git</code> <em>url</em></a></dt>\n<dd class=\"option-desc\"><p>Git URL to install the specified crate from.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---branch\"><a class=\"option-anchor\" href=\"#option-cargo-install---branch\"><code>--branch</code> <em>branch</em></a></dt>\n<dd class=\"option-desc\"><p>Branch to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---tag\"><a class=\"option-anchor\" href=\"#option-cargo-install---tag\"><code>--tag</code> <em>tag</em></a></dt>\n<dd class=\"option-desc\"><p>Tag to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---rev\"><a class=\"option-anchor\" href=\"#option-cargo-install---rev\"><code>--rev</code> <em>sha</em></a></dt>\n<dd class=\"option-desc\"><p>Specific commit to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---path\"><a class=\"option-anchor\" href=\"#option-cargo-install---path\"><code>--path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Filesystem path to local crate to install from.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---list\"><a class=\"option-anchor\" href=\"#option-cargo-install---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List all installed packages and their versions.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--n\"><a class=\"option-anchor\" href=\"#option-cargo-install--n\"><code>-n</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-install---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>(unstable) Perform all checks without installing.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--f\"><a class=\"option-anchor\" href=\"#option-cargo-install--f\"><code>-f</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---force\"><a class=\"option-anchor\" href=\"#option-cargo-install---force\"><code>--force</code></a></dt>\n<dd class=\"option-desc\"><p>Force overwriting existing crates or binaries. This can be used if a package\nhas installed a binary with the same name as another package. This is also\nuseful if something has changed on the system that you want to rebuild with,\nsuch as a newer version of <code>rustc</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---no-track\"><a class=\"option-anchor\" href=\"#option-cargo-install---no-track\"><code>--no-track</code></a></dt>\n<dd class=\"option-desc\"><p>By default, Cargo keeps track of the installed packages with a metadata file\nstored in the installation root directory. This flag tells Cargo not to use or\ncreate that file. With this flag, Cargo will refuse to overwrite any existing\nfiles unless the <code>--force</code> flag is used. This also disables Cargo’s ability to\nprotect against multiple concurrent invocations of Cargo installing at the\nsame time.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---bin\"><a class=\"option-anchor\" href=\"#option-cargo-install---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Install only the specified binary.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---bins\"><a class=\"option-anchor\" href=\"#option-cargo-install---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Install all binaries. This is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---example\"><a class=\"option-anchor\" href=\"#option-cargo-install---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Install only the specified example.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---examples\"><a class=\"option-anchor\" href=\"#option-cargo-install---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Install all examples.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---root\"><a class=\"option-anchor\" href=\"#option-cargo-install---root\"><code>--root</code> <em>dir</em></a></dt>\n<dd class=\"option-desc\"><p>Directory to install packages into.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---registry\"><a class=\"option-anchor\" href=\"#option-cargo-install---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---index\"><a class=\"option-anchor\" href=\"#option-cargo-install---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install--F\"><a class=\"option-anchor\" href=\"#option-cargo-install--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---features\"><a class=\"option-anchor\" href=\"#option-cargo-install---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-install---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-install---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install---target\"><a class=\"option-anchor\" href=\"#option-cargo-install---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Install for the specified target architecture. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-install---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to a new temporary folder located in the\ntemporary directory of the platform.</p>\n<p>When using <code>--path</code>, by default it will use <code>target</code> directory in the workspace\nof the local crate unless <code>--target-dir</code>\nis specified.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---debug\"><a class=\"option-anchor\" href=\"#option-cargo-install---debug\"><code>--debug</code></a></dt>\n<dd class=\"option-desc\"><p>Build with the <code>debug</code> profile instead of the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---profile\"><a class=\"option-anchor\" href=\"#option-cargo-install---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Install with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---timings\"><a class=\"option-anchor\" href=\"#option-cargo-install---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-install---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---locked\"><a class=\"option-anchor\" href=\"#option-cargo-install---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---offline\"><a class=\"option-anchor\" href=\"#option-cargo-install---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-install---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install--j\"><a class=\"option-anchor\" href=\"#option-cargo-install--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-install---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-install---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-install---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo install -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo install -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install--v\"><a class=\"option-anchor\" href=\"#option-cargo-install--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-install---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--q\"><a class=\"option-anchor\" href=\"#option-cargo-install--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-install---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---color\"><a class=\"option-anchor\" href=\"#option-cargo-install---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-install---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-install-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---config\"><a class=\"option-anchor\" href=\"#option-cargo-install---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--C\"><a class=\"option-anchor\" href=\"#option-cargo-install--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--h\"><a class=\"option-anchor\" href=\"#option-cargo-install--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---help\"><a class=\"option-anchor\" href=\"#option-cargo-install---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--Z\"><a class=\"option-anchor\" href=\"#option-cargo-install--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Install or upgrade a package from crates.io:\n\n       cargo install ripgrep\n\n2. Install or reinstall the package in the current directory:\n\n       cargo install --path .\n\n3. View the list of installed packages:\n\n       cargo install --list\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-uninstall(1)](cargo-uninstall.html), [cargo-search(1)](cargo-search.html), [cargo-publish(1)](cargo-publish.html)\n","isInternal":false,"tokens":6264,"sizeBytes":24508},{"name":"cargo-locate-project.md","path":"doc/book/src/commands/cargo-locate-project.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-locate-project.md","title":"Command: /cargo-locate-project","category":"command-prompt","format":"markdown","content":"# cargo-locate-project(1)\n\n## NAME\n\ncargo-locate-project --- Print a JSON representation of a Cargo.toml file's location\n\n## SYNOPSIS\n\n`cargo locate-project` [_options_]\n\n## DESCRIPTION\n\nThis command will print a JSON object to stdout with the full path to the manifest. The\nmanifest is found by searching upward for a file named `Cargo.toml` starting from the current\nworking directory.\n\nIf the project happens to be a part of a workspace, the manifest of the project, rather than\nthe workspace root, is output. This can be overridden by the `--workspace` flag. The root\nworkspace is found by traversing further upward or by using the field `package.workspace` after\nlocating the manifest of a workspace member.\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Locate the <code>Cargo.toml</code> at the root of the workspace, as opposed to the current\nworkspace member.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The representation in which to print the project location. Valid values:</p>\n<ul>\n<li><code>json</code> (default): JSON object with the path under the key “root”.</li>\n<li><code>plain</code>: Just the path.</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--v\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--q\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---color\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---config\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--C\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--h\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---help\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--Z\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the path to the manifest based on the current directory:\n\n       cargo locate-project\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-metadata(1)](cargo-metadata.html)\n","isInternal":false,"tokens":1802,"sizeBytes":6826},{"name":"cargo-login.md","path":"doc/book/src/commands/cargo-login.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-login.md","title":"Command: /cargo-login","category":"command-prompt","format":"markdown","content":"# cargo-login(1)\n\n## NAME\n\ncargo-login --- Log in to a registry\n\n## SYNOPSIS\n\n`cargo login` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThis command will run a credential provider to save a token so that commands\nthat require authentication, such as [cargo-publish(1)](cargo-publish.html), will be\nautomatically authenticated.\n\nAll the arguments following the two dashes (`--`) are passed to the credential provider.\n\nFor the default `cargo:token` credential provider, the token is saved\nin `$CARGO_HOME/credentials.toml`. `CARGO_HOME` defaults to `.cargo`\nin your home directory.\n\nIf a registry has a credential-provider specified, it will be used. Otherwise,\nthe providers from the config value `registry.global-credential-providers` will\nbe attempted, starting from the end of the list.\n\nThe _token_ will be read from stdin.\n\nThe API token for crates.io may be retrieved from <https://crates.io/me>.\n\nTake care to keep the token secret, it should not be shared with anyone else.\n\n## OPTIONS\n\n### Login Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-login---registry\"><a class=\"option-anchor\" href=\"#option-cargo-login---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-login--v\"><a class=\"option-anchor\" href=\"#option-cargo-login--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-login---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--q\"><a class=\"option-anchor\" href=\"#option-cargo-login--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-login---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login---color\"><a class=\"option-anchor\" href=\"#option-cargo-login---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-login-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-login-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login---config\"><a class=\"option-anchor\" href=\"#option-cargo-login---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--C\"><a class=\"option-anchor\" href=\"#option-cargo-login--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--h\"><a class=\"option-anchor\" href=\"#option-cargo-login--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---help\"><a class=\"option-anchor\" href=\"#option-cargo-login---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--Z\"><a class=\"option-anchor\" href=\"#option-cargo-login--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Save the token for the default registry:\n\n       cargo login\n\n2. Save the token for a specific registry:\n\n       cargo login --registry my-registry\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-logout(1)](cargo-logout.html), [cargo-publish(1)](cargo-publish.html)\n","isInternal":false,"tokens":1653,"sizeBytes":6272},{"name":"cargo-logout.md","path":"doc/book/src/commands/cargo-logout.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-logout.md","title":"Command: /cargo-logout","category":"command-prompt","format":"markdown","content":"# cargo-logout(1)\n\n## NAME\n\ncargo-logout --- Remove an API token from the registry locally\n\n## SYNOPSIS\n\n`cargo logout` [_options_]\n\n## DESCRIPTION\n\nThis command will run a credential provider to remove a saved token.\n\nFor the default `cargo:token` credential provider, credentials are stored\nin `$CARGO_HOME/credentials.toml` where `$CARGO_HOME` defaults to `.cargo`\nin your home directory.\n\nIf a registry has a credential-provider specified, it will be used. Otherwise,\nthe providers from the config value `registry.global-credential-providers` will\nbe attempted, starting from the end of the list.\n\nIf `--registry` is not specified, then the credentials for the default\nregistry will be removed (configured by\n[`registry.default`](../reference/config.html#registrydefault), which defaults\nto <https://crates.io/>).\n\nThis will not revoke the token on the server. If you need to revoke the token,\nvisit the registry website and follow its instructions (see\n<https://crates.io/me> to revoke the token for <https://crates.io/>).\n\n## OPTIONS\n\n### Logout Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-logout---registry\"><a class=\"option-anchor\" href=\"#option-cargo-logout---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-logout--v\"><a class=\"option-anchor\" href=\"#option-cargo-logout--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-logout---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--q\"><a class=\"option-anchor\" href=\"#option-cargo-logout--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-logout---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout---color\"><a class=\"option-anchor\" href=\"#option-cargo-logout---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-logout-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-logout-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout---config\"><a class=\"option-anchor\" href=\"#option-cargo-logout---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--C\"><a class=\"option-anchor\" href=\"#option-cargo-logout--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--h\"><a class=\"option-anchor\" href=\"#option-cargo-logout--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---help\"><a class=\"option-anchor\" href=\"#option-cargo-logout---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--Z\"><a class=\"option-anchor\" href=\"#option-cargo-logout--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove the default registry token:\n\n       cargo logout\n\n2. Remove the token for a specific registry:\n\n       cargo logout --registry my-registry\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html)\n","isInternal":false,"tokens":1671,"sizeBytes":6300},{"name":"cargo-metadata.md","path":"doc/book/src/commands/cargo-metadata.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-metadata.md","title":"Command: /cargo-metadata","category":"command-prompt","format":"markdown","content":"# cargo-metadata(1)\n\n## NAME\n\ncargo-metadata --- Machine-readable metadata about the current package\n\n## SYNOPSIS\n\n`cargo metadata` [_options_]\n\n## DESCRIPTION\n\nOutput JSON to stdout containing information about the workspace members and\nresolved dependencies of the current package.\n\nThe output format is subject to change in future versions of Cargo. It\nis recommended to include the `--format-version` flag to future-proof your code\nand ensure the output is in the format you are expecting. For more on the\nexpectations, see [\"Compatibility\"](#compatibility).\n\nSee the [cargo_metadata crate](https://crates.io/crates/cargo_metadata)\nfor a Rust API for reading the metadata.\n\n## OUTPUT FORMAT\n\n### Compatibility\n\nWithin the same output format version, the compatibility is maintained, except\nsome scenarios. The following is a non-exhaustive list of changes that are not\nconsidered as incompatible:\n\n* **Adding new fields** — New fields will be added when needed. Reserving this\n  helps Cargo evolve without bumping the format version too often.\n* **Adding new values for enum-like fields** — Same as adding new fields. It\n  keeps metadata evolving without stagnation.\n* **Changing opaque representations** — The inner representations of some\n  fields are implementation details. For example, fields related to\n  \"Source ID\" are treated as opaque identifiers to differentiate packages or\n  sources. Consumers shouldn't rely on those representations unless specified.\n\n### JSON format\n\nThe JSON output has the following format:\n\n```javascript\n{\n    /* Array of all packages in the workspace.\n       It also includes all feature-enabled dependencies unless --no-deps is used.\n    */\n    \"packages\": [\n        {\n            /* The name of the package. */\n            \"name\": \"my-package\",\n            /* The version of the package. */\n            \"version\": \"0.1.0\",\n            /* The Package ID for referring to the\n               package within the document and as the `--package` argument to many commands\n            */\n            \"id\": \"file:///path/to/my-package#0.1.0\",\n            /* The license value from the manifest, or null. */\n            \"license\": \"MIT/Apache-2.0\",\n            /* The license-file value from the manifest, or null. */\n            \"license_file\": \"LICENSE\",\n            /* The description value from the manifest, or null. */\n            \"description\": \"Package description.\",\n            /* The source ID of the package, an \"opaque\" identifier representing\n               where a package is retrieved from. See \"Compatibility\" above for\n               the stability guarantee.\n\n               This is null for path dependencies and workspace members.\n\n               For other dependencies, it is a string with the format:\n               - \"registry+URL\" for registry-based dependencies.\n                 Example: \"registry+https://github.com/rust-lang/crates.io-index\"\n               - \"git+URL\" for git-based dependencies.\n                 Example: \"git+https://github.com/rust-lang/cargo?rev=5e85ba14aaa20f8133863373404cb0af69eeef2c#5e85ba14aaa20f8133863373404cb0af69eeef2c\"\n               - \"sparse+URL\" for dependencies from a sparse registry\n                 Example: \"sparse+https://my-sparse-registry.org\"\n\n               The value after the `+` is not explicitly defined, and may change\n               between versions of Cargo and may not directly correlate to other\n               things, such as registry definitions in a config file. New source\n               kinds may be added in the future which will have different `+`\n               prefixed identifiers.\n            */\n            \"source\": null,\n            /* Array of dependencies declared in the package's manifest. */\n            \"dependencies\": [\n                {\n                    /* The name of the dependency. */\n                    \"name\": \"bitflags\",\n                    /* The source ID of the dependency. May be null, see\n                       description for the package source.\n                    */\n                    \"source\": \"registry+https://github.com/rust-lang/crates.io-index\",\n                    /* The version requirement for the dependency.\n                       Dependencies without a version requirement have a value of \"*\".\n                    */\n                    \"req\": \"^1.0\",\n                    /* The dependency kind.\n                       \"dev\", \"build\", or null for a normal dependency.\n                    */\n                    \"kind\": null,\n                    /* If the dependency is renamed, this is the new name for\n                       the dependency as a string.  null if it is not renamed.\n                    */\n                    \"rename\": null,\n                    /* Boolean of whether or not this is an optional dependency. */\n                    \"optional\": false,\n                    /* Boolean of whether or not default features are enabled. */\n                    \"uses_default_features\": true,\n                    /* Array of features enabled. */\n                    \"features\": [],\n                    /* The target platform for the dependency.\n                       null if not a target dependency.\n                    */\n                    \"target\": \"cfg(windows)\",\n                    /* The file system path for a local path dependency.\n                       not present if not a path dependency.\n                    */\n                    \"path\": \"/path/to/dep\",\n                    /* A string of the URL of the registry this dependency is from.\n                       If not specified or null, the dependency is from the default\n                       registry (crates.io).\n                    */\n                    \"registry\": null,\n                    /* (unstable) Boolean flag of whether or not this is a pulbic\n                       dependency. This field is only present when\n                       `-Zpublic-dependency` is enabled.\n                    */\n                    \"public\": false\n                }\n            ],\n            /* Array of Cargo targets. */\n            \"targets\": [\n                {\n                    /* Array of target kinds.\n                       - lib targets list the `crate-type` values from the\n                         manifest such as \"lib\", \"rlib\", \"dylib\",\n                         \"proc-macro\", etc. (default [\"lib\"])\n                       - binary is [\"bin\"]\n                       - example is [\"example\"]\n                       - integration test is [\"test\"]\n                       - benchmark is [\"bench\"]\n                       - build script is [\"custom-build\"]\n                    */\n                    \"kind\": [\n                        \"bin\"\n                    ],\n                    /* Array of crate types.\n                       - lib and example libraries list the `crate-type` values\n                         from the manifest such as \"lib\", \"rlib\", \"dylib\",\n                         \"proc-macro\", etc. (default [\"lib\"])\n                       - all other target kinds are [\"bin\"]\n                    */\n                    \"crate_types\": [\n                        \"bin\"\n                    ],\n                    /* The name of the target.\n                       For lib targets, dashes will be replaced with underscores.\n                    */\n                    \"name\": \"my-package\",\n                    /* Absolute path to the root source file of the target. */\n                    \"src_path\": \"/path/to/my-package/src/main.rs\",\n                    /* The Rust edition of the target.\n                       Defaults to the package edition.\n                    */\n                    \"edition\": \"2018\",\n                    /* Array of required features.\n                       This property is not included if no required features are set.\n                    */\n                    \"required-features\": [\"feat1\"],\n                    /* Whether the target should be documented by `cargo doc`. */\n                    \"doc\": true,\n                    /* Whether or not this target has doc tests enabled, and\n                       the target is compatible with doc testing.\n                    */\n                    \"doctest\": false,\n                    /* Whether or not this target should be built and run with `--test`\n                    */\n                    \"test\": true\n                }\n            ],\n            /* Set of features defined for the package.\n               Each feature maps to an array of features or dependencies it\n               enables.\n            */\n            \"features\": {\n                \"default\": [\n                    \"feat1\"\n                ],\n                \"feat1\": [],\n                \"feat2\": []\n            },\n            /* Absolute path to this package's manifest. */\n            \"manifest_path\": \"/path/to/my-package/Cargo.toml\",\n            /* Package metadata.\n               This is null if no metadata is specified.\n            */\n            \"metadata\": {\n                \"docs\": {\n                    \"rs\": {\n                        \"all-features\": true\n                    }\n                }\n            },\n            /* List of registries to which this package may be published.\n               Publishing is unrestricted if null, and forbidden if an empty array. */\n            \"publish\": [\n                \"crates-io\"\n            ],\n            /* Array of authors from the manifest.\n               Empty array if no authors specified.\n            */\n            \"authors\": [\n                \"Jane Doe <user@example.com>\"\n            ],\n            /* Array of categories from the manifest. */\n            \"categories\": [\n                \"command-line-utilities\"\n            ],\n            /* Optional string that is the default binary picked by cargo run. */\n            \"default_run\": null,\n            /* Optional string that is the minimum supported rust version */\n            \"rust_version\": \"1.56\",\n            /* Array of keywords from the manifest. */\n            \"keywords\": [\n                \"cli\"\n            ],\n            /* The readme value from the manifest or null if not specified. */\n            \"readme\": \"README.md\",\n            /* The repository value from the manifest or null if not specified. */\n            \"repository\": \"https://github.com/rust-lang/cargo\",\n            /* The homepage value from the manifest or null if not specified. */\n            \"homepage\": \"https://rust-lang.org\",\n            /* The documentation value from the manifest or null if not specified. */\n            \"documentation\": \"https://doc.rust-lang.org/stable/std\",\n            /* The default edition of the package.\n               Note that individual targets may have different editions.\n            */\n            \"edition\": \"2018\",\n            /* Optional string that is the name of a native library the package\n               is linking to.\n            */\n            \"links\": null,\n        }\n    ],\n    /* Array of members of the workspace.\n       Each entry is the Package ID for the package.\n    */\n    \"workspace_members\": [\n        \"file:///path/to/my-package#0.1.0\",\n    ],\n    /* Array of default members of the workspace.\n       Each entry is the Package ID for the package.\n    */\n    \"workspace_default_members\": [\n        \"file:///path/to/my-package#0.1.0\",\n    ],\n    // The resolved dependency graph for the entire workspace. The enabled\n    // features are based on the enabled features for the \"current\" package.\n    // Inactivated optional dependencies are not listed.\n    //\n    // This is null if --no-deps is specified.\n    //\n    // By default, this includes all dependencies for all target platforms.\n    // The `--filter-platform` flag may be used to narrow to a specific\n    // target tuple.\n    \"resolve\": {\n        /* Array of nodes within the dependency graph.\n           Each node is a package.\n        */\n        \"nodes\": [\n            {\n                /* The Package ID of this node. */\n                \"id\": \"file:///path/to/my-package#0.1.0\",\n                /* The dependencies of this package, an array of Package IDs. */\n                \"dependencies\": [\n                    \"https://github.com/rust-lang/crates.io-index#bitflags@1.0.4\"\n                ],\n                /* The dependencies of this package. This is an alternative to\n                   \"dependencies\" which contains additional information. In\n                   particular, this handles renamed dependencies.\n                */\n                \"deps\": [\n                    {\n                        /* The name of the dependency's library target.\n                           If this is a renamed dependency, this is the new\n                           name.\n                        */\n                        \"name\": \"bitflags\",\n                        /* The Package ID of the dependency. */\n                        \"pkg\": \"https://github.com/rust-lang/crates.io-index#bitflags@1.0.4\"\n                        /* Array of dependency kinds. Added in Cargo 1.40. */\n                        \"dep_kinds\": [\n                            {\n                                /* The dependency kind.\n                                   \"dev\", \"build\", or null for a normal dependency.\n                                */\n                                \"kind\": null,\n                                /* The target platform for the dependency.\n                                   null if not a target dependency.\n                                */\n                                \"target\": \"cfg(windows)\"\n                            }\n                        ]\n                    }\n                ],\n                /* Array of features enabled on this package. */\n                \"features\": [\n                    \"default\"\n                ]\n            }\n        ],\n        /* The package in the current working directory (if --manifest-path is not given).\n           This is null if there is a virtual workspace. Otherwise it is\n           the Package ID of the package.\n        */\n        \"root\": \"file:///path/to/my-package#0.1.0\",\n    },\n    /* The absolute path to the target directory where Cargo places its output. */\n    \"target_directory\": \"/path/to/my-package/target\",\n    /* The absolute path to the build directory where Cargo places intermediate build artifacts. (unstable) */\n    \"build_directory\": \"/path/to/my-package/build-dir\",\n    /* The version of the schema for this metadata structure.\n       This will be changed if incompatible changes are ever made.\n    */\n    \"version\": 1,\n    /* The absolute path to the root of the workspace. */\n    \"workspace_root\": \"/path/to/my-package\"\n    /* Workspace metadata.\n       This is null if no metadata is specified. */\n    \"metadata\": {\n        \"docs\": {\n            \"rs\": {\n                \"all-features\": true\n            }\n        }\n    }\n}\n````\n\nNotes:\n- For `\"id\"` field syntax, see [Package ID Specifications] in the reference.\n\n## OPTIONS\n\n### Output Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---no-deps\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---no-deps\"><code>--no-deps</code></a></dt>\n<dd class=\"option-desc\"><p>Output information only about the workspace members and don’t fetch\ndependencies.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---format-version\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---format-version\"><code>--format-version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the version of the output format to use. Currently <code>1</code> is the only\npossible value.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---filter-platform\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---filter-platform\"><code>--filter-platform</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>This filters the <code>resolve</code> output to only include dependencies for the\ngiven <a href=\"../appendix/glossary.html#target\">target tuple</a>.\nA literal <code>\"host-tuple\"</code> can be used, which will internally be substituted by the host’s target.\nWithout this flag, the resolve includes all targets.</p>\n<p>Note that the dependencies listed in the “packages” array still includes all\ndependencies. Each package definition is intended to be an unaltered\nreproduction of the information within <code>Cargo.toml</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--F\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-metadata--v\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--q\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---color\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-metadata---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---locked\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---offline\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-metadata-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---config\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--C\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--h\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---help\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--Z\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Output JSON about the current package:\n\n       cargo metadata --format-version=1\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-pkgid(1)](cargo-pkgid.html), [Package ID Specifications], [JSON messages]\n\n[Package ID Specifications]: ../reference/pkgid-spec.html\n[JSON messages]: ../reference/external-tools.html#json-messages\n","isInternal":false,"tokens":5366,"sizeBytes":24989},{"name":"cargo-miri.md","path":"doc/book/src/commands/cargo-miri.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-miri.md","title":"Command: /cargo-miri","category":"command-prompt","format":"markdown","content":"# cargo-miri(1)\n\n## NAME\n\ncargo-miri --- Runs binary crates and tests in Miri\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nThis command is only available on the [nightly](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) channel.\n\nFor information about usage and installation,\nsee <https://github.com/rust-lang/miri>.\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-run(1)](cargo-run.md),\n[cargo-test(1)](cargo-test.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n","isInternal":false,"tokens":157,"sizeBytes":632},{"name":"cargo-new.md","path":"doc/book/src/commands/cargo-new.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-new.md","title":"Command: /cargo-new","category":"command-prompt","format":"markdown","content":"# cargo-new(1)\n\n## NAME\n\ncargo-new --- Create a new Cargo package\n\n## SYNOPSIS\n\n`cargo new` [_options_] _path_\n\n## DESCRIPTION\n\nThis command will create a new Cargo package in the given directory. This\nincludes a simple template with a `Cargo.toml` manifest, sample source file,\nand a VCS ignore file. If the directory is not already in a VCS repository,\nthen a new repository is created (see `--vcs` below).\n\nSee [cargo-init(1)](cargo-init.html) for a similar command which will create a new manifest\nin an existing directory.\n\n## OPTIONS\n\n### New Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-new---bin\"><a class=\"option-anchor\" href=\"#option-cargo-new---bin\"><code>--bin</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a binary target (<code>src/main.rs</code>).\nThis is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---lib\"><a class=\"option-anchor\" href=\"#option-cargo-new---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a library target (<code>src/lib.rs</code>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---edition\"><a class=\"option-anchor\" href=\"#option-cargo-new---edition\"><code>--edition</code> <em>edition</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the Rust edition to use. Default is 2024.\nPossible values: 2015, 2018, 2021, 2024</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---name\"><a class=\"option-anchor\" href=\"#option-cargo-new---name\"><code>--name</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Set the package name. Defaults to the directory name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---vcs\"><a class=\"option-anchor\" href=\"#option-cargo-new---vcs\"><code>--vcs</code> <em>vcs</em></a></dt>\n<dd class=\"option-desc\"><p>Initialize a new VCS repository for the given version control system (git,\nhg, pijul, or fossil) or do not initialize any version control at all\n(none). If not specified, defaults to <code>git</code> or the configuration value\n<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---registry\"><a class=\"option-anchor\" href=\"#option-cargo-new---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name\nwhich will restrict publishing only to that registry.</p>\n<p>Registry names are defined in <a href=\"../reference/config.html\">Cargo config files</a>.\nIf not specified, the default registry defined by the <code>registry.default</code>\nconfig key is used. If the default registry is not set and <code>--registry</code> is not\nused, the <code>publish</code> field will not be set which means that publishing will not\nbe restricted.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-new--v\"><a class=\"option-anchor\" href=\"#option-cargo-new--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-new---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--q\"><a class=\"option-anchor\" href=\"#option-cargo-new--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-new---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---color\"><a class=\"option-anchor\" href=\"#option-cargo-new---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-new-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-new-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---config\"><a class=\"option-anchor\" href=\"#option-cargo-new---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--C\"><a class=\"option-anchor\" href=\"#option-cargo-new--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--h\"><a class=\"option-anchor\" href=\"#option-cargo-new--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---help\"><a class=\"option-anchor\" href=\"#option-cargo-new---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--Z\"><a class=\"option-anchor\" href=\"#option-cargo-new--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a binary Cargo package in the given directory:\n\n       cargo new foo\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-init(1)](cargo-init.html)\n","isInternal":false,"tokens":2042,"sizeBytes":7458},{"name":"cargo-owner.md","path":"doc/book/src/commands/cargo-owner.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-owner.md","title":"Command: /cargo-owner","category":"command-prompt","format":"markdown","content":"# cargo-owner(1)\n\n## NAME\n\ncargo-owner --- Manage the owners of a crate on the registry\n\n## SYNOPSIS\n\n`cargo owner` [_options_] `--add` _login_ [_crate_]\\\n`cargo owner` [_options_] `--remove` _login_ [_crate_]\\\n`cargo owner` [_options_] `--list` [_crate_]\n\n## DESCRIPTION\n\nThis command will modify the owners for a crate on the registry. Owners of a\ncrate can upload new versions and yank old versions. Non-team owners can also\nmodify the set of owners, so take care!\n\nThis command requires you to be authenticated with either the `--token` option\nor using [cargo-login(1)](cargo-login.html).\n\nIf the crate name is not specified, it will use the package name from the\ncurrent directory.\n\nSee [the reference](../reference/publishing.html#cargo-owner) for more\ninformation about owners and publishing.\n\n## OPTIONS\n\n### Owner Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-owner--a\"><a class=\"option-anchor\" href=\"#option-cargo-owner--a\"><code>-a</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---add\"><a class=\"option-anchor\" href=\"#option-cargo-owner---add\"><code>--add</code> <em>login</em>…</a></dt>\n<dd class=\"option-desc\"><p>Invite the given user or team as an owner.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--r\"><a class=\"option-anchor\" href=\"#option-cargo-owner--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---remove\"><a class=\"option-anchor\" href=\"#option-cargo-owner---remove\"><code>--remove</code> <em>login</em>…</a></dt>\n<dd class=\"option-desc\"><p>Remove the given user or team as an owner.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--l\"><a class=\"option-anchor\" href=\"#option-cargo-owner--l\"><code>-l</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---list\"><a class=\"option-anchor\" href=\"#option-cargo-owner---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List owners of a crate.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---token\"><a class=\"option-anchor\" href=\"#option-cargo-owner---token\"><code>--token</code> <em>token</em></a></dt>\n<dd class=\"option-desc\"><p>API token to use when authenticating. This overrides the token stored in\nthe credentials file (which is created by <a href=\"cargo-login.html\">cargo-login(1)</a>).</p>\n<p><a href=\"../reference/config.html\">Cargo config</a> environment variables can be\nused to override the tokens stored in the credentials file. The token for\ncrates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment\nvariable. Tokens for other registries may be specified with environment\nvariables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name\nof the registry in all capital letters.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---index\"><a class=\"option-anchor\" href=\"#option-cargo-owner---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---registry\"><a class=\"option-anchor\" href=\"#option-cargo-owner---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-owner--v\"><a class=\"option-anchor\" href=\"#option-cargo-owner--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-owner---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--q\"><a class=\"option-anchor\" href=\"#option-cargo-owner--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-owner---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---color\"><a class=\"option-anchor\" href=\"#option-cargo-owner---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-owner-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-owner-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---config\"><a class=\"option-anchor\" href=\"#option-cargo-owner---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--C\"><a class=\"option-anchor\" href=\"#option-cargo-owner--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--h\"><a class=\"option-anchor\" href=\"#option-cargo-owner--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---help\"><a class=\"option-anchor\" href=\"#option-cargo-owner---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--Z\"><a class=\"option-anchor\" href=\"#option-cargo-owner--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. List owners of a package:\n\n       cargo owner --list foo\n\n2. Invite an owner to a package:\n\n       cargo owner --add username foo\n\n3. Remove an owner from a package:\n\n       cargo owner --remove username foo\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html), [cargo-publish(1)](cargo-publish.html)\n","isInternal":false,"tokens":2241,"sizeBytes":8295},{"name":"cargo-package.md","path":"doc/book/src/commands/cargo-package.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-package.md","title":"Command: /cargo-package","category":"command-prompt","format":"markdown","content":"# cargo-package(1)\n## NAME\n\ncargo-package --- Assemble the local package into a distributable tarball\n\n## SYNOPSIS\n\n`cargo package` [_options_]\n\n## DESCRIPTION\n\nThis command will create a distributable, compressed `.crate` file with the\nsource code of the package in the current directory. The resulting file will be\nstored in the `target/package` directory. This performs the following steps:\n\n1. Load and check the current workspace, performing some basic checks.\n    - Path dependencies are not allowed unless they have a version key. Cargo\n      will ignore the path key for dependencies in published packages.\n      `dev-dependencies` do not have this restriction.\n2. Create the compressed `.crate` file.\n    - The original `Cargo.toml` file is rewritten and normalized.\n    - `[patch]`, `[replace]`, and `[workspace]` sections are removed from the\n      manifest.\n    - `Cargo.lock` is always included. When missing, a new lock file will be\n      generated unless the `--exclude-lockfile` flag is used. [cargo-install(1)](cargo-install.html)\n      will use the packaged lock file if the `--locked` flag is used.\n    - A `.cargo_vcs_info.json` file is included that contains information\n      about the current VCS checkout hash if available, as well as a flag if the\n      worktree is dirty.\n    - Symlinks are flattened to their target files.\n    - Files and directories are included or excluded based on rules mentioned in\n      [the `[include]` and `[exclude]` fields](../reference/manifest.html#the-exclude-and-include-fields).\n\n3. Extract the `.crate` file and build it to verify it can build.\n    - This will rebuild your package from scratch to ensure that it can be\n      built from a pristine state. The `--no-verify` flag can be used to skip\n      this step.\n4. Check that build scripts did not modify any source files.\n\nThe list of files included can be controlled with the `include` and `exclude`\nfields in the manifest.\n\nSee [the reference](../reference/publishing.html) for more details about\npackaging and publishing.\n\n### .cargo_vcs_info.json format\n\nWill generate a `.cargo_vcs_info.json` in the following format\n\n```javascript\n{\n \"git\": {\n   \"sha1\": \"aac20b6e7e543e6dd4118b246c77225e3a3a1302\",\n   \"dirty\": true\n },\n \"path_in_vcs\": \"\"\n}\n```\n\n`dirty` indicates that the Git worktree was dirty when the package\nwas built.\n\n`path_in_vcs` will be set to a repo-relative path for packages\nin subdirectories of the version control repository.\n\nThe compatibility of this file is maintained under the same policy\nas the JSON output of [cargo-metadata(1)](cargo-metadata.html).\n\nNote that this file provides a best-effort snapshot of the VCS information.\nHowever, the provenance of the package is not verified.\nThere is no guarantee that the source code in the tarball matches the VCS information.\n\n## OPTIONS\n\n### Package Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--l\"><a class=\"option-anchor\" href=\"#option-cargo-package--l\"><code>-l</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---list\"><a class=\"option-anchor\" href=\"#option-cargo-package---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>Print files included in a package without making one.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-verify\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-verify\"><code>--no-verify</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t verify the contents by building them.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-metadata\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-metadata\"><code>--no-metadata</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore warnings about a lack of human-usable metadata (such as the description\nor the license).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-package---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Allow working directories with uncommitted VCS changes to be packaged.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---exclude-lockfile\"><a class=\"option-anchor\" href=\"#option-cargo-package---exclude-lockfile\"><code>--exclude-lockfile</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t include the lock file when packaging.</p>\n<p>This flag is not for general use.\nSome tools may expect a lock file to be present (e.g. <code>cargo install --locked</code>).\nConsider other options before using this.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---index\"><a class=\"option-anchor\" href=\"#option-cargo-package---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---registry\"><a class=\"option-anchor\" href=\"#option-cargo-package---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to package for; see <code>cargo publish --help</code> for more details\nabout configuration of registry names. The packages will not be published\nto this registry, but if we are packaging multiple inter-dependent crates,\nlock-files will be generated under the assumption that dependencies will be\npublished to this registry.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-package---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>Specifies the output message format.\nCurrently, it only works with <code>--list</code> and affects the file listing format.\nThis is unstable and requires <code>-Zunstable-options</code>.\nValid output formats:</p>\n<ul>\n<li><code>human</code> (default): Display in a file-per-line format.</li>\n<li><code>json</code>: Emit machine-readable JSON information about each package.\nOne package per JSON line (Newline delimited JSON).\n<pre><code class=\"language-javascript\">{\n  /* The Package ID Spec of the package. */\n  \"id\": \"path+file:///home/foo#0.0.0\",\n  /* Files of this package */\n  \"files\" {\n    /* Relative path in the archive file. */\n    \"Cargo.toml.orig\": {\n      /* Where the file is from.\n         - \"generate\" for file being generated during packaging\n         - \"copy\" for file being copied from another location.\n      */\n      \"kind\": \"copy\",\n      /* For the \"copy\" kind,\n         it is an absolute path to the actual file content.\n         For the \"generate\" kind,\n         it is the original file the generated one is based on.\n      */\n      \"path\": \"/home/foo/Cargo.toml\"\n    },\n    \"Cargo.toml\": {\n      \"kind\": \"generate\",\n      \"path\": \"/home/foo/Cargo.toml\"\n    },\n    \"src/main.rs\": {\n      \"kind\": \"copy\",\n      \"path\": \"/home/foo/src/main.rs\"\n    }\n  }\n}\n</code></pre>\n</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--p\"><a class=\"option-anchor\" href=\"#option-cargo-package--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---package\"><a class=\"option-anchor\" href=\"#option-cargo-package---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-package---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Package all members in the workspace.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-package---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package---target\"><a class=\"option-anchor\" href=\"#option-cargo-package---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Package for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-package---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--F\"><a class=\"option-anchor\" href=\"#option-cargo-package--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---features\"><a class=\"option-anchor\" href=\"#option-cargo-package---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-package---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-package---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---locked\"><a class=\"option-anchor\" href=\"#option-cargo-package---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---offline\"><a class=\"option-anchor\" href=\"#option-cargo-package---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-package---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-package--j\"><a class=\"option-anchor\" href=\"#option-cargo-package--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-package---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-package---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-package---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo package -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo package -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-package--v\"><a class=\"option-anchor\" href=\"#option-cargo-package--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-package---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--q\"><a class=\"option-anchor\" href=\"#option-cargo-package--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-package---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---color\"><a class=\"option-anchor\" href=\"#option-cargo-package---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-package-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---config\"><a class=\"option-anchor\" href=\"#option-cargo-package---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--C\"><a class=\"option-anchor\" href=\"#option-cargo-package--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--h\"><a class=\"option-anchor\" href=\"#option-cargo-package--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---help\"><a class=\"option-anchor\" href=\"#option-cargo-package---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--Z\"><a class=\"option-anchor\" href=\"#option-cargo-package--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a compressed `.crate` file of the current package:\n\n       cargo package\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-publish(1)](cargo-publish.html)\n","isInternal":false,"tokens":5346,"sizeBytes":21049},{"name":"cargo-pkgid.md","path":"doc/book/src/commands/cargo-pkgid.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-pkgid.md","title":"Command: /cargo-pkgid","category":"command-prompt","format":"markdown","content":"# cargo-pkgid(1)\n\n## NAME\n\ncargo-pkgid --- Print a fully qualified package specification\n\n## SYNOPSIS\n\n`cargo pkgid` [_options_] [_spec_]\n\n## DESCRIPTION\n\nGiven a _spec_ argument, print out the fully qualified package ID specifier\nfor a package or dependency in the current workspace. This command will\ngenerate an error if _spec_ is ambiguous as to which package it refers to in\nthe dependency graph. If no _spec_ is given, then the specifier for the local\npackage is printed.\n\nThis command requires that a lockfile is available and dependencies have been\nfetched.\n\nA package specifier consists of a name, version, and source URL. You are\nallowed to use partial specifiers to succinctly match a specific package as\nlong as it matches only one package. This specifier is also used by other parts\nin Cargo, such as [cargo-metadata(1)](cargo-metadata.html) and [JSON messages] emitted by Cargo.\n\nThe format of a _spec_ can be one of the following:\n\nSPEC Structure             | Example SPEC\n---------------------------|--------------\n_name_                     | `bitflags`\n_name_`@`_version_         | `bitflags@1.0.4`\n_url_                      | `https://github.com/rust-lang/cargo`\n_url_`#`_version_          | `https://github.com/rust-lang/cargo#0.33.0`\n_url_`#`_name_             | `https://github.com/rust-lang/crates.io-index#bitflags`\n_url_`#`_name_`@`_version_ | `https://github.com/rust-lang/cargo#crates-io@0.21.0`\n\nThe specification grammar can be found in chapter [Package ID Specifications].\n\n## OPTIONS\n\n### Package Selection\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--p\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---package\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Get the package ID for the given package instead of the current package.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-pkgid--v\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--q\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---color\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---locked\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---offline\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---config\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--C\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--h\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---help\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--Z\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Retrieve package specification for `foo` package:\n\n       cargo pkgid foo\n\n2. Retrieve package specification for version 1.0.0 of `foo`:\n\n       cargo pkgid foo@1.0.0\n\n3. Retrieve package specification for `foo` from crates.io:\n\n       cargo pkgid https://github.com/rust-lang/crates.io-index#foo\n\n4. Retrieve package specification for `foo` from a local package:\n\n       cargo pkgid file:///path/to/local/package#foo\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html), [cargo-metadata(1)](cargo-metadata.html),\n[Package ID Specifications], [JSON messages]\n\n[Package ID Specifications]: ../reference/pkgid-spec.html\n[JSON messages]: ../reference/external-tools.html#json-messages\n","isInternal":false,"tokens":2535,"sizeBytes":9439},{"name":"cargo-publish.md","path":"doc/book/src/commands/cargo-publish.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-publish.md","title":"Command: /cargo-publish","category":"command-prompt","format":"markdown","content":"# cargo-publish(1)\n## NAME\n\ncargo-publish --- Upload a package to the registry\n\n## SYNOPSIS\n\n`cargo publish` [_options_]\n\n## DESCRIPTION\n\nThis command will create a distributable, compressed `.crate` file with the\nsource code of the package in the current directory and upload it to a\nregistry. The default registry is <https://crates.io>. This performs the\nfollowing steps:\n\n1. Performs a few checks, including:\n   - Checks the `package.publish` key in the manifest for restrictions on\n     which registries you are allowed to publish to.\n2. Create a `.crate` file by following the steps in [cargo-package(1)](cargo-package.html).\n3. Upload the crate to the registry. The server will perform additional\n   checks on the crate. \n4. The client will poll waiting for the package to appear in the index,\n   and may timeout. In that case, you will need to check for completion\n   manually. This timeout does not affect the upload.\n\nThis command requires you to be authenticated using [cargo-login(1)](cargo-login.html)\nor environment variables of the [`registry.token`](../reference/config.html#registrytoken)\nand [`registries.<name>.token`](../reference/config.html#registriesnametoken) config fields.\n\nSee [the reference](../reference/publishing.html) for more details about\npackaging and publishing.\n\n## OPTIONS\n\n### Publish Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-publish---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Perform all checks without uploading.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---no-verify\"><a class=\"option-anchor\" href=\"#option-cargo-publish---no-verify\"><code>--no-verify</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t verify the contents by building them.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-publish---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Allow working directories with uncommitted VCS changes to be packaged.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---index\"><a class=\"option-anchor\" href=\"#option-cargo-publish---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---registry\"><a class=\"option-anchor\" href=\"#option-cargo-publish---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to publish to. Registry names are defined in <a href=\"../reference/config.html\">Cargo\nconfig files</a>. If not specified, and there is a\n<a href=\"../reference/manifest.html#the-publish-field\"><code>package.publish</code></a> field in\n<code>Cargo.toml</code> with a single registry, then it will publish to that registry.\nOtherwise it will use the default registry, which is defined by the\n<a href=\"../reference/config.html#registrydefault\"><code>registry.default</code></a> config key\nwhich defaults to <code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish--p\"><a class=\"option-anchor\" href=\"#option-cargo-publish--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---package\"><a class=\"option-anchor\" href=\"#option-cargo-publish---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Publish only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-publish---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Publish all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---all\"><a class=\"option-anchor\" href=\"#option-cargo-publish---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-publish---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---target\"><a class=\"option-anchor\" href=\"#option-cargo-publish---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Publish for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-publish---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish--F\"><a class=\"option-anchor\" href=\"#option-cargo-publish--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-publish---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---locked\"><a class=\"option-anchor\" href=\"#option-cargo-publish---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---offline\"><a class=\"option-anchor\" href=\"#option-cargo-publish---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-publish---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-publish--j\"><a class=\"option-anchor\" href=\"#option-cargo-publish--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-publish---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-publish---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo publish -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo publish -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-publish--v\"><a class=\"option-anchor\" href=\"#option-cargo-publish--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-publish---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--q\"><a class=\"option-anchor\" href=\"#option-cargo-publish--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-publish---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---color\"><a class=\"option-anchor\" href=\"#option-cargo-publish---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-publish-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---config\"><a class=\"option-anchor\" href=\"#option-cargo-publish---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--C\"><a class=\"option-anchor\" href=\"#option-cargo-publish--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--h\"><a class=\"option-anchor\" href=\"#option-cargo-publish--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---help\"><a class=\"option-anchor\" href=\"#option-cargo-publish---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--Z\"><a class=\"option-anchor\" href=\"#option-cargo-publish--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Publish the current package:\n\n       cargo publish\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-package(1)](cargo-package.html), [cargo-login(1)](cargo-login.html)\n","isInternal":false,"tokens":4478,"sizeBytes":17559},{"name":"cargo-remove.md","path":"doc/book/src/commands/cargo-remove.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-remove.md","title":"Command: /cargo-remove","category":"command-prompt","format":"markdown","content":"# cargo-remove(1)\n## NAME\n\ncargo-remove --- Remove dependencies from a Cargo.toml manifest file\n\n## SYNOPSIS\n\n`cargo remove` [_options_] _dependency_...\n\n## DESCRIPTION\n\nRemove one or more dependencies from a `Cargo.toml` manifest.\n\n## OPTIONS\n\n### Section options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove---dev\"><a class=\"option-anchor\" href=\"#option-cargo-remove---dev\"><code>--dev</code></a></dt>\n<dd class=\"option-desc\"><p>Remove as a <a href=\"../reference/specifying-dependencies.html#development-dependencies\">development dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---build\"><a class=\"option-anchor\" href=\"#option-cargo-remove---build\"><code>--build</code></a></dt>\n<dd class=\"option-desc\"><p>Remove as a <a href=\"../reference/specifying-dependencies.html#build-dependencies\">build dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---target\"><a class=\"option-anchor\" href=\"#option-cargo-remove---target\"><code>--target</code> <em>target</em></a></dt>\n<dd class=\"option-desc\"><p>Remove as a dependency to the <a href=\"../reference/specifying-dependencies.html#platform-specific-dependencies\">given target platform</a>.</p>\n<p>To avoid unexpected shell expansions, you may use quotes around each target, e.g., <code>--target 'cfg(unix)'</code>.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-remove---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t actually write to the manifest.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-remove--v\"><a class=\"option-anchor\" href=\"#option-cargo-remove--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-remove---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--q\"><a class=\"option-anchor\" href=\"#option-cargo-remove--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-remove---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---color\"><a class=\"option-anchor\" href=\"#option-cargo-remove---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-remove---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-remove---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---locked\"><a class=\"option-anchor\" href=\"#option-cargo-remove---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---offline\"><a class=\"option-anchor\" href=\"#option-cargo-remove---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-remove---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove--p\"><a class=\"option-anchor\" href=\"#option-cargo-remove--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---package\"><a class=\"option-anchor\" href=\"#option-cargo-remove---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package to remove from.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-remove-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---config\"><a class=\"option-anchor\" href=\"#option-cargo-remove---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--C\"><a class=\"option-anchor\" href=\"#option-cargo-remove--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--h\"><a class=\"option-anchor\" href=\"#option-cargo-remove--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---help\"><a class=\"option-anchor\" href=\"#option-cargo-remove---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--Z\"><a class=\"option-anchor\" href=\"#option-cargo-remove--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove `regex` as a dependency\n\n       cargo remove regex\n\n2. Remove `trybuild` as a dev-dependency\n\n       cargo remove --dev trybuild\n\n3. Remove `nom` from the `wasm32-unknown-unknown` dependencies table\n\n       cargo remove --target wasm32-unknown-unknown nom\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-add(1)](cargo-add.html)\n","isInternal":false,"tokens":2414,"sizeBytes":9128},{"name":"cargo-report-future-incompatibilities.md","path":"doc/book/src/commands/cargo-report-future-incompatibilities.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-report-future-incompatibilities.md","title":"Command: /cargo-report-future-incompatibilities","category":"command-prompt","format":"markdown","content":"# cargo-report-future-incompatibilities(1)\n## NAME\n\ncargo-report-future-incompatibilities --- Reports any crates which will eventually stop compiling\n\n## SYNOPSIS\n\n`cargo report future-incompatibilities` [_options_]\n\n## DESCRIPTION\n\nDisplays a report of future-incompatible warnings that were emitted during\nprevious builds.\nThese are warnings for changes that may become hard errors in the future,\ncausing dependencies to stop building in a future version of rustc.\n\nFor more, see the chapter on [Future incompat report](../reference/future-incompat-report.html).\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---id\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---id\"><code>--id</code> <em>id</em></a></dt>\n<dd class=\"option-desc\"><p>Show the report with the specified Cargo-generated id.\nIf not specified, shows the most recent report.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--p\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---package\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to display a report for. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--v\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--q\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---color\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---locked\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---offline\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---config\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--C\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--h\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---help\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--Z\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the latest future-incompat report:\n\n       cargo report future-incompat\n\n2. Display the latest future-incompat report for a specific package:\n\n       cargo report future-incompat --package my-dep@0.0.1\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-report(1)](cargo-report.html), [cargo-build(1)](cargo-build.html)\n","isInternal":false,"tokens":2312,"sizeBytes":9078},{"name":"cargo-report.md","path":"doc/book/src/commands/cargo-report.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-report.md","title":"Command: /cargo-report","category":"command-prompt","format":"markdown","content":"# cargo-report(1)\n\n## NAME\n\ncargo-report --- Generate and display various kinds of reports\n\n## SYNOPSIS\n\n`cargo report` _type_ [_options_]\n\n## DESCRIPTION\n\nDisplays a report of the given _type_ --- currently, only `future-incompat` is supported\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report--v\"><a class=\"option-anchor\" href=\"#option-cargo-report--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-report---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--q\"><a class=\"option-anchor\" href=\"#option-cargo-report--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-report---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---color\"><a class=\"option-anchor\" href=\"#option-cargo-report---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report---locked\"><a class=\"option-anchor\" href=\"#option-cargo-report---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---offline\"><a class=\"option-anchor\" href=\"#option-cargo-report---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-report---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-report-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---config\"><a class=\"option-anchor\" href=\"#option-cargo-report---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--C\"><a class=\"option-anchor\" href=\"#option-cargo-report--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--h\"><a class=\"option-anchor\" href=\"#option-cargo-report--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---help\"><a class=\"option-anchor\" href=\"#option-cargo-report---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--Z\"><a class=\"option-anchor\" href=\"#option-cargo-report--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the available kinds of reports:\n\n       cargo report --help\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-report-future-incompatibilities(1)](cargo-report-future-incompatibilities.html)\n","isInternal":false,"tokens":1782,"sizeBytes":6833},{"name":"cargo-run.md","path":"doc/book/src/commands/cargo-run.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-run.md","title":"Command: /cargo-run","category":"command-prompt","format":"markdown","content":"# cargo-run(1)\n## NAME\n\ncargo-run --- Run the current package\n\n## SYNOPSIS\n\n`cargo run` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nRun a binary or example of the local package.\n\nAll the arguments following the two dashes (`--`) are passed to the binary to\nrun. If you're passing arguments to both Cargo and the binary, the ones after\n`--` go to the binary, the ones before go to Cargo.\n\nUnlike [cargo-test(1)](cargo-test.html) and [cargo-bench(1)](cargo-bench.html), `cargo run` sets the \nworking directory of the binary executed to the current working directory, same \nas if it was executed in the shell directly.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--p\"><a class=\"option-anchor\" href=\"#option-cargo-run--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---package\"><a class=\"option-anchor\" href=\"#option-cargo-run---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to run. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo run` will run the binary\ntarget. If there are multiple binary targets, you must pass a target flag to\nchoose one. Or, the `default-run` field may be specified in the `[package]`\nsection of `Cargo.toml` to choose the name of the binary to run by default.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---bin\"><a class=\"option-anchor\" href=\"#option-cargo-run---bin\"><code>--bin</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run the specified binary.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---example\"><a class=\"option-anchor\" href=\"#option-cargo-run---example\"><code>--example</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run the specified example.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--F\"><a class=\"option-anchor\" href=\"#option-cargo-run--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---features\"><a class=\"option-anchor\" href=\"#option-cargo-run---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-run---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-run---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---target\"><a class=\"option-anchor\" href=\"#option-cargo-run---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Run for the specified target architecture. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--r\"><a class=\"option-anchor\" href=\"#option-cargo-run--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---release\"><a class=\"option-anchor\" href=\"#option-cargo-run---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Run optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---profile\"><a class=\"option-anchor\" href=\"#option-cargo-run---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---timings\"><a class=\"option-anchor\" href=\"#option-cargo-run---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-run---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-run---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--v\"><a class=\"option-anchor\" href=\"#option-cargo-run--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-run---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--q\"><a class=\"option-anchor\" href=\"#option-cargo-run--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-run---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---color\"><a class=\"option-anchor\" href=\"#option-cargo-run---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-run---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-run---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-run---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---locked\"><a class=\"option-anchor\" href=\"#option-cargo-run---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---offline\"><a class=\"option-anchor\" href=\"#option-cargo-run---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-run---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-run-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---config\"><a class=\"option-anchor\" href=\"#option-cargo-run---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--C\"><a class=\"option-anchor\" href=\"#option-cargo-run--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--h\"><a class=\"option-anchor\" href=\"#option-cargo-run--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---help\"><a class=\"option-anchor\" href=\"#option-cargo-run---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--Z\"><a class=\"option-anchor\" href=\"#option-cargo-run--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-run--j\"><a class=\"option-anchor\" href=\"#option-cargo-run--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-run---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-run---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-run---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo run -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo run -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package and run its main target (assuming only one binary):\n\n       cargo run\n\n2. Run an example with extra arguments:\n\n       cargo run --example exname -- --exoption exarg1 exarg2\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n","isInternal":false,"tokens":4534,"sizeBytes":17173},{"name":"cargo-rustc.md","path":"doc/book/src/commands/cargo-rustc.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-rustc.md","title":"Command: /cargo-rustc","category":"command-prompt","format":"markdown","content":"# cargo-rustc(1)\n## NAME\n\ncargo-rustc --- Compile the current package, and pass extra options to the compiler\n\n## SYNOPSIS\n\n`cargo rustc` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThe specified target for the current package (or package specified by `-p` if\nprovided) will be compiled along with all of its dependencies. The specified\n_args_ will all be passed to the final compiler invocation, not any of the\ndependencies. Note that the compiler will still unconditionally receive\narguments such as `-L`, `--extern`, and `--crate-type`, and the specified\n_args_ will simply be added to the compiler invocation.\n\nSee <https://doc.rust-lang.org/rustc/index.html> for documentation on rustc\nflags.\n\nThis command requires that only one target is being compiled when additional\narguments are provided. If more than one target is available for the current\npackage the filters of `--lib`, `--bin`, etc, must be used to select which\ntarget is compiled.\n\nTo pass flags to all compiler processes spawned by Cargo, use the `RUSTFLAGS`\n[environment variable](../reference/environment-variables.html) or the\n`build.rustflags` [config value](../reference/config.html).\n\n## OPTIONS\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--p\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---package\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to build. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo rustc` will build all\nbinary and library targets of the selected package.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to build. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will build only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Build the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Build all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---example\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Build all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---test\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---tests\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---bench\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---benches\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--F\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---features\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---target\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--r\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---release\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Build optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Build with the given profile.</p>\n<p>The <code>rustc</code> subcommand will treat the following named profiles with special behaviors:</p>\n<ul>\n<li><code>check</code> — Builds in the same way as the <a href=\"cargo-check.html\">cargo-check(1)</a> command with\nthe <code>dev</code> profile.</li>\n<li><code>test</code> — Builds in the same way as the <a href=\"cargo-test.html\">cargo-test(1)</a> command,\nenabling building in test mode which will enable tests and enable the <code>test</code>\ncfg option. See <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc\ntests</a> for more detail.</li>\n<li><code>bench</code> — Builds in the same was as the <a href=\"cargo-bench.html\">cargo-bench(1)</a> command,\nsimilar to the <code>test</code> profile.</li>\n</ul>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---crate-type\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---crate-type\"><code>--crate-type</code> <em>crate-type</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the given crate type. This flag accepts a comma-separated list of\n1 or more crate types, of which the allowed values are the same as <code>crate-type</code>\nfield in the manifest for configuring a Cargo target. See\n<a href=\"../reference/cargo-targets.html#the-crate-type-field\"><code>crate-type</code> field</a>\nfor possible values.</p>\n<p>If the manifest contains a list, and <code>--crate-type</code> is provided,\nthe command-line argument value will override what is in the manifest.</p>\n<p>This flag only works when building a <code>lib</code> or <code>example</code> library target.</p>\n</dd>\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--v\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--q\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---color\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-rustc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---config\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--C\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--h\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---help\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustc--j\"><a class=\"option-anchor\" href=\"#option-cargo-rustc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo rustc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo rustc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustc---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-rustc---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Check if your package (not including dependencies) uses unsafe code:\n\n       cargo rustc --lib -- -D unsafe-code\n\n2. Try an experimental flag on the nightly compiler, such as this which prints\n   the size of every type:\n\n       cargo rustc --lib -- -Z print-type-sizes\n\n3. Override `crate-type` field in Cargo.toml with command-line option:\n\n       cargo rustc --lib --crate-type lib,cdylib\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html), [rustc(1)](https://doc.rust-lang.org/rustc/index.html)\n","isInternal":false,"tokens":6379,"sizeBytes":23930},{"name":"cargo-rustdoc.md","path":"doc/book/src/commands/cargo-rustdoc.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-rustdoc.md","title":"Command: /cargo-rustdoc","category":"command-prompt","format":"markdown","content":"# cargo-rustdoc(1)\n## NAME\n\ncargo-rustdoc --- Build a package's documentation, using specified custom flags\n\n## SYNOPSIS\n\n`cargo rustdoc` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThe specified target for the current package (or package specified by `-p` if\nprovided) will be documented with the specified _args_ being passed to the\nfinal rustdoc invocation. Dependencies will not be documented as part of this\ncommand. Note that rustdoc will still unconditionally receive arguments such\nas `-L`, `--extern`, and `--crate-type`, and the specified _args_ will simply\nbe added to the rustdoc invocation.\n\nSee <https://doc.rust-lang.org/rustdoc/index.html> for documentation on rustdoc\nflags.\n\nThis command requires that only one target is being compiled when additional\narguments are provided. If more than one target is available for the current\npackage the filters of `--lib`, `--bin`, etc, must be used to select which\ntarget is compiled.\n\nTo pass flags to all rustdoc processes spawned by Cargo, use the\n`RUSTDOCFLAGS` [environment variable](../reference/environment-variables.html)\nor the `build.rustdocflags` [config value](../reference/config.html).\n\n## OPTIONS\n\n### Documentation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---open\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---open\"><code>--open</code></a></dt>\n<dd class=\"option-desc\"><p>Open the docs in a browser after building them. This will use your default\nbrowser unless you define another one in the <code>BROWSER</code> environment variable\nor use the <a href=\"../reference/config.html#docbrowser\"><code>doc.browser</code></a> configuration\noption.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--p\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---package\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to document. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo rustdoc` will document all\nbinary and library targets of the selected package. The binary will be skipped\nif its name is the same as the lib target. Binaries are skipped if they have\n`required-features` that are missing.\n\nPassing target selection flags will document only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Document the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Document all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---example\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Document all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---test\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---tests\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Document all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---bench\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---benches\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Document all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Document all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--F\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---features\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---target\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Document for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--r\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---release\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Document optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Document with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--v\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--q\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---color\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---config\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--C\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--h\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---help\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc--j\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo rustdoc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo rustdoc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-rustdoc---output-format\"><a class=\"option-anchor\" href=\"#option-cargo-rustdoc---output-format\"><code>--output-format</code></a></dt>\n<dd class=\"option-desc\"><p>The output type for the documentation emitted. Valid values:</p>\n<ul>\n<li><code>html</code> (default): Emit the documentation in HTML format.</li>\n<li><code>json</code>: Emit the documentation in the <a href=\"https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types\">experimental JSON format</a>.</li>\n</ul>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build documentation with custom CSS included from a given file:\n\n       cargo rustdoc --lib -- --extend-css extra.css\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-doc(1)](cargo-doc.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n","isInternal":false,"tokens":6000,"sizeBytes":22705},{"name":"cargo-search.md","path":"doc/book/src/commands/cargo-search.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-search.md","title":"Command: /cargo-search","category":"command-prompt","format":"markdown","content":"# cargo-search(1)\n\n## NAME\n\ncargo-search --- Search packages in the registry. Default registry is crates.io\n\n## SYNOPSIS\n\n`cargo search` [_options_] [_query_...]\n\n## DESCRIPTION\n\nThis performs a textual search for crates on <https://crates.io>. The matching\ncrates will be displayed along with their description in TOML format suitable\nfor copying into a `Cargo.toml` manifest.\n\n## OPTIONS\n\n### Search Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-search---limit\"><a class=\"option-anchor\" href=\"#option-cargo-search---limit\"><code>--limit</code> <em>limit</em></a></dt>\n<dd class=\"option-desc\"><p>Limit the number of results (default: 10, max: 100).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---index\"><a class=\"option-anchor\" href=\"#option-cargo-search---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---registry\"><a class=\"option-anchor\" href=\"#option-cargo-search---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-search--v\"><a class=\"option-anchor\" href=\"#option-cargo-search--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-search---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-search---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--q\"><a class=\"option-anchor\" href=\"#option-cargo-search--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-search---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-search---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---color\"><a class=\"option-anchor\" href=\"#option-cargo-search---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-search-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-search-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search---config\"><a class=\"option-anchor\" href=\"#option-cargo-search---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--C\"><a class=\"option-anchor\" href=\"#option-cargo-search--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--h\"><a class=\"option-anchor\" href=\"#option-cargo-search--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-search---help\"><a class=\"option-anchor\" href=\"#option-cargo-search---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-search--Z\"><a class=\"option-anchor\" href=\"#option-cargo-search--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Search for a package from crates.io:\n\n       cargo search serde\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-install(1)](cargo-install.html), [cargo-publish(1)](cargo-publish.html)\n","isInternal":false,"tokens":1639,"sizeBytes":6110},{"name":"cargo-test.md","path":"doc/book/src/commands/cargo-test.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-test.md","title":"Command: /cargo-test","category":"command-prompt","format":"markdown","content":"# cargo-test(1)\n## NAME\n\ncargo-test --- Execute unit and integration tests of a package\n\n## SYNOPSIS\n\n`cargo test` [_options_] [_testname_] [`--` _test-options_]\n\n## DESCRIPTION\n\nCompile and execute unit, integration, and documentation tests.\n\nThe test filtering argument `TESTNAME` and all the arguments following the two\ndashes (`--`) are passed to the test binaries and thus to _libtest_ (rustc's\nbuilt in unit-test and micro-benchmarking framework).  If you're passing\narguments to both Cargo and the binary, the ones after `--` go to the binary,\nthe ones before go to Cargo.  For details about libtest's arguments see the\noutput of `cargo test -- --help` and check out the rustc book's chapter on\nhow tests work at <https://doc.rust-lang.org/rustc/tests/index.html>.\n\nAs an example, this will filter for tests with `foo` in their name and run them\non 3 threads in parallel:\n\n    cargo test foo -- --test-threads 3\n\nTests are built with the `--test` option to `rustc` which creates a special\nexecutable by linking your code with libtest. The executable automatically\nruns all functions annotated with the `#[test]` attribute in multiple threads.\n`#[bench]` annotated functions will also be run with one iteration to verify\nthat they are functional.\n\nIf the package contains multiple test targets, each target compiles to a\nspecial executable as aforementioned, and then is run serially.\n\nThe libtest harness may be disabled by setting `harness = false` in the target\nmanifest settings, in which case your code will need to provide its own `main`\nfunction to handle running tests.\n\nBy default, `cargo test` uses the [`test` profile], which enables\nsome optimizations and disables debugging information for fast feedback. If you need to debug a\ntest, you can use the `--profile=debug` command-line option to switch to\nthe debug profile. You can then run the debug-enabled test within a\ndebugger.\n\n[`test` profile]: ../reference/profiles.html#test\n\n### Documentation tests\n\nDocumentation tests are also run by default, which is handled by `rustdoc`. It\nextracts code samples from documentation comments of the library target, and\nthen executes them.\n\nDifferent from normal test targets, each code block compiles to a doctest\nexecutable on the fly with `rustc`. These executables run in parallel in\nseparate processes. The compilation of a code block is in fact a part of test\nfunction controlled by libtest, so some options such as `--jobs` might not\ntake effect. Note that this execution model of doctests is not guaranteed\nand may change in the future; beware of depending on it.\n\nSee the [rustdoc book](https://doc.rust-lang.org/rustdoc/) for more information\non writing doc tests.\n\n### Working directory of tests\n\nThe working directory when running each unit and integration test is set to the\nroot directory of the package the test belongs to.\nSetting the working directory of tests to the package's root directory makes it\npossible for tests to reliably access the package's files using relative paths,\nregardless from where `cargo test` was executed from.\n\nFor documentation tests, the working directory when invoking `rustdoc` is set to\nthe workspace root directory, and is also the directory `rustdoc` uses as the\ncompilation directory of each documentation test.\nThe working directory when running each documentation test is set to the root\ndirectory of the package the test belongs to, and is controlled via `rustdoc`'s\n`--test-run-directory` option.\n\n## OPTIONS\n\n### Test Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---no-run\"><a class=\"option-anchor\" href=\"#option-cargo-test---no-run\"><code>--no-run</code></a></dt>\n<dd class=\"option-desc\"><p>Compile, but don’t run tests.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---no-fail-fast\"><a class=\"option-anchor\" href=\"#option-cargo-test---no-fail-fast\"><code>--no-fail-fast</code></a></dt>\n<dd class=\"option-desc\"><p>Run all tests regardless of failure. Without this flag, Cargo will exit\nafter the first executable fails. The Rust test harness will run all tests\nwithin the executable to completion, this flag only applies to the executable\nas a whole.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--p\"><a class=\"option-anchor\" href=\"#option-cargo-test--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---package\"><a class=\"option-anchor\" href=\"#option-cargo-test---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-test---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Test all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---all\"><a class=\"option-anchor\" href=\"#option-cargo-test---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-test---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo test` will build the\nfollowing targets of the selected packages:\n\n- lib --- used to link with binaries, examples, integration tests, and doc tests\n- bins (only if integration tests are built and required features are\n  available)\n- examples --- to ensure they compile\n- lib as a unit test\n- bins as unit tests\n- integration tests\n- doc tests for the lib target\n\nThe default behavior can be changed by setting the `test` flag for the target\nin the manifest settings. Setting examples to `test = true` will build and run\nthe example as a test, replacing the example's `main` function with the\nlibtest harness. If you don't want the `main` function replaced, also include\n`harness = false`, in which case the example will be built and executed as-is.\n\nSetting targets to `test = false` will stop them from being tested by default.\nTarget selection options that take a target by name (such as `--example foo`)\nignore the `test` flag and will always test the given target.\n\nDoc tests for libraries may be disabled by setting `doctest = false` for the\nlibrary in the manifest.\n\nSee [Configuring a target](../reference/cargo-targets.html#configuring-a-target)\nfor more information on per-target settings.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to test. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will test only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---lib\"><a class=\"option-anchor\" href=\"#option-cargo-test---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Test the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---bin\"><a class=\"option-anchor\" href=\"#option-cargo-test---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---bins\"><a class=\"option-anchor\" href=\"#option-cargo-test---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Test all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---example\"><a class=\"option-anchor\" href=\"#option-cargo-test---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---examples\"><a class=\"option-anchor\" href=\"#option-cargo-test---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Test all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---test\"><a class=\"option-anchor\" href=\"#option-cargo-test---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---tests\"><a class=\"option-anchor\" href=\"#option-cargo-test---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Test all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---bench\"><a class=\"option-anchor\" href=\"#option-cargo-test---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Test the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---benches\"><a class=\"option-anchor\" href=\"#option-cargo-test---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Test all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-test---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Test all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---doc\"><a class=\"option-anchor\" href=\"#option-cargo-test---doc\"><code>--doc</code></a></dt>\n<dd class=\"option-desc\"><p>Test only the library’s documentation. This cannot be mixed with other\ntarget options.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--F\"><a class=\"option-anchor\" href=\"#option-cargo-test--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---features\"><a class=\"option-anchor\" href=\"#option-cargo-test---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-test---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-test---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---target\"><a class=\"option-anchor\" href=\"#option-cargo-test---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Test for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--r\"><a class=\"option-anchor\" href=\"#option-cargo-test--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---release\"><a class=\"option-anchor\" href=\"#option-cargo-test---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Test optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---profile\"><a class=\"option-anchor\" href=\"#option-cargo-test---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Test with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---timings\"><a class=\"option-anchor\" href=\"#option-cargo-test---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-test---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-test---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\nBy default the Rust test harness hides output from test execution to keep\nresults readable. Test output can be recovered (e.g., for debugging) by passing\n`--no-capture` to the test binaries:\n\n    cargo test -- --no-capture\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--v\"><a class=\"option-anchor\" href=\"#option-cargo-test--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-test---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--q\"><a class=\"option-anchor\" href=\"#option-cargo-test--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-test---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---color\"><a class=\"option-anchor\" href=\"#option-cargo-test---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-test---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-test---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-test---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---locked\"><a class=\"option-anchor\" href=\"#option-cargo-test---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---offline\"><a class=\"option-anchor\" href=\"#option-cargo-test---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-test---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-test-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test---config\"><a class=\"option-anchor\" href=\"#option-cargo-test---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--C\"><a class=\"option-anchor\" href=\"#option-cargo-test--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--h\"><a class=\"option-anchor\" href=\"#option-cargo-test--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---help\"><a class=\"option-anchor\" href=\"#option-cargo-test---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-test--Z\"><a class=\"option-anchor\" href=\"#option-cargo-test--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\nThe `--jobs` argument affects the building of the test executable but does not\naffect how many threads are used when running the tests. The Rust test harness\nincludes an option to control the number of threads used:\n\n    cargo test -j 2 -- --test-threads=2\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-test--j\"><a class=\"option-anchor\" href=\"#option-cargo-test--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-test---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-test---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-test---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-test---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n\n</dl>\n\nWhile `cargo test` involves compilation, it does not provide a `--keep-going`\nflag. Use `--no-fail-fast` to run as many tests as possible without stopping at\nthe first failure. To \"compile\" as many tests as possible, use `--tests` to\nbuild test binaries separately. For example:\n\n    cargo build --tests --keep-going\n    cargo test --tests --no-fail-fast\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Execute all the unit and integration tests of the current package:\n\n       cargo test\n\n2. Run only tests whose names match against a filter string:\n\n       cargo test name_filter\n\n3. Run only a specific test within a specific integration test:\n\n       cargo test --test int_test_name -- modname::test_name\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-bench(1)](cargo-bench.html), [types of tests](../reference/cargo-targets.html#tests), [how to write tests](https://doc.rust-lang.org/rustc/tests/index.html)\n","isInternal":false,"tokens":7246,"sizeBytes":28660},{"name":"cargo-tree.md","path":"doc/book/src/commands/cargo-tree.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-tree.md","title":"Command: /cargo-tree","category":"command-prompt","format":"markdown","content":"# cargo-tree(1)\n## NAME\n\ncargo-tree --- Display a tree visualization of a dependency graph\n\n## SYNOPSIS\n\n`cargo tree` [_options_]\n\n## DESCRIPTION\n\nThis command will display a tree of dependencies to the terminal. An example\nof a simple project that depends on the \"rand\" package:\n\n```\nmyproject v0.1.0 (/myproject)\n└── rand v0.7.3\n    ├── getrandom v0.1.14\n    │   ├── cfg-if v0.1.10\n    │   └── libc v0.2.68\n    ├── libc v0.2.68 (*)\n    ├── rand_chacha v0.2.2\n    │   ├── ppv-lite86 v0.2.6\n    │   └── rand_core v0.5.1\n    │       └── getrandom v0.1.14 (*)\n    └── rand_core v0.5.1 (*)\n[build-dependencies]\n└── cc v1.0.50\n```\n\nPackages marked with `(*)` have been \"de-duplicated\". The dependencies for the\npackage have already been shown elsewhere in the graph, and so are not\nrepeated. Use the `--no-dedupe` option to repeat the duplicates.\n\nThe `-e` flag can be used to select the dependency kinds to display. The\n\"features\" kind changes the output to display the features enabled by\neach dependency. For example, `cargo tree -e features`:\n\n```\nmyproject v0.1.0 (/myproject)\n└── log feature \"serde\"\n    └── log v0.4.8\n        ├── serde v1.0.106\n        └── cfg-if feature \"default\"\n            └── cfg-if v0.1.10\n```\n\nIn this tree, `myproject` depends on `log` with the `serde` feature. `log` in\nturn depends on `cfg-if` with \"default\" features. When using `-e features` it\ncan be helpful to use `-i` flag to show how the features flow into a package.\nSee the examples below for more detail.\n\n### Feature Unification\n\nThis command shows a graph much closer to a feature-unified graph Cargo will\nbuild, rather than what you list in `Cargo.toml`. For instance, if you specify\nthe same dependency in both `[dependencies]` and `[dev-dependencies]` but with\ndifferent features on. This command may merge all features and show a `(*)` on\none of the dependency to indicate the duplicate.\n\nAs a result, for a mostly equivalent overview of what `cargo build` does,\n`cargo tree -e normal,build` is pretty close; for a mostly equivalent overview\nof what `cargo test` does, `cargo tree` is pretty close. However, it doesn't\nguarantee the exact equivalence to what Cargo is going to build, since a\ncompilation is complex and depends on lots of different factors.\n\nTo learn more about feature unification, check out this\n[dedicated section](../reference/features.html#feature-unification).\n\n## OPTIONS\n\n### Tree Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--i\"><a class=\"option-anchor\" href=\"#option-cargo-tree--i\"><code>-i</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---invert\"><a class=\"option-anchor\" href=\"#option-cargo-tree---invert\"><code>--invert</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Show the reverse dependencies for the given package. This flag will invert\nthe tree and display the packages that depend on the given package.</p>\n<p>Note that in a workspace, by default it will only display the package’s\nreverse dependencies inside the tree of the workspace member in the current\ndirectory. The <code>--workspace</code> flag can be used to extend it so that it will\nshow the package’s reverse dependencies across the entire workspace. The <code>-p</code>\nflag can be used to display the package’s reverse dependencies only with the\nsubtree of the package given to <code>-p</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---prune\"><a class=\"option-anchor\" href=\"#option-cargo-tree---prune\"><code>--prune</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Prune the given package from the display of the dependency tree.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---depth\"><a class=\"option-anchor\" href=\"#option-cargo-tree---depth\"><code>--depth</code> <em>depth</em></a></dt>\n<dd class=\"option-desc\"><p>Maximum display depth of the dependency tree. A depth of 1 displays the direct\ndependencies, for example.</p>\n<p>If the given value is <code>workspace</code>, only shows the dependencies that are member\nof the current workspace, instead.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---no-dedupe\"><a class=\"option-anchor\" href=\"#option-cargo-tree---no-dedupe\"><code>--no-dedupe</code></a></dt>\n<dd class=\"option-desc\"><p>Do not de-duplicate repeated dependencies. Usually, when a package has already\ndisplayed its dependencies, further occurrences will not re-display its\ndependencies, and will include a <code>(*)</code> to indicate it has already been shown.\nThis flag will cause those duplicates to be repeated.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--d\"><a class=\"option-anchor\" href=\"#option-cargo-tree--d\"><code>-d</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---duplicates\"><a class=\"option-anchor\" href=\"#option-cargo-tree---duplicates\"><code>--duplicates</code></a></dt>\n<dd class=\"option-desc\"><p>Show only dependencies which come in multiple versions (implies <code>--invert</code>).\nWhen used with the <code>-p</code> flag, only shows duplicates within the subtree of the\ngiven package.</p>\n<p>It can be beneficial for build times and executable sizes to avoid building\nthat same package multiple times. This flag can help identify the offending\npackages. You can then investigate if the package that depends on the\nduplicate with the older version can be updated to the newer version so that\nonly one instance is built.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--e\"><a class=\"option-anchor\" href=\"#option-cargo-tree--e\"><code>-e</code> <em>kinds</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---edges\"><a class=\"option-anchor\" href=\"#option-cargo-tree---edges\"><code>--edges</code> <em>kinds</em></a></dt>\n<dd class=\"option-desc\"><p>The dependency kinds to display. Takes a comma separated list of values:</p>\n<ul>\n<li><code>all</code> — Show all edge kinds.</li>\n<li><code>normal</code> — Show normal dependencies.</li>\n<li><code>build</code> — Show build dependencies.</li>\n<li><code>dev</code> — Show development dependencies.</li>\n<li><code>features</code> — Show features enabled by each dependency. If this is the only\nkind given, then it will automatically include the other dependency kinds.</li>\n<li><code>no-normal</code> — Do not include normal dependencies.</li>\n<li><code>no-build</code> — Do not include build dependencies.</li>\n<li><code>no-dev</code> — Do not include development dependencies.</li>\n<li><code>no-proc-macro</code> — Do not include procedural macro dependencies.</li>\n</ul>\n<p>The <code>normal</code>, <code>build</code>, <code>dev</code>, and <code>all</code> dependency kinds cannot be mixed with\n<code>no-normal</code>, <code>no-build</code>, or <code>no-dev</code> dependency kinds.</p>\n<p>The default is <code>normal,build,dev</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---target\"><a class=\"option-anchor\" href=\"#option-cargo-tree---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Filter dependencies matching the given <a href=\"../appendix/glossary.html#target\">target tuple</a>.\nThe default is the host platform. Use the value <code>all</code> to include <em>all</em> targets.</p>\n</dd>\n\n\n</dl>\n\n### Tree Formatting Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree---charset\"><a class=\"option-anchor\" href=\"#option-cargo-tree---charset\"><code>--charset</code> <em>charset</em></a></dt>\n<dd class=\"option-desc\"><p>Chooses the character set to use for the tree. Valid values are “utf8” or\n“ascii”. When unspecified, cargo will auto-select a value.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--f\"><a class=\"option-anchor\" href=\"#option-cargo-tree--f\"><code>-f</code> <em>format</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---format\"><a class=\"option-anchor\" href=\"#option-cargo-tree---format\"><code>--format</code> <em>format</em></a></dt>\n<dd class=\"option-desc\"><p>Set the format string for each package. The default is “{p}”.</p>\n<p>This is an arbitrary string which will be used to display each package. The following\nstrings will be replaced with the corresponding value:</p>\n<ul>\n<li><code>{p}</code>, <code>{package}</code> — The package name.</li>\n<li><code>{l}</code>, <code>{license}</code> — The package license.</li>\n<li><code>{r}</code>, <code>{repository}</code> — The package repository URL.</li>\n<li><code>{f}</code>, <code>{features}</code> — Comma-separated list of package features that are enabled.</li>\n<li><code>{lib}</code> — The name, as used in a <code>use</code> statement, of the package’s library.</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---prefix\"><a class=\"option-anchor\" href=\"#option-cargo-tree---prefix\"><code>--prefix</code> <em>prefix</em></a></dt>\n<dd class=\"option-desc\"><p>Sets how each line is displayed. The <em>prefix</em> value can be one of:</p>\n<ul>\n<li><code>indent</code> (default) — Shows each line indented as a tree.</li>\n<li><code>depth</code> — Show as a list, with the numeric depth printed before each entry.</li>\n<li><code>none</code> — Show as a flat list.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--p\"><a class=\"option-anchor\" href=\"#option-cargo-tree--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---package\"><a class=\"option-anchor\" href=\"#option-cargo-tree---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Display only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-tree---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Display all members in the workspace.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-tree---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-tree---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---locked\"><a class=\"option-anchor\" href=\"#option-cargo-tree---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---offline\"><a class=\"option-anchor\" href=\"#option-cargo-tree---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-tree---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--F\"><a class=\"option-anchor\" href=\"#option-cargo-tree--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---features\"><a class=\"option-anchor\" href=\"#option-cargo-tree---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-tree---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-tree---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree--v\"><a class=\"option-anchor\" href=\"#option-cargo-tree--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-tree---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--q\"><a class=\"option-anchor\" href=\"#option-cargo-tree--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-tree---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---color\"><a class=\"option-anchor\" href=\"#option-cargo-tree---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-tree-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-tree-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree---config\"><a class=\"option-anchor\" href=\"#option-cargo-tree---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--C\"><a class=\"option-anchor\" href=\"#option-cargo-tree--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--h\"><a class=\"option-anchor\" href=\"#option-cargo-tree--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-tree---help\"><a class=\"option-anchor\" href=\"#option-cargo-tree---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-tree--Z\"><a class=\"option-anchor\" href=\"#option-cargo-tree--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the tree for the package in the current directory:\n\n       cargo tree\n\n2. Display all the packages that depend on the `syn` package:\n\n       cargo tree -i syn\n\n3. Show the features enabled on each package:\n\n       cargo tree --format \"{p} {f}\"\n\n4. Show all packages that are built multiple times. This can happen if multiple\n   semver-incompatible versions appear in the tree (like 1.0.0 and 2.0.0).\n\n       cargo tree -d\n\n5. Explain why features are enabled for the `syn` package:\n\n       cargo tree -e features -i syn\n\n   The `-e features` flag is used to show features. The `-i` flag is used to\n   invert the graph so that it displays the packages that depend on `syn`. An\n   example of what this would display:\n\n   ```\n   syn v1.0.17\n   ├── syn feature \"clone-impls\"\n   │   └── syn feature \"default\"\n   │       └── rustversion v1.0.2\n   │           └── rustversion feature \"default\"\n   │               └── myproject v0.1.0 (/myproject)\n   │                   └── myproject feature \"default\" (command-line)\n   ├── syn feature \"default\" (*)\n   ├── syn feature \"derive\"\n   │   └── syn feature \"default\" (*)\n   ├── syn feature \"full\"\n   │   └── rustversion v1.0.2 (*)\n   ├── syn feature \"parsing\"\n   │   └── syn feature \"default\" (*)\n   ├── syn feature \"printing\"\n   │   └── syn feature \"default\" (*)\n   ├── syn feature \"proc-macro\"\n   │   └── syn feature \"default\" (*)\n   └── syn feature \"quote\"\n       ├── syn feature \"printing\" (*)\n       └── syn feature \"proc-macro\" (*)\n   ```\n\n   To read this graph, you can follow the chain for each feature from the root\n   to see why it is included. For example, the \"full\" feature is added by the\n   `rustversion` crate which is included from `myproject` (with the default\n   features), and `myproject` is the package selected on the command-line. All\n   of the other `syn` features are added by the \"default\" feature (\"quote\" is\n   added by \"printing\" and \"proc-macro\", both of which are default features).\n\n   If you're having difficulty cross-referencing the de-duplicated `(*)`\n   entries, try with the `--no-dedupe` flag to get the full output.\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-metadata(1)](cargo-metadata.html)\n","isInternal":false,"tokens":5789,"sizeBytes":22024},{"name":"cargo-uninstall.md","path":"doc/book/src/commands/cargo-uninstall.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-uninstall.md","title":"Command: /cargo-uninstall","category":"command-prompt","format":"markdown","content":"# cargo-uninstall(1)\n\n## NAME\n\ncargo-uninstall --- Remove a Rust binary\n\n## SYNOPSIS\n\n`cargo uninstall` [_options_] [_spec_...]\n\n## DESCRIPTION\n\nThis command removes a package installed with [cargo-install(1)](cargo-install.html). The _spec_\nargument is a package ID specification of the package to remove (see\n[cargo-pkgid(1)](cargo-pkgid.html)).\n\nBy default all binaries are removed for a crate but the `--bin` and\n`--example` flags can be used to only remove particular binaries.\n\nThe installation root is determined, in order of precedence:\n\n- `--root` option\n- `CARGO_INSTALL_ROOT` environment variable\n- `install.root` Cargo [config value](../reference/config.html)\n- `CARGO_HOME` environment variable\n- `$HOME/.cargo`\n\n## OPTIONS\n\n### Uninstall Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--p\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--p\"><code>-p</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---package\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package to uninstall.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---bin\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Only uninstall the binary <em>name</em>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---root\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---root\"><code>--root</code> <em>dir</em></a></dt>\n<dd class=\"option-desc\"><p>Directory to uninstall packages from.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--v\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--q\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---color\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall---config\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--C\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--h\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-uninstall---help\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-uninstall--Z\"><a class=\"option-anchor\" href=\"#option-cargo-uninstall--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Uninstall a previously installed package.\n\n       cargo uninstall ripgrep\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-install(1)](cargo-install.html)\n","isInternal":false,"tokens":1731,"sizeBytes":6378},{"name":"cargo-update.md","path":"doc/book/src/commands/cargo-update.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-update.md","title":"Command: /cargo-update","category":"command-prompt","format":"markdown","content":"# cargo-update(1)\n\n## NAME\n\ncargo-update --- Update dependencies as recorded in the local lock file\n\n## SYNOPSIS\n\n`cargo update` [_options_] _spec_\n\n## DESCRIPTION\n\nThis command will update dependencies in the `Cargo.lock` file to the latest\nversion. If the `Cargo.lock` file does not exist, it will be created with the\nlatest available versions.\n\n## OPTIONS\n\n### Update Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-update-spec…\"><a class=\"option-anchor\" href=\"#option-cargo-update-spec…\"><em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Update only the specified packages. This flag may be specified\nmultiple times. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC format.</p>\n<p>If packages are specified with <em>spec</em>, then a conservative update of\nthe lockfile will be performed. This means that only the dependency specified\nby SPEC will be updated. Its transitive dependencies will be updated only if\nSPEC cannot be updated without updating dependencies.  All other dependencies\nwill remain locked at their currently recorded versions.</p>\n<p>If <em>spec</em> is not specified, all dependencies are updated.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---recursive\"><a class=\"option-anchor\" href=\"#option-cargo-update---recursive\"><code>--recursive</code></a></dt>\n<dd class=\"option-desc\"><p>When used with <em>spec</em>, dependencies of <em>spec</em> are forced to update as well.\nCannot be used with <code>--precise</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---precise\"><a class=\"option-anchor\" href=\"#option-cargo-update---precise\"><code>--precise</code> <em>precise</em></a></dt>\n<dd class=\"option-desc\"><p>When used with <em>spec</em>, allows you to specify a specific version number to set\nthe package to. If the package comes from a git repository, this can be a git\nrevision (such as a SHA hash or tag).</p>\n<p>While not recommended, you can specify a yanked version of a package.\nWhen possible, try other non-yanked SemVer-compatible versions or seek help\nfrom the maintainers of the package.</p>\n<p>A compatible <code>pre-release</code> version can also be specified even when the version\nrequirement in <code>Cargo.toml</code> doesn’t contain any pre-release identifier (nightly only).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--w\"><a class=\"option-anchor\" href=\"#option-cargo-update--w\"><code>-w</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-update---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Attempt to update only packages defined in the workspace. Other packages\nare updated only if they don’t already exist in the lockfile. This\noption is useful for updating <code>Cargo.lock</code> after you’ve changed version\nnumbers in <code>Cargo.toml</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-update---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Displays what would be updated, but doesn’t actually write the lockfile.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-update--v\"><a class=\"option-anchor\" href=\"#option-cargo-update--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-update---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--q\"><a class=\"option-anchor\" href=\"#option-cargo-update--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-update---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---color\"><a class=\"option-anchor\" href=\"#option-cargo-update---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-update---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-update---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-update---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---locked\"><a class=\"option-anchor\" href=\"#option-cargo-update---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---offline\"><a class=\"option-anchor\" href=\"#option-cargo-update---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-update---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-update-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-update-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update---config\"><a class=\"option-anchor\" href=\"#option-cargo-update---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--C\"><a class=\"option-anchor\" href=\"#option-cargo-update--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--h\"><a class=\"option-anchor\" href=\"#option-cargo-update--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-update---help\"><a class=\"option-anchor\" href=\"#option-cargo-update---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-update--Z\"><a class=\"option-anchor\" href=\"#option-cargo-update--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Update all dependencies in the lockfile:\n\n       cargo update\n\n2. Update only specific dependencies:\n\n       cargo update foo bar\n\n3. Set a specific dependency to a specific version:\n\n       cargo update foo --precise 1.2.3\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\n","isInternal":false,"tokens":2739,"sizeBytes":10540},{"name":"cargo-vendor.md","path":"doc/book/src/commands/cargo-vendor.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-vendor.md","title":"Command: /cargo-vendor","category":"command-prompt","format":"markdown","content":"# cargo-vendor(1)\n\n## NAME\n\ncargo-vendor --- Vendor all dependencies locally\n\n## SYNOPSIS\n\n`cargo vendor` [_options_] [_path_]\n\n## DESCRIPTION\n\nThis cargo subcommand will vendor all crates.io and git dependencies for a\nproject into the specified directory at `<path>`. After this command completes\nthe vendor directory specified by `<path>` will contain all remote sources from\ndependencies specified. Additional manifests beyond the default one can be\nspecified with the `-s` option.\n\nThe configuration necessary to use the vendored sources would be printed to\nstdout after `cargo vendor` completes the vendoring process.\nYou will need to add or redirect it to your Cargo configuration file,\nwhich is usually `.cargo/config.toml` locally for the current package.\n\nCargo treats vendored sources as read-only as it does to registry and git sources.\nIf you intend to modify a crate from a remote source,\nuse `[patch]` or a `path` dependency pointing to a local copy of that crate.\nCargo will then correctly handle the crate on incremental rebuilds,\nas it knows that it is no longer a read-only dependency.\n\n## OPTIONS\n\n### Vendor Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--s\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--s\"><code>-s</code> <em>manifest</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---sync\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---sync\"><code>--sync</code> <em>manifest</em></a></dt>\n<dd class=\"option-desc\"><p>Specify an extra <code>Cargo.toml</code> manifest to workspaces which should also be\nvendored and synced to the output. May be specified multiple times.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---no-delete\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---no-delete\"><code>--no-delete</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t delete the “vendor” directory when vendoring, but rather keep all\nexisting contents of the vendor directory</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---respect-source-config\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---respect-source-config\"><code>--respect-source-config</code></a></dt>\n<dd class=\"option-desc\"><p>Instead of ignoring <code>[source]</code> configuration by default in <code>.cargo/config.toml</code>,\nread it and use it when downloading crates.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---versioned-dirs\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---versioned-dirs\"><code>--versioned-dirs</code></a></dt>\n<dd class=\"option-desc\"><p>Normally versions are only added to disambiguate multiple versions of the\nsame package. This option causes all directories in the “vendor” directory\nto be versioned, which makes it easier to track the history of vendored\npackages over time, and can help with the performance of re-vendoring when\nonly a subset of the packages have changed.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---locked\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---offline\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--v\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--q\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---color\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-vendor-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-vendor-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor---config\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--C\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--h\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-vendor---help\"><a class=\"option-anchor\" href=\"#option-cargo-vendor---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-vendor--Z\"><a class=\"option-anchor\" href=\"#option-cargo-vendor--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Vendor all dependencies into a local \"vendor\" folder\n\n       cargo vendor\n\n2. Vendor all dependencies into a local \"third-party/vendor\" folder\n\n       cargo vendor third-party/vendor\n\n3. Vendor the current workspace as well as another to \"vendor\"\n\n       cargo vendor -s ../path/to/Cargo.toml\n\n4. Vendor and redirect the necessary vendor configs to a config file.\n\n       cargo vendor > path/to/my/cargo/config.toml\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n\n","isInternal":false,"tokens":2621,"sizeBytes":10136},{"name":"cargo-version.md","path":"doc/book/src/commands/cargo-version.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-version.md","title":"Command: /cargo-version","category":"command-prompt","format":"markdown","content":"# cargo-version(1)\n\n## NAME\n\ncargo-version --- Show version information\n\n## SYNOPSIS\n\n`cargo version` [_options_]\n\n## DESCRIPTION\n\nDisplays the version of Cargo.\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-version--v\"><a class=\"option-anchor\" href=\"#option-cargo-version--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-version---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-version---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Display additional version information.</p>\n</dd>\n\n\n</dl>\n\n## EXAMPLES\n\n1. Display the version:\n\n       cargo version\n\n2. The version is also available via flags:\n\n       cargo --version\n       cargo -V\n\n3. Display extra version information:\n\n       cargo -Vv\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n","isInternal":false,"tokens":206,"sizeBytes":795},{"name":"cargo-yank.md","path":"doc/book/src/commands/cargo-yank.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo-yank.md","title":"Command: /cargo-yank","category":"command-prompt","format":"markdown","content":"# cargo-yank(1)\n\n## NAME\n\ncargo-yank --- Remove a pushed crate from the index\n\n## SYNOPSIS\n\n`cargo yank` [_options_] _crate_@_version_\\\n`cargo yank` [_options_] `--version` _version_ [_crate_]\n\n## DESCRIPTION\n\nThe yank command removes a previously published crate's version from the\nserver's index. This command does not delete any data, and the crate will\nstill be available for download via the registry's download link.\n\nCargo will not use a yanked version for any new project or checkout without a\npre-existing lockfile, and will generate an error if there are no longer\nany compatible versions for your crate.\n\nThis command requires you to be authenticated with either the `--token` option\nor using [cargo-login(1)](cargo-login.html).\n\nIf the crate name is not specified, it will use the package name from the\ncurrent directory.\n\n### How yank works\n\nFor example, the `foo` crate published version `1.5.0` and another crate `bar`\ndeclared a dependency on version `foo = \"1.5\"`. Now `foo` releases a new, but\nnot semver compatible, version `2.0.0`, and finds a critical issue with `1.5.0`.\nIf `1.5.0` is yanked, no new project or checkout without an existing lockfile\nwill be able to use crate `bar` as it relies on `1.5`.\n\nIn this case, the maintainers of `foo` should first publish a semver compatible\nversion such as `1.5.1` prior to yanking `1.5.0` so that `bar` and all projects\nthat depend on `bar` will continue to work.\n\nAs another example, consider a crate `bar` with published versions `1.5.0`,\n`1.5.1`, `1.5.2`, `2.0.0` and `3.0.0`. The following table identifies the\nversions cargo could use in the absence of a lockfile for different SemVer\nrequirements, following a given release being yanked:\n\n| Yanked Version / SemVer requirement | `bar = \"1.5.0\"`                         | `bar = \"=1.5.0\"` | `bar = \"2.0.0\"`  |\n|-------------------------------------|-----------------------------------------|------------------|------------------|\n| `1.5.0`                             | Use either `1.5.1` or `1.5.2`           | **Return Error** | Use `2.0.0`      |\n| `1.5.1`                             | Use either `1.5.0` or `1.5.2`           | Use `1.5.0`      | Use `2.0.0`      |\n| `2.0.0`                             | Use either `1.5.0`, `1.5.1` or `1.5.2`  | Use `1.5.0`      | **Return Error** |\n\n### When to yank\n\nCrates should only be yanked in exceptional circumstances, for example, an\naccidental publish, unintentional SemVer breakages, or a significantly\nbroken and unusable crate. In the case of security vulnerabilities, [RustSec]\nis typically a less disruptive mechanism to inform users and encourage them\nto upgrade, and avoids the possibility of significant downstream disruption\nirrespective of susceptibility to the vulnerability in question.\n\nA common workflow is to yank a crate having already published a semver\ncompatible version, to reduce the probability of preventing dependent\ncrates from compiling.\n\nWhen addressing copyright, licensing, or personal data issues with a published\ncrate, simply yanking it may not suffice. In such cases, contact the maintainers\nof the registry you used. For crates.io, refer to their [policies] and contact\nthem at <help@crates.io>.\n\nIf credentials have been leaked, the recommended course of action is to revoke\nthem immediately. Once a crate has been published, it is impossible to determine\nif the leaked credentials have been copied. Yanking only prevents Cargo from\nselecting this version when resolving dependencies by default. Existing lock\nfiles or direct downloads are not affected, so yanking cannot stop further\nspreading of the leaked credentials.\n\n[RustSec]: https://rustsec.org/\n[policies]: https://crates.io/policies\n\n## OPTIONS\n\n### Yank Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-yank---vers\"><a class=\"option-anchor\" href=\"#option-cargo-yank---vers\"><code>--vers</code> <em>version</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---version\"><a class=\"option-anchor\" href=\"#option-cargo-yank---version\"><code>--version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>The version to yank or un-yank.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---undo\"><a class=\"option-anchor\" href=\"#option-cargo-yank---undo\"><code>--undo</code></a></dt>\n<dd class=\"option-desc\"><p>Undo a yank, putting a version back into the index.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---token\"><a class=\"option-anchor\" href=\"#option-cargo-yank---token\"><code>--token</code> <em>token</em></a></dt>\n<dd class=\"option-desc\"><p>API token to use when authenticating. This overrides the token stored in\nthe credentials file (which is created by <a href=\"cargo-login.html\">cargo-login(1)</a>).</p>\n<p><a href=\"../reference/config.html\">Cargo config</a> environment variables can be\nused to override the tokens stored in the credentials file. The token for\ncrates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment\nvariable. Tokens for other registries may be specified with environment\nvariables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name\nof the registry in all capital letters.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---index\"><a class=\"option-anchor\" href=\"#option-cargo-yank---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---registry\"><a class=\"option-anchor\" href=\"#option-cargo-yank---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-yank--v\"><a class=\"option-anchor\" href=\"#option-cargo-yank--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-yank---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--q\"><a class=\"option-anchor\" href=\"#option-cargo-yank--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-yank---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---color\"><a class=\"option-anchor\" href=\"#option-cargo-yank---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-yank-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-yank-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank---config\"><a class=\"option-anchor\" href=\"#option-cargo-yank---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--C\"><a class=\"option-anchor\" href=\"#option-cargo-yank--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--h\"><a class=\"option-anchor\" href=\"#option-cargo-yank--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-yank---help\"><a class=\"option-anchor\" href=\"#option-cargo-yank---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-yank--Z\"><a class=\"option-anchor\" href=\"#option-cargo-yank--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Yank a crate from the index:\n\n       cargo yank foo@1.0.7\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html), [cargo-publish(1)](cargo-publish.html)\n","isInternal":false,"tokens":2855,"sizeBytes":10560},{"name":"cargo.md","path":"doc/book/src/commands/cargo.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/cargo.md","title":"Command: /cargo","category":"command-prompt","format":"markdown","content":"# cargo(1)\n\n## NAME\n\ncargo --- The Rust package manager\n\n## SYNOPSIS\n\n`cargo` [_options_] _command_ [_args_]\\\n`cargo` [_options_] `--version`\\\n`cargo` [_options_] `--list`\\\n`cargo` [_options_] `--help`\\\n`cargo` [_options_] `--explain` _code_\n\n## DESCRIPTION\n\nThis program is a package manager and build tool for the Rust language,\navailable at <https://rust-lang.org>.\n\n_command_ may be one of:\n- built-in commands, see below\n- [aliases]\n- [external tools]\n\n[aliases]: ../reference/config.html#alias\n[external tools]: ../reference/external-tools.html#custom-subcommands\n\n## COMMANDS\n\n### Build Commands\n\n[cargo-bench(1)](cargo-bench.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Execute benchmarks of a package.\n\n[cargo-build(1)](cargo-build.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Compile a package.\n\n[cargo-check(1)](cargo-check.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Check a local package and all of its dependencies for errors.\n\n[cargo-clean(1)](cargo-clean.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove artifacts that Cargo has generated in the past.\n\n[cargo-doc(1)](cargo-doc.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Build a package's documentation.\n\n[cargo-fetch(1)](cargo-fetch.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Fetch dependencies of a package from the network.\n\n[cargo-fix(1)](cargo-fix.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Automatically fix lint warnings reported by rustc.\n\n[cargo-run(1)](cargo-run.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Run a binary or example of the local package.\n\n[cargo-rustc(1)](cargo-rustc.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Compile a package, and pass extra options to the compiler.\n\n[cargo-rustdoc(1)](cargo-rustdoc.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Build a package's documentation, using specified custom flags.\n\n[cargo-test(1)](cargo-test.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Execute unit and integration tests of a package.\n\n### Manifest Commands\n\n[cargo-add(1)](cargo-add.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Add dependencies to a `Cargo.toml` manifest file.\n\n[cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Generate `Cargo.lock` for a project.\n\n[cargo-info(1)](cargo-info.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Display information about a package in the registry. Default registry is crates.io.\n\n[cargo-locate-project(1)](cargo-locate-project.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Print a JSON representation of a `Cargo.toml` file's location.\n\n[cargo-metadata(1)](cargo-metadata.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Output the resolved dependencies of a package in machine-readable format.\n\n[cargo-pkgid(1)](cargo-pkgid.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Print a fully qualified package specification.\n\n[cargo-remove(1)](cargo-remove.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove dependencies from a `Cargo.toml` manifest file.\n\n[cargo-tree(1)](cargo-tree.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Display a tree visualization of a dependency graph.\n\n[cargo-update(1)](cargo-update.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Update dependencies as recorded in the local lock file.\n\n[cargo-vendor(1)](cargo-vendor.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Vendor all dependencies locally.\n\n### Package Commands\n\n[cargo-init(1)](cargo-init.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Create a new Cargo package in an existing directory.\n\n[cargo-install(1)](cargo-install.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Build and install a Rust binary.\n\n[cargo-new(1)](cargo-new.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Create a new Cargo package.\n\n[cargo-search(1)](cargo-search.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Search packages in crates.io.\n\n[cargo-uninstall(1)](cargo-uninstall.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove a Rust binary.\n\n### Publishing Commands\n\n[cargo-login(1)](cargo-login.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Save an API token from the registry locally.\n\n[cargo-logout(1)](cargo-logout.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove an API token from the registry locally.\n\n[cargo-owner(1)](cargo-owner.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Manage the owners of a crate on the registry.\n\n[cargo-package(1)](cargo-package.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Assemble the local package into a distributable tarball.\n\n[cargo-publish(1)](cargo-publish.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Upload a package to the registry.\n\n[cargo-yank(1)](cargo-yank.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Remove a pushed crate from the index.\n\n### Report Commands\n\n[cargo-report(1)](cargo-report.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Generate and display various kinds of reports.\n\n[cargo-report-future-incompatibilities(1)](cargo-report-future-incompatibilities.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Reports any crates which will eventually stop compiling.\n\n### General Commands\n\n[cargo-help(1)](cargo-help.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Display help information about Cargo.\n\n[cargo-version(1)](cargo-version.html)\\\n&nbsp;&nbsp;&nbsp;&nbsp;Show version information.\n\n## OPTIONS\n\n### Special Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo--V\"><a class=\"option-anchor\" href=\"#option-cargo--V\"><code>-V</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---version\"><a class=\"option-anchor\" href=\"#option-cargo---version\"><code>--version</code></a></dt>\n<dd class=\"option-desc\"><p>Print version info and exit. If used with <code>--verbose</code>, prints extra\ninformation.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---list\"><a class=\"option-anchor\" href=\"#option-cargo---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List all installed Cargo subcommands. If used with <code>--verbose</code>, prints extra\ninformation.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---explain\"><a class=\"option-anchor\" href=\"#option-cargo---explain\"><code>--explain</code> <em>code</em></a></dt>\n<dd class=\"option-desc\"><p>Run <code>rustc --explain CODE</code> which will print out a detailed explanation of an\nerror message (for example, <code>E0004</code>).</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo--v\"><a class=\"option-anchor\" href=\"#option-cargo--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---verbose\"><a class=\"option-anchor\" href=\"#option-cargo---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--q\"><a class=\"option-anchor\" href=\"#option-cargo--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---quiet\"><a class=\"option-anchor\" href=\"#option-cargo---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---color\"><a class=\"option-anchor\" href=\"#option-cargo---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo---locked\"><a class=\"option-anchor\" href=\"#option-cargo---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---offline\"><a class=\"option-anchor\" href=\"#option-cargo---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---frozen\"><a class=\"option-anchor\" href=\"#option-cargo---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo---config\"><a class=\"option-anchor\" href=\"#option-cargo---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--C\"><a class=\"option-anchor\" href=\"#option-cargo--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--h\"><a class=\"option-anchor\" href=\"#option-cargo--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo---help\"><a class=\"option-anchor\" href=\"#option-cargo---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo--Z\"><a class=\"option-anchor\" href=\"#option-cargo--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## FILES\n\n`~/.cargo/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Default location for Cargo's \"home\" directory where it\nstores various files. The location can be changed with the `CARGO_HOME`\nenvironment variable.\n\n`$CARGO_HOME/bin/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Binaries installed by [cargo-install(1)](cargo-install.html) will be located here. If using\n[rustup], executables distributed with Rust are also located here.\n\n`$CARGO_HOME/config.toml`\\\n&nbsp;&nbsp;&nbsp;&nbsp;The global configuration file. See [the reference](../reference/config.html)\nfor more information about configuration files.\n\n`.cargo/config.toml`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Cargo automatically searches for a file named `.cargo/config.toml` in the\ncurrent directory, and all parent directories. These configuration files\nwill be merged with the global configuration file.\n\n`$CARGO_HOME/credentials.toml`\\\n&nbsp;&nbsp;&nbsp;&nbsp;Private authentication information for logging in to a registry.\n\n`$CARGO_HOME/registry/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;This directory contains cached downloads of the registry index and any\ndownloaded dependencies.\n\n`$CARGO_HOME/git/`\\\n&nbsp;&nbsp;&nbsp;&nbsp;This directory contains cached downloads of git dependencies.\n\nPlease note that the internal structure of the `$CARGO_HOME` directory is not\nstable yet and may be subject to change.\n\n[rustup]: https://rust-lang.github.io/rustup/\n\n## EXAMPLES\n\n1. Build a local package and all of its dependencies:\n\n       cargo build\n\n2. Build a package with optimizations:\n\n       cargo build --release\n\n3. Run tests for a cross-compiled target:\n\n       cargo test --target i686-unknown-linux-gnu\n\n4. Create a new package that builds an executable:\n\n       cargo new foobar\n\n5. Create a package in the current directory:\n\n       mkdir foo && cd foo\n       cargo init .\n\n6. Learn about a command's options and usage:\n\n       cargo help clean\n\n## BUGS\n\nSee <https://github.com/rust-lang/cargo/issues> for issues.\n\n## SEE ALSO\n\n[rustc(1)](https://doc.rust-lang.org/rustc/index.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n","isInternal":false,"tokens":3667,"sizeBytes":13961},{"name":"deprecated-and-removed.md","path":"doc/book/src/commands/deprecated-and-removed.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/deprecated-and-removed.md","title":"Command: /deprecated-and-removed","category":"command-prompt","format":"markdown","content":"## Deprecated and Removed Commands\n\nThese commands have been deprecated or removed in early Rust releases.\nDeprecated commands receive only critical bug fixes,\nand may be removed in future versions.\nRemoved commands are no longer functional and are unsupported.\n\n* `read-manifest` --- deprecated since Rust 1.13\n* `git-checkout` --- removed since Rust 1.44\n* `verify-project` --- deprecated since Rust 1.84\n","isInternal":false,"tokens":88,"sizeBytes":407},{"name":"general-commands.md","path":"doc/book/src/commands/general-commands.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/general-commands.md","title":"Command: /general-commands","category":"command-prompt","format":"markdown","content":"# General Commands\n* [cargo](cargo.md)\n* [cargo help](cargo-help.md)\n* [cargo version](cargo-version.md)\n","isInternal":false,"tokens":29,"sizeBytes":105},{"name":"index.md","path":"doc/book/src/commands/index.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/index.md","title":"Command: /index","category":"command-prompt","format":"markdown","content":"# Cargo Commands\n* [General Commands](general-commands.md)\n* [Build Commands](build-commands.md)\n* [Manifest Commands](manifest-commands.md)\n* [Package Commands](package-commands.md)\n* [Publishing Commands](publishing-commands.md)\n* [Report Commands](report-commands.md)\n* [Deprecated and Removed](deprecated-and-removed.md)\n","isInternal":false,"tokens":78,"sizeBytes":325},{"name":"manifest-commands.md","path":"doc/book/src/commands/manifest-commands.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/manifest-commands.md","title":"Command: /manifest-commands","category":"command-prompt","format":"markdown","content":"# Manifest Commands\n\n* [cargo add](cargo-add.md)\n* [cargo_info](cargo-info.md)\n* [cargo generate-lockfile](cargo-generate-lockfile.md)\n* [cargo locate-project](cargo-locate-project.md)\n* [cargo metadata](cargo-metadata.md)\n* [cargo pkgid](cargo-pkgid.md)\n* [cargo remove](cargo-remove.md)\n* [cargo tree](cargo-tree.md)\n* [cargo update](cargo-update.md)\n* [cargo vendor](cargo-vendor.md)\n","isInternal":false,"tokens":106,"sizeBytes":387},{"name":"package-commands.md","path":"doc/book/src/commands/package-commands.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/package-commands.md","title":"Command: /package-commands","category":"command-prompt","format":"markdown","content":"# Package Commands\n* [cargo init](cargo-init.md)\n* [cargo install](cargo-install.md)\n* [cargo new](cargo-new.md)\n* [cargo search](cargo-search.md)\n* [cargo uninstall](cargo-uninstall.md)\n","isInternal":false,"tokens":50,"sizeBytes":187},{"name":"publishing-commands.md","path":"doc/book/src/commands/publishing-commands.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/publishing-commands.md","title":"Command: /publishing-commands","category":"command-prompt","format":"markdown","content":"# Publishing Commands\n* [cargo login](cargo-login.md)\n* [cargo logout](cargo-logout.md)\n* [cargo owner](cargo-owner.md)\n* [cargo package](cargo-package.md)\n* [cargo publish](cargo-publish.md)\n* [cargo yank](cargo-yank.md)\n","isInternal":false,"tokens":61,"sizeBytes":222},{"name":"report-commands.md","path":"doc/book/src/commands/report-commands.md","rawUrl":"https://raw.githubusercontent.com/rust-lang/cargo/HEAD/doc/book/src/commands/report-commands.md","title":"Command: /report-commands","category":"command-prompt","format":"markdown","content":"# Report Commands\n\n* [cargo report](cargo-report.md)\n* [cargo report future-incompatibilities](cargo-report-future-incompatibilities.md)\n","isInternal":false,"tokens":31,"sizeBytes":137}],"systemPromptSnippet":"<yakaai_skills repo=\"rust-lang/cargo\">\n<!-- File: doc/book/src/commands/build-commands.md (Tokens: ~142 | Category: command-prompt) -->\n# Build Commands\n* [cargo bench](cargo-bench.md)\n* [cargo build](cargo-build.md)\n* [cargo check](cargo-check.md)\n* [cargo clean](cargo-clean.md)\n* [cargo clippy](cargo-clippy.md)\n* [cargo doc](cargo-doc.md)\n* [cargo fetch](cargo-fetch.md)\n* [cargo fix](cargo-fix.md)\n* [cargo fmt](cargo-fmt.md)\n* [cargo miri](cargo-miri.md)\n* [cargo run](cargo-run.md)\n* [cargo rustc](cargo-rustc.md)\n* [cargo rustdoc](cargo-rustdoc.md)\n* [cargo test](cargo-test.md)\n\n<!-- File: doc/book/src/commands/cargo-add.md (Tokens: ~4146 | Category: command-prompt) -->\n# cargo-add(1)\n## NAME\n\ncargo-add --- Add dependencies to a Cargo.toml manifest file\n\n## SYNOPSIS\n\n`cargo add` [_options_] _crate_...\\\n`cargo add` [_options_] `--path` _path_\\\n`cargo add` [_options_] `--git` _url_ [_crate_...]\n\n\n## DESCRIPTION\n\nThis command can add or modify dependencies.\n\nThe source for the dependency can be specified with:\n\n* _crate_`@`_version_: Fetch from a registry with a version constraint of \"_version_\"\n* `--path` _path_: Fetch from the specified _path_\n* `--git` _url_: Pull from a git repo at _url_\n\nIf no source is specified, then a best effort will be made to select one, including:\n\n* Existing dependencies in other tables (like `dev-dependencies`)\n* Workspace members\n* Latest release in the registry\n\nWhen you add a package that is already present, the existing entry will be updated with the flags specified.\n\nUpon successful invocation, the enabled (`+`) and disabled (`-`) [features] of the specified\ndependency will be listed in the command's output.\n\n[features]: ../reference/features.html\n\n## OPTIONS\n\n### Source options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---git\"><a class=\"option-anchor\" href=\"#option-cargo-add---git\"><code>--git</code> <em>url</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories\">Git URL to add the specified crate from</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---branch\"><a class=\"option-anchor\" href=\"#option-cargo-add---branch\"><code>--branch</code> <em>branch</em></a></dt>\n<dd class=\"option-desc\"><p>Branch to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---tag\"><a class=\"option-anchor\" href=\"#option-cargo-add---tag\"><code>--tag</code> <em>tag</em></a></dt>\n<dd class=\"option-desc\"><p>Tag to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---rev\"><a class=\"option-anchor\" href=\"#option-cargo-add---rev\"><code>--rev</code> <em>sha</em></a></dt>\n<dd class=\"option-desc\"><p>Specific commit to use when adding from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---path\"><a class=\"option-anchor\" href=\"#option-cargo-add---path\"><code>--path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#specifying-path-dependencies\">Filesystem path</a> to local crate to add.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---base\"><a class=\"option-anchor\" href=\"#option-cargo-add---base\"><code>--base</code> <em>base</em></a></dt>\n<dd class=\"option-desc\"><p>The <a href=\"../reference/unstable.html#path-bases\">path base</a> to use when adding a local crate.</p>\n<p><a href=\"../reference/unstable.html#path-bases\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---registry\"><a class=\"option-anchor\" href=\"#option-cargo-add---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Section options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---dev\"><a class=\"option-anchor\" href=\"#option-cargo-add---dev\"><code>--dev</code></a></dt>\n<dd class=\"option-desc\"><p>Add as a <a href=\"../reference/specifying-dependencies.html#development-dependencies\">development dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---build\"><a class=\"option-anchor\" href=\"#option-cargo-add---build\"><code>--build</code></a></dt>\n<dd class=\"option-desc\"><p>Add as a <a href=\"../reference/specifying-dependencies.html#build-dependencies\">build dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---target\"><a class=\"option-anchor\" href=\"#option-cargo-add---target\"><code>--target</code> <em>target</em></a></dt>\n<dd class=\"option-desc\"><p>Add as a dependency to the <a href=\"../reference/specifying-dependencies.html#platform-specific-dependencies\">given target platform</a>.</p>\n<p>To avoid unexpected shell expansions, you may use quotes around each target, e.g., <code>--target 'cfg(unix)'</code>.</p>\n</dd>\n\n\n</dl>\n\n### Dependency options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-add---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t actually write the manifest</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---rename\"><a class=\"option-anchor\" href=\"#option-cargo-add---rename\"><code>--rename</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p><a href=\"../reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml\">Rename</a> the dependency.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---optional\"><a class=\"option-anchor\" href=\"#option-cargo-add---optional\"><code>--optional</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as <a href=\"../reference/features.html#optional-dependencies\">optional</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-optional\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-optional\"><code>--no-optional</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as <a href=\"../reference/features.html#optional-dependencies\">required</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---public\"><a class=\"option-anchor\" href=\"#option-cargo-add---public\"><code>--public</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as public.</p>\n<p>The dependency can be referenced in your library’s public API.</p>\n<p><a href=\"../reference/unstable.html#public-dependency\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-public\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-public\"><code>--no-public</code></a></dt>\n<dd class=\"option-desc\"><p>Mark the dependency as private.</p>\n<p>While you can use the crate in your implementation, it cannot be referenced in your public API.</p>\n<p><a href=\"../reference/unstable.html#public-dependency\">Unstable (nightly-only)</a></p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-add---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Disable the <a href=\"../reference/features.html#dependency-features\">default features</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---default-features\"><a class=\"option-anchor\" href=\"#option-cargo-add---default-features\"><code>--default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Re-enable the <a href=\"../reference/features.html#dependency-features\">default features</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--F\"><a class=\"option-anchor\" href=\"#option-cargo-add--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---features\"><a class=\"option-anchor\" href=\"#option-cargo-add---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of <a href=\"../reference/features.html#dependency-features\">features to\nactivate</a>. When adding multiple\ncrates, the features for a specific crate may be enabled with\n<code>package-name/feature-name</code> syntax. This flag may be specified multiple times,\nwhich enables all specified features.</p>\n</dd>\n\n\n</dl>\n\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-add--v\"><a class=\"option-anchor\" href=\"#option-cargo-add--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-add---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--q\"><a class=\"option-anchor\" href=\"#option-cargo-add--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-add---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---color\"><a class=\"option-anchor\" href=\"#option-cargo-add---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-add---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-add---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--p\"><a class=\"option-anchor\" href=\"#option-cargo-add--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---package\"><a class=\"option-anchor\" href=\"#option-cargo-add---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Add dependencies to only the specified package.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-add---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---locked\"><a class=\"option-anchor\" href=\"#option-cargo-add---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---offline\"><a class=\"option-anchor\" href=\"#option-cargo-add---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-add---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-add-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-add-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add---config\"><a class=\"option-anchor\" href=\"#option-cargo-add---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--C\"><a class=\"option-anchor\" href=\"#option-cargo-add--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--h\"><a class=\"option-anchor\" href=\"#option-cargo-add--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-add---help\"><a class=\"option-anchor\" href=\"#option-cargo-add---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-add--Z\"><a class=\"option-anchor\" href=\"#option-cargo-add--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Add `regex` as a dependency\n\n       cargo add regex\n\n2. Add `trybuild` as a dev-dependency\n\n       cargo add --dev trybuild\n\n3. Add an older version of `nom` as a dependency\n\n       cargo add nom@5\n\n4. Add support for serializing data structures to json with `derive`s\n\n       cargo add serde serde_json -F serde/derive\n\n5. Add `windows` as a platform specific dependency on `cfg(windows)`\n\n       cargo add windows --target 'cfg(windows)'\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-remove(1)](cargo-remove.html)\n\n<!-- File: doc/book/src/commands/cargo-bench.md (Tokens: ~6715 | Category: command-prompt) -->\n# cargo-bench(1)\n## NAME\n\ncargo-bench --- Execute benchmarks of a package\n\n## SYNOPSIS\n\n`cargo bench` [_options_] [_benchname_] [`--` _bench-options_]\n\n## DESCRIPTION\n\nCompile and execute benchmarks.\n\nThe benchmark filtering argument _benchname_ and all the arguments following\nthe two dashes (`--`) are passed to the benchmark binaries and thus to\n_libtest_ (rustc's built in unit-test and micro-benchmarking framework). If\nyou are passing arguments to both Cargo and the binary, the ones after `--` go\nto the binary, the ones before go to Cargo. For details about libtest's\narguments see the output of `cargo bench -- --help` and check out the rustc\nbook's chapter on how tests work at\n<https://doc.rust-lang.org/rustc/tests/index.html>.\n\nAs an example, this will run only the benchmark named `foo` (and skip other\nsimilarly named benchmarks like `foobar`):\n\n    cargo bench -- foo --exact\n\nBenchmarks are built with the `--test` option to `rustc` which creates a\nspecial executable by linking your code with libtest. The executable\nautomatically runs all functions annotated with the `#[bench]` attribute.\nCargo passes the `--bench` flag to the test harness to tell it to run\nonly benchmarks, regardless of whether the harness is libtest or a custom harness.\n\nThe libtest harness may be disabled by setting `harness = false` in the target\nmanifest settings, in which case your code will need to provide its own `main`\nfunction to handle running benchmarks.\n\n> **Note**: The\n> [`#[bench]` attribute](https://doc.rust-lang.org/nightly/unstable-book/library-features/test.html)\n> is currently unstable and only available on the\n> [nightly channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html).\n> There are some packages available on\n> [crates.io](https://crates.io/keywords/benchmark) that may help with\n> running benchmarks on the stable channel, such as\n> [Criterion](https://crates.io/crates/criterion).\n\nBy default, `cargo bench` uses the [`bench` profile], which enables\noptimizations and disables debugging information. If you need to debug a\nbenchmark, you can use the `--profile=debug` command-line option to switch to\nthe debug profile. You can then run the debug-enabled benchmark within a\ndebugger.\n\n[`bench` profile]: ../reference/profiles.html#bench\n\n### Working directory of benchmarks\n\nThe working directory of every benchmark is set to the root directory of the \npackage the benchmark belongs to.\nSetting the working directory of benchmarks to the package's root directory \nmakes it possible for benchmarks to reliably access the package's files using \nrelative paths, regardless from where `cargo bench` was executed from.\n\n## OPTIONS\n\n### Benchmark Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-run\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-run\"><code>--no-run</code></a></dt>\n<dd class=\"option-desc\"><p>Compile, but don’t run benchmarks.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-fail-fast\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-fail-fast\"><code>--no-fail-fast</code></a></dt>\n<dd class=\"option-desc\"><p>Run all benchmarks regardless of failure. Without this flag, Cargo will exit\nafter the first executable fails. The Rust test harness will run all benchmarks\nwithin the executable to completion, this flag only applies to the executable\nas a whole.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--p\"><a class=\"option-anchor\" href=\"#option-cargo-bench--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---package\"><a class=\"option-anchor\" href=\"#option-cargo-bench---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-bench---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-bench---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo bench` will build the\nfollowing targets of the selected packages:\n\n- lib --- used to link with binaries and benchmarks\n- bins (only if benchmark targets are built and required features are\n  available)\n- lib as a benchmark\n- bins as benchmarks\n- benchmark targets\n\nThe default behavior can be changed by setting the `bench` flag for the target\nin the manifest settings. Setting examples to `bench = true` will build and\nrun the example as a benchmark, replacing the example's `main` function with\nthe libtest harness.\n\nSetting targets to `bench = false` will stop them from being benchmarked by\ndefault. Target selection options that take a target by name (such as\n`--example foo`) ignore the `bench` flag and will always benchmark the given\ntarget.\n\nSee [Configuring a target](../reference/cargo-targets.html#configuring-a-target)\nfor more information on per-target settings.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to benchmark. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will benchmark only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---lib\"><a class=\"option-anchor\" href=\"#option-cargo-bench---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bin\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bins\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---example\"><a class=\"option-anchor\" href=\"#option-cargo-bench---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---examples\"><a class=\"option-anchor\" href=\"#option-cargo-bench---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---test\"><a class=\"option-anchor\" href=\"#option-cargo-bench---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---tests\"><a class=\"option-anchor\" href=\"#option-cargo-bench---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---bench\"><a class=\"option-anchor\" href=\"#option-cargo-bench---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Benchmark the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---benches\"><a class=\"option-anchor\" href=\"#option-cargo-bench---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Benchmark all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--F\"><a class=\"option-anchor\" href=\"#option-cargo-bench--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-bench---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench---target\"><a class=\"option-anchor\" href=\"#option-cargo-bench---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Benchmark for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---profile\"><a class=\"option-anchor\" href=\"#option-cargo-bench---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Benchmark with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---timings\"><a class=\"option-anchor\" href=\"#option-cargo-bench---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-bench---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\nBy default the Rust test harness hides output from benchmark execution to keep\nresults readable. Benchmark output can be recovered (e.g., for debugging) by\npassing `--no-capture` to the benchmark binaries:\n\n    cargo bench -- --no-capture\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench--v\"><a class=\"option-anchor\" href=\"#option-cargo-bench--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-bench---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--q\"><a class=\"option-anchor\" href=\"#option-cargo-bench--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-bench---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---color\"><a class=\"option-anchor\" href=\"#option-cargo-bench---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-bench---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-bench---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-bench---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---locked\"><a class=\"option-anchor\" href=\"#option-cargo-bench---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---offline\"><a class=\"option-anchor\" href=\"#option-cargo-bench---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-bench---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-bench-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-bench-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench---config\"><a class=\"option-anchor\" href=\"#option-cargo-bench---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--C\"><a class=\"option-anchor\" href=\"#option-cargo-bench--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--h\"><a class=\"option-anchor\" href=\"#option-cargo-bench--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---help\"><a class=\"option-anchor\" href=\"#option-cargo-bench---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-bench--Z\"><a class=\"option-anchor\" href=\"#option-cargo-bench--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\nThe `--jobs` argument affects the building of the benchmark executable but\ndoes not affect how many threads are used when running the benchmarks. The\nRust test harness runs benchmarks serially in a single thread.\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-bench--j\"><a class=\"option-anchor\" href=\"#option-cargo-bench--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-bench---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-bench---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n</dl>\n\nWhile `cargo bench` involves compilation, it does not provide a `--keep-going`\nflag. Use `--no-fail-fast` to run as many benchmarks as possible without\nstopping at the first failure. To \"compile\" as many benchmarks as possible, use\n`--benches` to build benchmark binaries separately. For example:\n\n    cargo build --benches --release --keep-going\n    cargo bench --no-fail-fast\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build and execute all the benchmarks of the current package:\n\n       cargo bench\n\n2. Run only a specific benchmark within a specific benchmark target:\n\n       cargo bench --bench bench_name -- modname::some_benchmark\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-test(1)](cargo-test.html)\n\n<!-- File: doc/book/src/commands/cargo-build.md (Tokens: ~6095 | Category: command-prompt) -->\n# cargo-build(1)\n## NAME\n\ncargo-build --- Compile the current package\n\n## SYNOPSIS\n\n`cargo build` [_options_]\n\n## DESCRIPTION\n\nCompile local packages and all of their dependencies.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build--p\"><a class=\"option-anchor\" href=\"#option-cargo-build--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---package\"><a class=\"option-anchor\" href=\"#option-cargo-build---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-build---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Build all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all\"><a class=\"option-anchor\" href=\"#option-cargo-build---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-build---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo build` will build all\nbinary and library targets of the selected packages. Binaries are skipped if\nthey have `required-features` that are missing.\n\nBinary targets are automatically built if there is an integration test or\nbenchmark being selected to build. This allows an integration\ntest to execute the binary to exercise and test its behavior. \nThe `CARGO_BIN_EXE_<name>`\n[environment variable](../reference/environment-variables.html#environment-variables-cargo-sets-for-crates)\nis set when the integration test is built and run so that it can use the\n[`env` macro](https://doc.rust-lang.org/std/macro.env.html) or the \n[`var` function](https://doc.rust-lang.org/std/env/fn.var.html) to locate the\nexecutable.\n\nPassing target selection flags will build only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build---lib\"><a class=\"option-anchor\" href=\"#option-cargo-build---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Build the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bin\"><a class=\"option-anchor\" href=\"#option-cargo-build---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bins\"><a class=\"option-anchor\" href=\"#option-cargo-build---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Build all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---example\"><a class=\"option-anchor\" href=\"#option-cargo-build---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---examples\"><a class=\"option-anchor\" href=\"#option-cargo-build---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Build all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---test\"><a class=\"option-anchor\" href=\"#option-cargo-build---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---tests\"><a class=\"option-anchor\" href=\"#option-cargo-build---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---bench\"><a class=\"option-anchor\" href=\"#option-cargo-build---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Build the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---benches\"><a class=\"option-anchor\" href=\"#option-cargo-build---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-build---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Build all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build--F\"><a class=\"option-anchor\" href=\"#option-cargo-build--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---features\"><a class=\"option-anchor\" href=\"#option-cargo-build---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-build---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-build---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build---target\"><a class=\"option-anchor\" href=\"#option-cargo-build---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Build for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--r\"><a class=\"option-anchor\" href=\"#option-cargo-build--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---release\"><a class=\"option-anchor\" href=\"#option-cargo-build---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Build optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---profile\"><a class=\"option-anchor\" href=\"#option-cargo-build---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Build with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---timings\"><a class=\"option-anchor\" href=\"#option-cargo-build---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-build---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---artifact-dir\"><a class=\"option-anchor\" href=\"#option-cargo-build---artifact-dir\"><code>--artifact-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Copy final artifacts to this directory.</p>\n<p>This option is unstable and available only on the\n<a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.\nSee <a href=\"https://github.com/rust-lang/cargo/issues/6790\">https://github.com/rust-lang/cargo/issues/6790</a> for more information.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build--v\"><a class=\"option-anchor\" href=\"#option-cargo-build--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-build---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--q\"><a class=\"option-anchor\" href=\"#option-cargo-build--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-build---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---color\"><a class=\"option-anchor\" href=\"#option-cargo-build---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-build---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-build---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-build---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---locked\"><a class=\"option-anchor\" href=\"#option-cargo-build---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---offline\"><a class=\"option-anchor\" href=\"#option-cargo-build---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-build---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-build-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-build-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build---config\"><a class=\"option-anchor\" href=\"#option-cargo-build---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--C\"><a class=\"option-anchor\" href=\"#option-cargo-build--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--h\"><a class=\"option-anchor\" href=\"#option-cargo-build--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---help\"><a class=\"option-anchor\" href=\"#option-cargo-build---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-build--Z\"><a class=\"option-anchor\" href=\"#option-cargo-build--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-build--j\"><a class=\"option-anchor\" href=\"#option-cargo-build--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-build---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-build---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-build---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-build---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo build -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo build -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-build---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-build---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package and all of its dependencies:\n\n       cargo build\n\n2. Build with optimizations:\n\n       cargo build --release\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-rustc(1)](cargo-rustc.html)\n\n<!-- File: doc/book/src/commands/cargo-check.md (Tokens: ~5955 | Category: command-prompt) -->\n# cargo-check(1)\n## NAME\n\ncargo-check --- Check the current package\n\n## SYNOPSIS\n\n`cargo check` [_options_]\n\n## DESCRIPTION\n\nCheck a local package and all of its dependencies for errors. This will\nessentially compile the packages without performing the final step of code\ngeneration, which is faster than running `cargo build`. The compiler will save\nmetadata files to disk so that future runs will reuse them if the source has\nnot been modified. Some diagnostics and errors are only emitted during code\ngeneration, so they inherently won't be reported with `cargo check`.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check--p\"><a class=\"option-anchor\" href=\"#option-cargo-check--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---package\"><a class=\"option-anchor\" href=\"#option-cargo-check---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-check---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Check all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all\"><a class=\"option-anchor\" href=\"#option-cargo-check---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-check---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo check` will check all\nbinary and library targets of the selected packages. Binaries are skipped if\nthey have `required-features` that are missing.\n\nPassing target selection flags will check only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check---lib\"><a class=\"option-anchor\" href=\"#option-cargo-check---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Check the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bin\"><a class=\"option-anchor\" href=\"#option-cargo-check---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bins\"><a class=\"option-anchor\" href=\"#option-cargo-check---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Check all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---example\"><a class=\"option-anchor\" href=\"#option-cargo-check---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---examples\"><a class=\"option-anchor\" href=\"#option-cargo-check---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Check all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---test\"><a class=\"option-anchor\" href=\"#option-cargo-check---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---tests\"><a class=\"option-anchor\" href=\"#option-cargo-check---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---bench\"><a class=\"option-anchor\" href=\"#option-cargo-check---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Check the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---benches\"><a class=\"option-anchor\" href=\"#option-cargo-check---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-check---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Check all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check--F\"><a class=\"option-anchor\" href=\"#option-cargo-check--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---features\"><a class=\"option-anchor\" href=\"#option-cargo-check---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-check---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-check---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check---target\"><a class=\"option-anchor\" href=\"#option-cargo-check---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Check for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--r\"><a class=\"option-anchor\" href=\"#option-cargo-check--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---release\"><a class=\"option-anchor\" href=\"#option-cargo-check---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Check optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---profile\"><a class=\"option-anchor\" href=\"#option-cargo-check---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Check with the given profile.</p>\n<p>As a special case, specifying the <code>test</code> profile will also enable checking in\ntest mode which will enable checking tests and enable the <code>test</code> cfg option.\nSee <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc tests</a> for more\ndetail.</p>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---timings\"><a class=\"option-anchor\" href=\"#option-cargo-check---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-check---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check--v\"><a class=\"option-anchor\" href=\"#option-cargo-check--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-check---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--q\"><a class=\"option-anchor\" href=\"#option-cargo-check--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-check---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---color\"><a class=\"option-anchor\" href=\"#option-cargo-check---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-check---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-check---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-check---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---locked\"><a class=\"option-anchor\" href=\"#option-cargo-check---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---offline\"><a class=\"option-anchor\" href=\"#option-cargo-check---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-check---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-check-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-check-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check---config\"><a class=\"option-anchor\" href=\"#option-cargo-check---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--C\"><a class=\"option-anchor\" href=\"#option-cargo-check--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--h\"><a class=\"option-anchor\" href=\"#option-cargo-check--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---help\"><a class=\"option-anchor\" href=\"#option-cargo-check---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-check--Z\"><a class=\"option-anchor\" href=\"#option-cargo-check--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-check--j\"><a class=\"option-anchor\" href=\"#option-cargo-check--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-check---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-check---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-check---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-check---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo check -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo check -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-check---future-incompat-report\"><a class=\"option-anchor\" href=\"#option-cargo-check---future-incompat-report\"><code>--future-incompat-report</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a future-incompat report for any future-incompatible warnings\nproduced during execution of this command</p>\n<p>See <a href=\"cargo-report.html\">cargo-report(1)</a></p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Check the local package for errors:\n\n       cargo check\n\n2. Check all targets, including unit tests:\n\n       cargo check --all-targets --profile=test\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n\n<!-- File: doc/book/src/commands/cargo-clean.md (Tokens: ~2938 | Category: command-prompt) -->\n# cargo-clean(1)\n## NAME\n\ncargo-clean --- Remove generated artifacts\n\n## SYNOPSIS\n\n`cargo clean` [_options_]\n\n## DESCRIPTION\n\nRemove artifacts from the target directory that Cargo has generated in the\npast.\n\nWith no options, `cargo clean` will delete the entire target directory.\n\n## OPTIONS\n\n### Package Selection\n\nWhen no packages are selected, all packages and all dependencies in the\nworkspace are cleaned.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean--p\"><a class=\"option-anchor\" href=\"#option-cargo-clean--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---package\"><a class=\"option-anchor\" href=\"#option-cargo-clean---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Clean only the specified packages. This flag may be specified\nmultiple times. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC format.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-clean---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Clean artifacts of the workspace members.</p>\n</dd>\n\n\n</dl>\n\n### Clean Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-clean---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Displays a summary of what would be deleted without deleting anything.\nUse with <code>--verbose</code> to display the actual files that would be deleted.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---doc\"><a class=\"option-anchor\" href=\"#option-cargo-clean---doc\"><code>--doc</code></a></dt>\n<dd class=\"option-desc\"><p>This option will cause <code>cargo clean</code> to remove only the <code>doc</code> directory in\nthe target directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---release\"><a class=\"option-anchor\" href=\"#option-cargo-clean---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Remove artifacts only in the <code>release</code> directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---profile\"><a class=\"option-anchor\" href=\"#option-cargo-clean---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Remove artifacts only in the directory with the given profile name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-clean---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---target\"><a class=\"option-anchor\" href=\"#option-cargo-clean---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Clean for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-clean--v\"><a class=\"option-anchor\" href=\"#option-cargo-clean--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-clean---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--q\"><a class=\"option-anchor\" href=\"#option-cargo-clean--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-clean---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---color\"><a class=\"option-anchor\" href=\"#option-cargo-clean---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-clean---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-clean---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---locked\"><a class=\"option-anchor\" href=\"#option-cargo-clean---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---offline\"><a class=\"option-anchor\" href=\"#option-cargo-clean---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-clean---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-clean-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-clean-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean---config\"><a class=\"option-anchor\" href=\"#option-cargo-clean---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--C\"><a class=\"option-anchor\" href=\"#option-cargo-clean--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--h\"><a class=\"option-anchor\" href=\"#option-cargo-clean--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-clean---help\"><a class=\"option-anchor\" href=\"#option-cargo-clean---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-clean--Z\"><a class=\"option-anchor\" href=\"#option-cargo-clean--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove the entire target directory:\n\n       cargo clean\n\n2. Remove only the release artifacts:\n\n       cargo clean --release\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n\n<!-- File: doc/book/src/commands/cargo-clippy.md (Tokens: ~131 | Category: command-prompt) -->\n# cargo-clippy(1)\n\n## NAME\n\ncargo-clippy --- Checks a package to catch common mistakes and improve your Rust code\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nFor information about usage and installation,\nsee [Clippy Documentation](../../clippy/index.html).\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-fix(1)](cargo-fix.md),\n[cargo-fmt(1)](cargo-fmt.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n\n<!-- File: doc/book/src/commands/cargo-doc.md (Tokens: ~5647 | Category: command-prompt) -->\n# cargo-doc(1)\n## NAME\n\ncargo-doc --- Build a package's documentation\n\n## SYNOPSIS\n\n`cargo doc` [_options_]\n\n## DESCRIPTION\n\nBuild the documentation for the local package and all dependencies. The output\nis placed in `target/doc` in rustdoc's usual format.\n\n**Note:** Documentation generation is cumulative: existing doc files in the target directory are preserved across different `cargo doc` invocations. To remove existing generated docs, pass `--doc` to [cargo-clean(1)](cargo-clean.html).\n\n## OPTIONS\n\n### Documentation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---open\"><a class=\"option-anchor\" href=\"#option-cargo-doc---open\"><code>--open</code></a></dt>\n<dd class=\"option-desc\"><p>Open the docs in a browser after building them. This will use your default\nbrowser unless you define another one in the <code>BROWSER</code> environment variable\nor use the <a href=\"../reference/config.html#docbrowser\"><code>doc.browser</code></a> configuration\noption.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---no-deps\"><a class=\"option-anchor\" href=\"#option-cargo-doc---no-deps\"><code>--no-deps</code></a></dt>\n<dd class=\"option-desc\"><p>Do not build documentation for dependencies.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---document-private-items\"><a class=\"option-anchor\" href=\"#option-cargo-doc---document-private-items\"><code>--document-private-items</code></a></dt>\n<dd class=\"option-desc\"><p>Include non-public items in the documentation. This will be enabled by default if documenting a binary target.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc--p\"><a class=\"option-anchor\" href=\"#option-cargo-doc--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---package\"><a class=\"option-anchor\" href=\"#option-cargo-doc---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-doc---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Document all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---all\"><a class=\"option-anchor\" href=\"#option-cargo-doc---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-doc---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo doc` will document all\nbinary and library targets of the selected package. The binary will be skipped\nif its name is the same as the lib target. Binaries are skipped if they have\n`required-features` that are missing.\n\nThe default behavior can be changed by setting `doc = false` for the target in\nthe manifest settings. Using target selection options will ignore the `doc`\nflag and will always document the given target.\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---lib\"><a class=\"option-anchor\" href=\"#option-cargo-doc---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Document the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---bin\"><a class=\"option-anchor\" href=\"#option-cargo-doc---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---bins\"><a class=\"option-anchor\" href=\"#option-cargo-doc---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Document all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---example\"><a class=\"option-anchor\" href=\"#option-cargo-doc---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Document the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---examples\"><a class=\"option-anchor\" href=\"#option-cargo-doc---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Document all example targets.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc--F\"><a class=\"option-anchor\" href=\"#option-cargo-doc--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-doc---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---target\"><a class=\"option-anchor\" href=\"#option-cargo-doc---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Document for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--r\"><a class=\"option-anchor\" href=\"#option-cargo-doc--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---release\"><a class=\"option-anchor\" href=\"#option-cargo-doc---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Document optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---profile\"><a class=\"option-anchor\" href=\"#option-cargo-doc---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Document with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---timings\"><a class=\"option-anchor\" href=\"#option-cargo-doc---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-doc---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc--v\"><a class=\"option-anchor\" href=\"#option-cargo-doc--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-doc---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--q\"><a class=\"option-anchor\" href=\"#option-cargo-doc--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-doc---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---color\"><a class=\"option-anchor\" href=\"#option-cargo-doc---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-doc---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-doc---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-doc---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---locked\"><a class=\"option-anchor\" href=\"#option-cargo-doc---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---offline\"><a class=\"option-anchor\" href=\"#option-cargo-doc---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-doc---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-doc-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-doc-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc---config\"><a class=\"option-anchor\" href=\"#option-cargo-doc---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--C\"><a class=\"option-anchor\" href=\"#option-cargo-doc--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--h\"><a class=\"option-anchor\" href=\"#option-cargo-doc--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---help\"><a class=\"option-anchor\" href=\"#option-cargo-doc---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-doc--Z\"><a class=\"option-anchor\" href=\"#option-cargo-doc--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-doc--j\"><a class=\"option-anchor\" href=\"#option-cargo-doc--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-doc---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-doc---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-doc---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo doc -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo doc -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-doc---output-format\"><a class=\"option-anchor\" href=\"#option-cargo-doc---output-format\"><code>--output-format</code></a></dt>\n<dd class=\"option-desc\"><p>The output type for the documentation emitted. Valid values:</p>\n<ul>\n<li><code>html</code> (default): Emit the documentation in HTML format.</li>\n<li><code>json</code>: Emit the documentation in the <a href=\"https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types\">experimental JSON format</a>.</li>\n</ul>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly channel</a>\nand requires the <code>-Z unstable-options</code> flag to enable.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package documentation and its dependencies and output to\n   `target/doc`.\n\n       cargo doc\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-rustdoc(1)](cargo-rustdoc.html), [rustdoc(1)](https://doc.rust-lang.org/rustdoc/index.html)\n\n<!-- File: doc/book/src/commands/cargo-fetch.md (Tokens: ~2292 | Category: command-prompt) -->\n# cargo-fetch(1)\n## NAME\n\ncargo-fetch --- Fetch dependencies of a package from the network\n\n## SYNOPSIS\n\n`cargo fetch` [_options_]\n\n## DESCRIPTION\n\nIf a `Cargo.lock` file is available, this command will ensure that all of the\ngit dependencies and/or registry dependencies are downloaded and locally\navailable. Subsequent Cargo commands will be able to run offline after a `cargo\nfetch` unless the lock file changes.\n\nIf the lock file is not available, then this command will generate the lock\nfile before fetching the dependencies.\n\nIf `--target` is not specified, then all target dependencies are fetched.\n\n## OPTIONS\n\n### Fetch options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch---target\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Fetch for the specified target architecture. Flag may be specified multiple times. The default is all architectures. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch--v\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--q\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---color\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fetch---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---locked\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---offline\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fetch-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-fetch-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch---config\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--C\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--h\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fetch---help\"><a class=\"option-anchor\" href=\"#option-cargo-fetch---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fetch--Z\"><a class=\"option-anchor\" href=\"#option-cargo-fetch--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Fetch all dependencies:\n\n       cargo fetch\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-update(1)](cargo-update.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html)\n\n<!-- File: doc/book/src/commands/cargo-fix.md (Tokens: ~6867 | Category: command-prompt) -->\n# cargo-fix(1)\n## NAME\n\ncargo-fix --- Automatically fix lint warnings reported by rustc\n\n## SYNOPSIS\n\n`cargo fix` [_options_]\n\n## DESCRIPTION\n\nThis Cargo subcommand will automatically take rustc's suggestions from\ndiagnostics like warnings and apply them to your source code. This is intended\nto help automate tasks that rustc itself already knows how to tell you to fix!\n\nExecuting `cargo fix` will under the hood execute [cargo-check(1)](cargo-check.html). Any warnings\napplicable to your crate will be automatically fixed (if possible) and all\nremaining warnings will be displayed when the check process is finished. For\nexample if you'd like to apply all fixes to the current package, you can run:\n\n    cargo fix\n\nwhich behaves the same as `cargo check --all-targets`.\n\n`cargo fix` is only capable of fixing code that is normally compiled with\n`cargo check`. If code is conditionally enabled with optional features, you\nwill need to enable those features for that code to be analyzed:\n\n    cargo fix --features foo\n\nSimilarly, other `cfg` expressions like platform-specific code will need to\npass `--target` to fix code for the given target.\n\n    cargo fix --target x86_64-pc-windows-gnu\n\nIf you encounter any problems with `cargo fix` or otherwise have any questions\nor feature requests please don't hesitate to file an issue at\n<https://github.com/rust-lang/cargo>.\n\n### Edition migration\n\nThe `cargo fix` subcommand can also be used to migrate a package from one\n[edition] to the next. The general procedure is:\n\n1. Run `cargo fix --edition`. Consider also using the `--all-features` flag if\n   your project has multiple features. You may also want to run `cargo fix\n   --edition` multiple times with different `--target` flags if your project\n   has platform-specific code gated by `cfg` attributes.\n2. Modify `Cargo.toml` to set the [edition field] to the new edition.\n3. Run your project tests to verify that everything still works. If new\n   warnings are issued, you may want to consider running `cargo fix` again\n   (without the `--edition` flag) to apply any suggestions given by the\n   compiler.\n\nAnd hopefully that's it! Just keep in mind of the caveats mentioned above that\n`cargo fix` cannot update code for inactive features or `cfg` expressions.\nAlso, in some rare cases the compiler is unable to automatically migrate all\ncode to the new edition, and this may require manual changes after building\nwith the new edition.\n\n[edition]: https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html\n[edition field]: ../reference/manifest.html#the-edition-field\n\n## OPTIONS\n\n### Fix options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---broken-code\"><a class=\"option-anchor\" href=\"#option-cargo-fix---broken-code\"><code>--broken-code</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if it already has compiler errors. This is useful if <code>cargo fix</code>\nfails to apply the changes. It will apply the changes and leave the broken\ncode in the working directory for you to inspect and manually fix.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---edition\"><a class=\"option-anchor\" href=\"#option-cargo-fix---edition\"><code>--edition</code></a></dt>\n<dd class=\"option-desc\"><p>Apply changes that will update the code to the next edition. This will not\nupdate the edition in the <code>Cargo.toml</code> manifest, which must be updated\nmanually after <code>cargo fix --edition</code> has finished.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---edition-idioms\"><a class=\"option-anchor\" href=\"#option-cargo-fix---edition-idioms\"><code>--edition-idioms</code></a></dt>\n<dd class=\"option-desc\"><p>Apply suggestions that will update code to the preferred style for the current\nedition.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-no-vcs\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-no-vcs\"><code>--allow-no-vcs</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if a VCS was not detected.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if the working directory has changes (including staged changes).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---allow-staged\"><a class=\"option-anchor\" href=\"#option-cargo-fix---allow-staged\"><code>--allow-staged</code></a></dt>\n<dd class=\"option-desc\"><p>Fix code even if the working directory has staged changes.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix--p\"><a class=\"option-anchor\" href=\"#option-cargo-fix--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---package\"><a class=\"option-anchor\" href=\"#option-cargo-fix---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-fix---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-fix---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo fix` will fix all targets\n(`--all-targets` implied). Binaries are skipped if they have\n`required-features` that are missing.\n\nPassing target selection flags will fix only the specified\ntargets. \n\nNote that `--bin`, `--example`, `--test` and `--bench` flags also \nsupport common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your \nshell accidentally expanding glob patterns before Cargo handles them, you must \nuse single quotes or double quotes around each glob pattern.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---lib\"><a class=\"option-anchor\" href=\"#option-cargo-fix---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Fix the package’s library.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bin\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified binary. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bins\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all binary targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---example\"><a class=\"option-anchor\" href=\"#option-cargo-fix---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified example. This flag may be specified multiple times\nand supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---examples\"><a class=\"option-anchor\" href=\"#option-cargo-fix---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all example targets.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---test\"><a class=\"option-anchor\" href=\"#option-cargo-fix---test\"><code>--test</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified integration test. This flag may be specified\nmultiple times and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---tests\"><a class=\"option-anchor\" href=\"#option-cargo-fix---tests\"><code>--tests</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets that have the <code>test = true</code> manifest\nflag set. By default this includes the library and binaries built as\nunittests, and integration tests. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nunittest, and once as a dependency for binaries, integration tests, etc.).\nTargets may be enabled or disabled by setting the <code>test</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---bench\"><a class=\"option-anchor\" href=\"#option-cargo-fix---bench\"><code>--bench</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Fix the specified benchmark. This flag may be specified multiple\ntimes and supports common Unix glob patterns.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---benches\"><a class=\"option-anchor\" href=\"#option-cargo-fix---benches\"><code>--benches</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets that have the <code>bench = true</code>\nmanifest flag set. By default this includes the library and binaries built\nas benchmarks, and bench targets. Be aware that this will also build any\nrequired dependencies, so the lib target may be built twice (once as a\nbenchmark, and once as a dependency for binaries, benchmarks, etc.).\nTargets may be enabled or disabled by setting the <code>bench</code> flag in the\nmanifest settings for the target.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all-targets\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all-targets\"><code>--all-targets</code></a></dt>\n<dd class=\"option-desc\"><p>Fix all targets. This is equivalent to specifying <code>--lib --bins --tests --benches --examples</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix--F\"><a class=\"option-anchor\" href=\"#option-cargo-fix--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-fix---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---target\"><a class=\"option-anchor\" href=\"#option-cargo-fix---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Fix for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--r\"><a class=\"option-anchor\" href=\"#option-cargo-fix--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---release\"><a class=\"option-anchor\" href=\"#option-cargo-fix---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Fix optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---profile\"><a class=\"option-anchor\" href=\"#option-cargo-fix---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Fix with the given profile.</p>\n<p>As a special case, specifying the <code>test</code> profile will also enable checking in\ntest mode which will enable checking tests and enable the <code>test</code> cfg option.\nSee <a href=\"https://doc.rust-lang.org/rustc/tests/index.html\">rustc tests</a> for more\ndetail.</p>\n<p>See <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---timings\"><a class=\"option-anchor\" href=\"#option-cargo-fix---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-fix---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix--v\"><a class=\"option-anchor\" href=\"#option-cargo-fix--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-fix---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--q\"><a class=\"option-anchor\" href=\"#option-cargo-fix--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-fix---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---color\"><a class=\"option-anchor\" href=\"#option-cargo-fix---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-fix---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-fix---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-fix---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---locked\"><a class=\"option-anchor\" href=\"#option-cargo-fix---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---offline\"><a class=\"option-anchor\" href=\"#option-cargo-fix---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-fix---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-fix-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-fix-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix---config\"><a class=\"option-anchor\" href=\"#option-cargo-fix---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--C\"><a class=\"option-anchor\" href=\"#option-cargo-fix--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--h\"><a class=\"option-anchor\" href=\"#option-cargo-fix--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---help\"><a class=\"option-anchor\" href=\"#option-cargo-fix---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-fix--Z\"><a class=\"option-anchor\" href=\"#option-cargo-fix--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-fix--j\"><a class=\"option-anchor\" href=\"#option-cargo-fix--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-fix---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-fix---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-fix---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-fix---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo fix -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo fix -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Apply compiler suggestions to the local package:\n\n       cargo fix\n\n2. Update a package to prepare it for the next edition:\n\n       cargo fix --edition\n\n3. Apply suggested idioms for the current edition:\n\n       cargo fix --edition-idioms\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-check(1)](cargo-check.html)\n\n<!-- File: doc/book/src/commands/cargo-fmt.md (Tokens: ~133 | Category: command-prompt) -->\n# cargo-fmt(1)\n\n## NAME\n\ncargo-fmt --- Formats all bin and lib files of the current crate using rustfmt\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nFor information about usage and installation,\nsee <https://github.com/rust-lang/rustfmt>.\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-fix(1)](cargo-fix.md),\n[cargo-clippy(1)](cargo-clippy.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n\n<!-- File: doc/book/src/commands/cargo-generate-lockfile.md (Tokens: ~2272 | Category: command-prompt) -->\n# cargo-generate-lockfile(1)\n\n## NAME\n\ncargo-generate-lockfile --- Generate the lockfile for a package\n\n## SYNOPSIS\n\n`cargo generate-lockfile` [_options_]\n\n## DESCRIPTION\n\nThis command will create the `Cargo.lock` lockfile for the current package or\nworkspace. If the lockfile already exists, it will be rebuilt with the latest\navailable version of every package.\n\nSee also [cargo-update(1)](cargo-update.html) which is also capable of creating a `Cargo.lock`\nlockfile and has more options for controlling update behavior.\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--v\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--q\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---color\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---publish-time\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---publish-time\"><code>--publish-time</code> <em>yyyy-mm-ddThh:mm:ssZ</em></a></dt>\n<dd class=\"option-desc\"><p>Latest publish time allowed for registry packages (Unstable)</p>\n<p>This is a best-effort filter on allowed packages, including:</p>\n<ul>\n<li>packages from unsupported registries are always accepted</li>\n<li>only the current yank state is respected, not the state as of <code>--publish-time</code></li>\n<li>precision of the publish time</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---locked\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---offline\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---config\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--C\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--h\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile---help\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-generate-lockfile--Z\"><a class=\"option-anchor\" href=\"#option-cargo-generate-lockfile--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create or update the lockfile for the current package or workspace:\n\n       cargo generate-lockfile\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-update(1)](cargo-update.html)\n\n<!-- File: doc/book/src/commands/cargo-help.md (Tokens: ~1924 | Category: command-prompt) -->\n# cargo-help(1)\n\n## NAME\n\ncargo-help --- Get help for a Cargo command\n\n## SYNOPSIS\n\n`cargo help` [_subcommand_]\n\n## DESCRIPTION\n\nPrints a help message for the given command.\n\nFor commands with subcommands, separate the command levels with spaces. For\nexample, `cargo help report future-incompatibilities` displays help for the\n`cargo report future-incompatibilities` command.\n\nSpaces separate hierarchy levels only between a parent command and its\nsubcommands. Dashes that are part of a command's name, such as\n`generate-lockfile`, must always be preserved.\n\nMultiple command levels can also be written as a single dash-joined word.\nFor example, `cargo help report-future-incompatibilities` is equivalent to\n`cargo help report future-incompatibilities`.\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-help--v\"><a class=\"option-anchor\" href=\"#option-cargo-help--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-help---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--q\"><a class=\"option-anchor\" href=\"#option-cargo-help--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-help---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---color\"><a class=\"option-anchor\" href=\"#option-cargo-help---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-help---locked\"><a class=\"option-anchor\" href=\"#option-cargo-help---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---offline\"><a class=\"option-anchor\" href=\"#option-cargo-help---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-help---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-help-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-help-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help---config\"><a class=\"option-anchor\" href=\"#option-cargo-help---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--C\"><a class=\"option-anchor\" href=\"#option-cargo-help--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--h\"><a class=\"option-anchor\" href=\"#option-cargo-help--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-help---help\"><a class=\"option-anchor\" href=\"#option-cargo-help---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-help--Z\"><a class=\"option-anchor\" href=\"#option-cargo-help--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Get help for a command:\n\n       cargo help build\n\n2. Get help for a nested command:\n\n       cargo help report future-incompatibilities\n\n3. The dash-joined form also works:\n\n       cargo help report-future-incompatibilities\n\n4. Help is also available with the `--help` flag:\n\n       cargo build --help\n\n## SEE ALSO\n[cargo(1)](cargo.html)\n\n<!-- File: doc/book/src/commands/cargo-info.md (Tokens: ~2205 | Category: command-prompt) -->\n# cargo-info(1)\n\n## NAME\n\ncargo-info --- Display information about a package.\n\n## SYNOPSIS\n\n`cargo info` [_options_] _spec_\n\n## DESCRIPTION\n\nThis command displays information about a package. It fetches data from the package's Cargo.toml file\nand presents it in a human-readable format.\n\n## OPTIONS\n\n### Info Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-info-spec\"><a class=\"option-anchor\" href=\"#option-cargo-info-spec\"><em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Fetch information about the specified package. The <em>spec</em> can be a package ID, see <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.\nIf the specified package is part of the current workspace, information from the local Cargo.toml file will be displayed.\nIf the <code>Cargo.lock</code> file does not exist, it will be created. If no version is specified, the appropriate version will be\nselected based on the Minimum Supported Rust Version (MSRV).</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-info---index\"><a class=\"option-anchor\" href=\"#option-cargo-info---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-info---registry\"><a class=\"option-anchor\" href=\"#option-cargo-info---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-info--v\"><a class=\"option-anchor\" href=\"#option-cargo-info--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-info---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--q\"><a class=\"option-anchor\" href=\"#option-cargo-info--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-info---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---color\"><a class=\"option-anchor\" href=\"#option-cargo-info---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-info---locked\"><a class=\"option-anchor\" href=\"#option-cargo-info---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---offline\"><a class=\"option-anchor\" href=\"#option-cargo-info---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-info---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-info-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-info-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info---config\"><a class=\"option-anchor\" href=\"#option-cargo-info---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--C\"><a class=\"option-anchor\" href=\"#option-cargo-info--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--h\"><a class=\"option-anchor\" href=\"#option-cargo-info--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-info---help\"><a class=\"option-anchor\" href=\"#option-cargo-info---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-info--Z\"><a class=\"option-anchor\" href=\"#option-cargo-info--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Inspect the `serde` package from crates.io:\n\n        cargo info serde\n2. Inspect the `serde` package with version `1.0.0`:\n\n        cargo info serde@1.0.0\n3. Inspect the `serde` package from the local registry:\n\n        cargo info serde --registry my-registry\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-search(1)](cargo-search.html)\n\n<!-- File: doc/book/src/commands/cargo-init.md (Tokens: ~2086 | Category: command-prompt) -->\n# cargo-init(1)\n\n## NAME\n\ncargo-init --- Create a new Cargo package in an existing directory\n\n## SYNOPSIS\n\n`cargo init` [_options_] [_path_]\n\n## DESCRIPTION\n\nThis command will create a new Cargo manifest in the current directory. Give a\npath as an argument to create in the given directory.\n\nIf there are typically-named Rust source files already in the directory, those\nwill be used. If not, then a sample `src/main.rs` file will be created, or\n`src/lib.rs` if `--lib` is passed.\n\nIf the directory is not already in a VCS repository, then a new repository\nis created (see `--vcs` below).\n\nSee [cargo-new(1)](cargo-new.html) for a similar command which will create a new package in\na new directory.\n\n## OPTIONS\n\n### Init Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-init---bin\"><a class=\"option-anchor\" href=\"#option-cargo-init---bin\"><code>--bin</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a binary target (<code>src/main.rs</code>).\nThis is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---lib\"><a class=\"option-anchor\" href=\"#option-cargo-init---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a library target (<code>src/lib.rs</code>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---edition\"><a class=\"option-anchor\" href=\"#option-cargo-init---edition\"><code>--edition</code> <em>edition</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the Rust edition to use. Default is 2024.\nPossible values: 2015, 2018, 2021, 2024</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---name\"><a class=\"option-anchor\" href=\"#option-cargo-init---name\"><code>--name</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Set the package name. Defaults to the directory name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---vcs\"><a class=\"option-anchor\" href=\"#option-cargo-init---vcs\"><code>--vcs</code> <em>vcs</em></a></dt>\n<dd class=\"option-desc\"><p>Initialize a new VCS repository for the given version control system (git,\nhg, pijul, or fossil) or do not initialize any version control at all\n(none). If not specified, defaults to <code>git</code> or the configuration value\n<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---registry\"><a class=\"option-anchor\" href=\"#option-cargo-init---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name\nwhich will restrict publishing only to that registry.</p>\n<p>Registry names are defined in <a href=\"../reference/config.html\">Cargo config files</a>.\nIf not specified, the default registry defined by the <code>registry.default</code>\nconfig key is used. If the default registry is not set and <code>--registry</code> is not\nused, the <code>publish</code> field will not be set which means that publishing will not\nbe restricted.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-init--v\"><a class=\"option-anchor\" href=\"#option-cargo-init--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-init---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--q\"><a class=\"option-anchor\" href=\"#option-cargo-init--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-init---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---color\"><a class=\"option-anchor\" href=\"#option-cargo-init---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-init-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-init-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init---config\"><a class=\"option-anchor\" href=\"#option-cargo-init---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--C\"><a class=\"option-anchor\" href=\"#option-cargo-init--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--h\"><a class=\"option-anchor\" href=\"#option-cargo-init--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-init---help\"><a class=\"option-anchor\" href=\"#option-cargo-init---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-init--Z\"><a class=\"option-anchor\" href=\"#option-cargo-init--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a binary Cargo package in the current directory:\n\n       cargo init\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-new(1)](cargo-new.html)\n\n<!-- File: doc/book/src/commands/cargo-install.md (Tokens: ~6264 | Category: command-prompt) -->\n# cargo-install(1)\n## NAME\n\ncargo-install --- Build and install a Rust binary\n\n## SYNOPSIS\n\n`cargo install` [_options_] _crate_[@_version_]...\\\n`cargo install` [_options_] `--path` _path_\\\n`cargo install` [_options_] `--git` _url_ [_crate_...]\\\n`cargo install` [_options_] `--list`\n\n## DESCRIPTION\n\nThis command manages Cargo's local set of installed binary crates. Only\npackages which have executable `[[bin]]` or `[[example]]` targets can be\ninstalled, and all executables are installed into the installation root's\n`bin` folder. By default only binaries, not examples, are installed.\n\nThe installation root is determined, in order of precedence:\n\n- `--root` option\n- `CARGO_INSTALL_ROOT` environment variable\n- `install.root` Cargo [config value](../reference/config.html)\n- `CARGO_HOME` environment variable\n- `$HOME/.cargo`\n\nThere are multiple sources from which a crate can be installed. The default\nsource location is crates.io but the `--git`, `--path`, and `--registry` flags\ncan change this source. If the source contains more than one package (such as\ncrates.io or a git repository with multiple crates) the _crate_ argument is\nrequired to indicate which crate should be installed.\n\nCrates from crates.io can optionally specify the version they wish to install\nvia the `--version` flags, and similarly packages from git repositories can\noptionally specify the branch, tag, or revision that should be installed. If a\ncrate has multiple binaries, the `--bin` argument can selectively install only\none of them, and if you'd rather install examples the `--example` argument can\nbe used as well.\n\nIf the package is already installed, Cargo will reinstall it if the installed\nversion does not appear to be up-to-date. If any of the following values\nchange, then Cargo will reinstall the package:\n\n- The package version and source.\n- The set of binary names installed.\n- The chosen features.\n- The profile (`--profile`).\n- The target (`--target`).\n\nInstalling with `--path` will always build and install, unless there are\nconflicting binaries from another package. The `--force` flag may be used to\nforce Cargo to always reinstall the package.\n\nIf the source is crates.io or `--git` then by default the crate will be built\nin a temporary target directory. To avoid this, the target directory can be\nspecified by setting the `CARGO_TARGET_DIR` environment variable to a\npath. In particular, this can be useful for caching build artifacts on\ncontinuous integration systems.\n\n### Dealing with the Lockfile\n\nBy default, Cargo uses the `Cargo.lock` file included with the package if it is\navailable. This ensures that the installed executable uses the dependency versions\nselected when the package was published. If no lockfile is available, including for\npackages published with versions of Cargo before 1.37, Cargo resolves the dependencies\nnormally.\n\nThe `--locked` flag does not currently change dependency resolution for `cargo install`.\nIf no `Cargo.lock` is available, using `--locked` emits a warning.\n\n### Configuration Discovery\n\nThis command operates on system or user level, not project level.\nThis means that the local [configuration discovery] is ignored.\nInstead, the configuration discovery begins at `$CARGO_HOME/config.toml`. \nIf the package is installed with `--path $PATH`, the local configuration \nwill be used, beginning discovery at `$PATH/.cargo/config.toml`.\n\n[configuration discovery]: ../reference/config.html#hierarchical-structure\n\n## OPTIONS\n\n### Install Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install---vers\"><a class=\"option-anchor\" href=\"#option-cargo-install---vers\"><code>--vers</code> <em>version</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---version\"><a class=\"option-anchor\" href=\"#option-cargo-install---version\"><code>--version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>Specify a version to install. This may be a <a href=\"../reference/specifying-dependencies.html\">version\nrequirement</a>, like <code>~1.2</code>, to have Cargo\nselect the newest version from the given requirement. If the version does not\nhave a requirement operator (such as <code>^</code> or <code>~</code>), then it must be in the form\n<em>MAJOR.MINOR.PATCH</em>, and will install exactly that version; it is <em>not</em>\ntreated as a caret requirement like Cargo dependencies are.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---git\"><a class=\"option-anchor\" href=\"#option-cargo-install---git\"><code>--git</code> <em>url</em></a></dt>\n<dd class=\"option-desc\"><p>Git URL to install the specified crate from.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---branch\"><a class=\"option-anchor\" href=\"#option-cargo-install---branch\"><code>--branch</code> <em>branch</em></a></dt>\n<dd class=\"option-desc\"><p>Branch to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---tag\"><a class=\"option-anchor\" href=\"#option-cargo-install---tag\"><code>--tag</code> <em>tag</em></a></dt>\n<dd class=\"option-desc\"><p>Tag to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---rev\"><a class=\"option-anchor\" href=\"#option-cargo-install---rev\"><code>--rev</code> <em>sha</em></a></dt>\n<dd class=\"option-desc\"><p>Specific commit to use when installing from git.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---path\"><a class=\"option-anchor\" href=\"#option-cargo-install---path\"><code>--path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Filesystem path to local crate to install from.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---list\"><a class=\"option-anchor\" href=\"#option-cargo-install---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List all installed packages and their versions.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--n\"><a class=\"option-anchor\" href=\"#option-cargo-install--n\"><code>-n</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-install---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>(unstable) Perform all checks without installing.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--f\"><a class=\"option-anchor\" href=\"#option-cargo-install--f\"><code>-f</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---force\"><a class=\"option-anchor\" href=\"#option-cargo-install---force\"><code>--force</code></a></dt>\n<dd class=\"option-desc\"><p>Force overwriting existing crates or binaries. This can be used if a package\nhas installed a binary with the same name as another package. This is also\nuseful if something has changed on the system that you want to rebuild with,\nsuch as a newer version of <code>rustc</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---no-track\"><a class=\"option-anchor\" href=\"#option-cargo-install---no-track\"><code>--no-track</code></a></dt>\n<dd class=\"option-desc\"><p>By default, Cargo keeps track of the installed packages with a metadata file\nstored in the installation root directory. This flag tells Cargo not to use or\ncreate that file. With this flag, Cargo will refuse to overwrite any existing\nfiles unless the <code>--force</code> flag is used. This also disables Cargo’s ability to\nprotect against multiple concurrent invocations of Cargo installing at the\nsame time.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---bin\"><a class=\"option-anchor\" href=\"#option-cargo-install---bin\"><code>--bin</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Install only the specified binary.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---bins\"><a class=\"option-anchor\" href=\"#option-cargo-install---bins\"><code>--bins</code></a></dt>\n<dd class=\"option-desc\"><p>Install all binaries. This is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---example\"><a class=\"option-anchor\" href=\"#option-cargo-install---example\"><code>--example</code> <em>name</em>…</a></dt>\n<dd class=\"option-desc\"><p>Install only the specified example.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---examples\"><a class=\"option-anchor\" href=\"#option-cargo-install---examples\"><code>--examples</code></a></dt>\n<dd class=\"option-desc\"><p>Install all examples.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---root\"><a class=\"option-anchor\" href=\"#option-cargo-install---root\"><code>--root</code> <em>dir</em></a></dt>\n<dd class=\"option-desc\"><p>Directory to install packages into.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---registry\"><a class=\"option-anchor\" href=\"#option-cargo-install---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---index\"><a class=\"option-anchor\" href=\"#option-cargo-install---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install--F\"><a class=\"option-anchor\" href=\"#option-cargo-install--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---features\"><a class=\"option-anchor\" href=\"#option-cargo-install---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-install---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-install---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install---target\"><a class=\"option-anchor\" href=\"#option-cargo-install---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Install for the specified target architecture. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-install---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to a new temporary folder located in the\ntemporary directory of the platform.</p>\n<p>When using <code>--path</code>, by default it will use <code>target</code> directory in the workspace\nof the local crate unless <code>--target-dir</code>\nis specified.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---debug\"><a class=\"option-anchor\" href=\"#option-cargo-install---debug\"><code>--debug</code></a></dt>\n<dd class=\"option-desc\"><p>Build with the <code>debug</code> profile instead of the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---profile\"><a class=\"option-anchor\" href=\"#option-cargo-install---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Install with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---timings\"><a class=\"option-anchor\" href=\"#option-cargo-install---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-install---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---locked\"><a class=\"option-anchor\" href=\"#option-cargo-install---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---offline\"><a class=\"option-anchor\" href=\"#option-cargo-install---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-install---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install--j\"><a class=\"option-anchor\" href=\"#option-cargo-install--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-install---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-install---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-install---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo install -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo install -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-install--v\"><a class=\"option-anchor\" href=\"#option-cargo-install--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-install---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--q\"><a class=\"option-anchor\" href=\"#option-cargo-install--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-install---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---color\"><a class=\"option-anchor\" href=\"#option-cargo-install---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-install---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-install-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-install-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install---config\"><a class=\"option-anchor\" href=\"#option-cargo-install---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--C\"><a class=\"option-anchor\" href=\"#option-cargo-install--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--h\"><a class=\"option-anchor\" href=\"#option-cargo-install--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-install---help\"><a class=\"option-anchor\" href=\"#option-cargo-install---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-install--Z\"><a class=\"option-anchor\" href=\"#option-cargo-install--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Install or upgrade a package from crates.io:\n\n       cargo install ripgrep\n\n2. Install or reinstall the package in the current directory:\n\n       cargo install --path .\n\n3. View the list of installed packages:\n\n       cargo install --list\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-uninstall(1)](cargo-uninstall.html), [cargo-search(1)](cargo-search.html), [cargo-publish(1)](cargo-publish.html)\n\n<!-- File: doc/book/src/commands/cargo-locate-project.md (Tokens: ~1802 | Category: command-prompt) -->\n# cargo-locate-project(1)\n\n## NAME\n\ncargo-locate-project --- Print a JSON representation of a Cargo.toml file's location\n\n## SYNOPSIS\n\n`cargo locate-project` [_options_]\n\n## DESCRIPTION\n\nThis command will print a JSON object to stdout with the full path to the manifest. The\nmanifest is found by searching upward for a file named `Cargo.toml` starting from the current\nworking directory.\n\nIf the project happens to be a part of a workspace, the manifest of the project, rather than\nthe workspace root, is output. This can be overridden by the `--workspace` flag. The root\nworkspace is found by traversing further upward or by using the field `package.workspace` after\nlocating the manifest of a workspace member.\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Locate the <code>Cargo.toml</code> at the root of the workspace, as opposed to the current\nworkspace member.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The representation in which to print the project location. Valid values:</p>\n<ul>\n<li><code>json</code> (default): JSON object with the path under the key “root”.</li>\n<li><code>plain</code>: Just the path.</li>\n</ul>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--v\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--q\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---color\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project---config\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--C\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--h\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-locate-project---help\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-locate-project--Z\"><a class=\"option-anchor\" href=\"#option-cargo-locate-project--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the path to the manifest based on the current directory:\n\n       cargo locate-project\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-metadata(1)](cargo-metadata.html)\n\n<!-- File: doc/book/src/commands/cargo-login.md (Tokens: ~1653 | Category: command-prompt) -->\n# cargo-login(1)\n\n## NAME\n\ncargo-login --- Log in to a registry\n\n## SYNOPSIS\n\n`cargo login` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nThis command will run a credential provider to save a token so that commands\nthat require authentication, such as [cargo-publish(1)](cargo-publish.html), will be\nautomatically authenticated.\n\nAll the arguments following the two dashes (`--`) are passed to the credential provider.\n\nFor the default `cargo:token` credential provider, the token is saved\nin `$CARGO_HOME/credentials.toml`. `CARGO_HOME` defaults to `.cargo`\nin your home directory.\n\nIf a registry has a credential-provider specified, it will be used. Otherwise,\nthe providers from the config value `registry.global-credential-providers` will\nbe attempted, starting from the end of the list.\n\nThe _token_ will be read from stdin.\n\nThe API token for crates.io may be retrieved from <https://crates.io/me>.\n\nTake care to keep the token secret, it should not be shared with anyone else.\n\n## OPTIONS\n\n### Login Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-login---registry\"><a class=\"option-anchor\" href=\"#option-cargo-login---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-login--v\"><a class=\"option-anchor\" href=\"#option-cargo-login--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-login---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--q\"><a class=\"option-anchor\" href=\"#option-cargo-login--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-login---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login---color\"><a class=\"option-anchor\" href=\"#option-cargo-login---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-login-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-login-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login---config\"><a class=\"option-anchor\" href=\"#option-cargo-login---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--C\"><a class=\"option-anchor\" href=\"#option-cargo-login--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--h\"><a class=\"option-anchor\" href=\"#option-cargo-login--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-login---help\"><a class=\"option-anchor\" href=\"#option-cargo-login---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-login--Z\"><a class=\"option-anchor\" href=\"#option-cargo-login--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Save the token for the default registry:\n\n       cargo login\n\n2. Save the token for a specific registry:\n\n       cargo login --registry my-registry\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-logout(1)](cargo-logout.html), [cargo-publish(1)](cargo-publish.html)\n\n<!-- File: doc/book/src/commands/cargo-logout.md (Tokens: ~1671 | Category: command-prompt) -->\n# cargo-logout(1)\n\n## NAME\n\ncargo-logout --- Remove an API token from the registry locally\n\n## SYNOPSIS\n\n`cargo logout` [_options_]\n\n## DESCRIPTION\n\nThis command will run a credential provider to remove a saved token.\n\nFor the default `cargo:token` credential provider, credentials are stored\nin `$CARGO_HOME/credentials.toml` where `$CARGO_HOME` defaults to `.cargo`\nin your home directory.\n\nIf a registry has a credential-provider specified, it will be used. Otherwise,\nthe providers from the config value `registry.global-credential-providers` will\nbe attempted, starting from the end of the list.\n\nIf `--registry` is not specified, then the credentials for the default\nregistry will be removed (configured by\n[`registry.default`](../reference/config.html#registrydefault), which defaults\nto <https://crates.io/>).\n\nThis will not revoke the token on the server. If you need to revoke the token,\nvisit the registry website and follow its instructions (see\n<https://crates.io/me> to revoke the token for <https://crates.io/>).\n\n## OPTIONS\n\n### Logout Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-logout---registry\"><a class=\"option-anchor\" href=\"#option-cargo-logout---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-logout--v\"><a class=\"option-anchor\" href=\"#option-cargo-logout--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-logout---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--q\"><a class=\"option-anchor\" href=\"#option-cargo-logout--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-logout---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout---color\"><a class=\"option-anchor\" href=\"#option-cargo-logout---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-logout-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-logout-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout---config\"><a class=\"option-anchor\" href=\"#option-cargo-logout---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--C\"><a class=\"option-anchor\" href=\"#option-cargo-logout--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--h\"><a class=\"option-anchor\" href=\"#option-cargo-logout--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-logout---help\"><a class=\"option-anchor\" href=\"#option-cargo-logout---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-logout--Z\"><a class=\"option-anchor\" href=\"#option-cargo-logout--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove the default registry token:\n\n       cargo logout\n\n2. Remove the token for a specific registry:\n\n       cargo logout --registry my-registry\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html)\n\n<!-- File: doc/book/src/commands/cargo-metadata.md (Tokens: ~5366 | Category: command-prompt) -->\n# cargo-metadata(1)\n\n## NAME\n\ncargo-metadata --- Machine-readable metadata about the current package\n\n## SYNOPSIS\n\n`cargo metadata` [_options_]\n\n## DESCRIPTION\n\nOutput JSON to stdout containing information about the workspace members and\nresolved dependencies of the current package.\n\nThe output format is subject to change in future versions of Cargo. It\nis recommended to include the `--format-version` flag to future-proof your code\nand ensure the output is in the format you are expecting. For more on the\nexpectations, see [\"Compatibility\"](#compatibility).\n\nSee the [cargo_metadata crate](https://crates.io/crates/cargo_metadata)\nfor a Rust API for reading the metadata.\n\n## OUTPUT FORMAT\n\n### Compatibility\n\nWithin the same output format version, the compatibility is maintained, except\nsome scenarios. The following is a non-exhaustive list of changes that are not\nconsidered as incompatible:\n\n* **Adding new fields** — New fields will be added when needed. Reserving this\n  helps Cargo evolve without bumping the format version too often.\n* **Adding new values for enum-like fields** — Same as adding new fields. It\n  keeps metadata evolving without stagnation.\n* **Changing opaque representations** — The inner representations of some\n  fields are implementation details. For example, fields related to\n  \"Source ID\" are treated as opaque identifiers to differentiate packages or\n  sources. Consumers shouldn't rely on those representations unless specified.\n\n### JSON format\n\nThe JSON output has the following format:\n\n```javascript\n{\n    /* Array of all packages in the workspace.\n       It also includes all feature-enabled dependencies unless --no-deps is used.\n    */\n    \"packages\": [\n        {\n            /* The name of the package. */\n            \"name\": \"my-package\",\n            /* The version of the package. */\n            \"version\": \"0.1.0\",\n            /* The Package ID for referring to the\n               package within the document and as the `--package` argument to many commands\n            */\n            \"id\": \"file:///path/to/my-package#0.1.0\",\n            /* The license value from the manifest, or null. */\n            \"license\": \"MIT/Apache-2.0\",\n            /* The license-file value from the manifest, or null. */\n            \"license_file\": \"LICENSE\",\n            /* The description value from the manifest, or null. */\n            \"description\": \"Package description.\",\n            /* The source ID of the package, an \"opaque\" identifier representing\n               where a package is retrieved from. See \"Compatibility\" above for\n               the stability guarantee.\n\n               This is null for path dependencies and workspace members.\n\n               For other dependencies, it is a string with the format:\n               - \"registry+URL\" for registry-based dependencies.\n                 Example: \"registry+https://github.com/rust-lang/crates.io-index\"\n               - \"git+URL\" for git-based dependencies.\n                 Example: \"git+https://github.com/rust-lang/cargo?rev=5e85ba14aaa20f8133863373404cb0af69eeef2c#5e85ba14aaa20f8133863373404cb0af69eeef2c\"\n               - \"sparse+URL\" for dependencies from a sparse registry\n                 Example: \"sparse+https://my-sparse-registry.org\"\n\n               The value after the `+` is not explicitly defined, and may change\n               between versions of Cargo and may not directly correlate to other\n               things, such as registry definitions in a config file. New source\n               kinds may be added in the future which will have different `+`\n               prefixed identifiers.\n            */\n            \"source\": null,\n            /* Array of dependencies declared in the package's manifest. */\n            \"dependencies\": [\n                {\n                    /* The name of the dependency. */\n                    \"name\": \"bitflags\",\n                    /* The source ID of the dependency. May be null, see\n                       description for the package source.\n                    */\n                    \"source\": \"registry+https://github.com/rust-lang/crates.io-index\",\n                    /* The version requirement for the dependency.\n                       Dependencies without a version requirement have a value of \"*\".\n                    */\n                    \"req\": \"^1.0\",\n                    /* The dependency kind.\n                       \"dev\", \"build\", or null for a normal dependency.\n                    */\n                    \"kind\": null,\n                    /* If the dependency is renamed, this is the new name for\n                       the dependency as a string.  null if it is not renamed.\n                    */\n                    \"rename\": null,\n                    /* Boolean of whether or not this is an optional dependency. */\n                    \"optional\": false,\n                    /* Boolean of whether or not default features are enabled. */\n                    \"uses_default_features\": true,\n                    /* Array of features enabled. */\n                    \"features\": [],\n                    /* The target platform for the dependency.\n                       null if not a target dependency.\n                    */\n                    \"target\": \"cfg(windows)\",\n                    /* The file system path for a local path dependency.\n                       not present if not a path dependency.\n                    */\n                    \"path\": \"/path/to/dep\",\n                    /* A string of the URL of the registry this dependency is from.\n                       If not specified or null, the dependency is from the default\n                       registry (crates.io).\n                    */\n                    \"registry\": null,\n                    /* (unstable) Boolean flag of whether or not this is a pulbic\n                       dependency. This field is only present when\n                       `-Zpublic-dependency` is enabled.\n                    */\n                    \"public\": false\n                }\n            ],\n            /* Array of Cargo targets. */\n            \"targets\": [\n                {\n                    /* Array of target kinds.\n                       - lib targets list the `crate-type` values from the\n                         manifest such as \"lib\", \"rlib\", \"dylib\",\n                         \"proc-macro\", etc. (default [\"lib\"])\n                       - binary is [\"bin\"]\n                       - example is [\"example\"]\n                       - integration test is [\"test\"]\n                       - benchmark is [\"bench\"]\n                       - build script is [\"custom-build\"]\n                    */\n                    \"kind\": [\n                        \"bin\"\n                    ],\n                    /* Array of crate types.\n                       - lib and example libraries list the `crate-type` values\n                         from the manifest such as \"lib\", \"rlib\", \"dylib\",\n                         \"proc-macro\", etc. (default [\"lib\"])\n                       - all other target kinds are [\"bin\"]\n                    */\n                    \"crate_types\": [\n                        \"bin\"\n                    ],\n                    /* The name of the target.\n                       For lib targets, dashes will be replaced with underscores.\n                    */\n                    \"name\": \"my-package\",\n                    /* Absolute path to the root source file of the target. */\n                    \"src_path\": \"/path/to/my-package/src/main.rs\",\n                    /* The Rust edition of the target.\n                       Defaults to the package edition.\n                    */\n                    \"edition\": \"2018\",\n                    /* Array of required features.\n                       This property is not included if no required features are set.\n                    */\n                    \"required-features\": [\"feat1\"],\n                    /* Whether the target should be documented by `cargo doc`. */\n                    \"doc\": true,\n                    /* Whether or not this target has doc tests enabled, and\n                       the target is compatible with doc testing.\n                    */\n                    \"doctest\": false,\n                    /* Whether or not this target should be built and run with `--test`\n                    */\n                    \"test\": true\n                }\n            ],\n            /* Set of features defined for the package.\n               Each feature maps to an array of features or dependencies it\n               enables.\n            */\n            \"features\": {\n                \"default\": [\n                    \"feat1\"\n                ],\n                \"feat1\": [],\n                \"feat2\": []\n            },\n            /* Absolute path to this package's manifest. */\n            \"manifest_path\": \"/path/to/my-package/Cargo.toml\",\n            /* Package metadata.\n               This is null if no metadata is specified.\n            */\n            \"metadata\": {\n                \"docs\": {\n                    \"rs\": {\n                        \"all-features\": true\n                    }\n                }\n            },\n            /* List of registries to which this package may be published.\n               Publishing is unrestricted if null, and forbidden if an empty array. */\n            \"publish\": [\n                \"crates-io\"\n            ],\n            /* Array of authors from the manifest.\n               Empty array if no authors specified.\n            */\n            \"authors\": [\n                \"Jane Doe <user@example.com>\"\n            ],\n            /* Array of categories from the manifest. */\n            \"categories\": [\n                \"command-line-utilities\"\n            ],\n            /* Optional string that is the default binary picked by cargo run. */\n            \"default_run\": null,\n            /* Optional string that is the minimum supported rust version */\n            \"rust_version\": \"1.56\",\n            /* Array of keywords from the manifest. */\n            \"keywords\": [\n                \"cli\"\n            ],\n            /* The readme value from the manifest or null if not specified. */\n            \"readme\": \"README.md\",\n            /* The repository value from the manifest or null if not specified. */\n            \"repository\": \"https://github.com/rust-lang/cargo\",\n            /* The homepage value from the manifest or null if not specified. */\n            \"homepage\": \"https://rust-lang.org\",\n            /* The documentation value from the manifest or null if not specified. */\n            \"documentation\": \"https://doc.rust-lang.org/stable/std\",\n            /* The default edition of the package.\n               Note that individual targets may have different editions.\n            */\n            \"edition\": \"2018\",\n            /* Optional string that is the name of a native library the package\n               is linking to.\n            */\n            \"links\": null,\n        }\n    ],\n    /* Array of members of the workspace.\n       Each entry is the Package ID for the package.\n    */\n    \"workspace_members\": [\n        \"file:///path/to/my-package#0.1.0\",\n    ],\n    /* Array of default members of the workspace.\n       Each entry is the Package ID for the package.\n    */\n    \"workspace_default_members\": [\n        \"file:///path/to/my-package#0.1.0\",\n    ],\n    // The resolved dependency graph for the entire workspace. The enabled\n    // features are based on the enabled features for the \"current\" package.\n    // Inactivated optional dependencies are not listed.\n    //\n    // This is null if --no-deps is specified.\n    //\n    // By default, this includes all dependencies for all target platforms.\n    // The `--filter-platform` flag may be used to narrow to a specific\n    // target tuple.\n    \"resolve\": {\n        /* Array of nodes within the dependency graph.\n           Each node is a package.\n        */\n        \"nodes\": [\n            {\n                /* The Package ID of this node. */\n                \"id\": \"file:///path/to/my-package#0.1.0\",\n                /* The dependencies of this package, an array of Package IDs. */\n                \"dependencies\": [\n                    \"https://github.com/rust-lang/crates.io-index#bitflags@1.0.4\"\n                ],\n                /* The dependencies of this package. This is an alternative to\n                   \"dependencies\" which contains additional information. In\n                   particular, this handles renamed dependencies.\n                */\n                \"deps\": [\n                    {\n                        /* The name of the dependency's library target.\n                           If this is a renamed dependency, this is the new\n                           name.\n                        */\n                        \"name\": \"bitflags\",\n                        /* The Package ID of the dependency. */\n                        \"pkg\": \"https://github.com/rust-lang/crates.io-index#bitflags@1.0.4\"\n                        /* Array of dependency kinds. Added in Cargo 1.40. */\n                        \"dep_kinds\": [\n                            {\n                                /* The dependency kind.\n                                   \"dev\", \"build\", or null for a normal dependency.\n                                */\n                                \"kind\": null,\n                                /* The target platform for the dependency.\n                                   null if not a target dependency.\n                                */\n                                \"target\": \"cfg(windows)\"\n                            }\n                        ]\n                    }\n                ],\n                /* Array of features enabled on this package. */\n                \"features\": [\n                    \"default\"\n                ]\n            }\n        ],\n        /* The package in the current working directory (if --manifest-path is not given).\n           This is null if there is a virtual workspace. Otherwise it is\n           the Package ID of the package.\n        */\n        \"root\": \"file:///path/to/my-package#0.1.0\",\n    },\n    /* The absolute path to the target directory where Cargo places its output. */\n    \"target_directory\": \"/path/to/my-package/target\",\n    /* The absolute path to the build directory where Cargo places intermediate build artifacts. (unstable) */\n    \"build_directory\": \"/path/to/my-package/build-dir\",\n    /* The version of the schema for this metadata structure.\n       This will be changed if incompatible changes are ever made.\n    */\n    \"version\": 1,\n    /* The absolute path to the root of the workspace. */\n    \"workspace_root\": \"/path/to/my-package\"\n    /* Workspace metadata.\n       This is null if no metadata is specified. */\n    \"metadata\": {\n        \"docs\": {\n            \"rs\": {\n                \"all-features\": true\n            }\n        }\n    }\n}\n````\n\nNotes:\n- For `\"id\"` field syntax, see [Package ID Specifications] in the reference.\n\n## OPTIONS\n\n### Output Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---no-deps\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---no-deps\"><code>--no-deps</code></a></dt>\n<dd class=\"option-desc\"><p>Output information only about the workspace members and don’t fetch\ndependencies.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---format-version\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---format-version\"><code>--format-version</code> <em>version</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the version of the output format to use. Currently <code>1</code> is the only\npossible value.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---filter-platform\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---filter-platform\"><code>--filter-platform</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>This filters the <code>resolve</code> output to only include dependencies for the\ngiven <a href=\"../appendix/glossary.html#target\">target tuple</a>.\nA literal <code>\"host-tuple\"</code> can be used, which will internally be substituted by the host’s target.\nWithout this flag, the resolve includes all targets.</p>\n<p>Note that the dependencies listed in the “packages” array still includes all\ndependencies. Each package definition is intended to be an unaltered\nreproduction of the information within <code>Cargo.toml</code>.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--F\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-metadata--v\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--q\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---color\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-metadata---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---locked\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---offline\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-metadata-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-metadata-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata---config\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--C\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--h\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-metadata---help\"><a class=\"option-anchor\" href=\"#option-cargo-metadata---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-metadata--Z\"><a class=\"option-anchor\" href=\"#option-cargo-metadata--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Output JSON about the current package:\n\n       cargo metadata --format-version=1\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-pkgid(1)](cargo-pkgid.html), [Package ID Specifications], [JSON messages]\n\n[Package ID Specifications]: ../reference/pkgid-spec.html\n[JSON messages]: ../reference/external-tools.html#json-messages\n\n<!-- File: doc/book/src/commands/cargo-miri.md (Tokens: ~157 | Category: command-prompt) -->\n# cargo-miri(1)\n\n## NAME\n\ncargo-miri --- Runs binary crates and tests in Miri\n\n## DESCRIPTION\n\nThis is an external command distributed with the Rust toolchain as an optional component.\nIt is not built into Cargo, and may require additional installation.\n\nThis command is only available on the [nightly](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) channel.\n\nFor information about usage and installation,\nsee <https://github.com/rust-lang/miri>.\n\n## SEE ALSO\n\n[cargo(1)](cargo.md),\n[cargo-run(1)](cargo-run.md),\n[cargo-test(1)](cargo-test.md),\n[Custom subcommands](../reference/external-tools.md#custom-subcommands)\n\n<!-- File: doc/book/src/commands/cargo-new.md (Tokens: ~2042 | Category: command-prompt) -->\n# cargo-new(1)\n\n## NAME\n\ncargo-new --- Create a new Cargo package\n\n## SYNOPSIS\n\n`cargo new` [_options_] _path_\n\n## DESCRIPTION\n\nThis command will create a new Cargo package in the given directory. This\nincludes a simple template with a `Cargo.toml` manifest, sample source file,\nand a VCS ignore file. If the directory is not already in a VCS repository,\nthen a new repository is created (see `--vcs` below).\n\nSee [cargo-init(1)](cargo-init.html) for a similar command which will create a new manifest\nin an existing directory.\n\n## OPTIONS\n\n### New Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-new---bin\"><a class=\"option-anchor\" href=\"#option-cargo-new---bin\"><code>--bin</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a binary target (<code>src/main.rs</code>).\nThis is the default behavior.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---lib\"><a class=\"option-anchor\" href=\"#option-cargo-new---lib\"><code>--lib</code></a></dt>\n<dd class=\"option-desc\"><p>Create a package with a library target (<code>src/lib.rs</code>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---edition\"><a class=\"option-anchor\" href=\"#option-cargo-new---edition\"><code>--edition</code> <em>edition</em></a></dt>\n<dd class=\"option-desc\"><p>Specify the Rust edition to use. Default is 2024.\nPossible values: 2015, 2018, 2021, 2024</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---name\"><a class=\"option-anchor\" href=\"#option-cargo-new---name\"><code>--name</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Set the package name. Defaults to the directory name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---vcs\"><a class=\"option-anchor\" href=\"#option-cargo-new---vcs\"><code>--vcs</code> <em>vcs</em></a></dt>\n<dd class=\"option-desc\"><p>Initialize a new VCS repository for the given version control system (git,\nhg, pijul, or fossil) or do not initialize any version control at all\n(none). If not specified, defaults to <code>git</code> or the configuration value\n<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---registry\"><a class=\"option-anchor\" href=\"#option-cargo-new---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name\nwhich will restrict publishing only to that registry.</p>\n<p>Registry names are defined in <a href=\"../reference/config.html\">Cargo config files</a>.\nIf not specified, the default registry defined by the <code>registry.default</code>\nconfig key is used. If the default registry is not set and <code>--registry</code> is not\nused, the <code>publish</code> field will not be set which means that publishing will not\nbe restricted.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-new--v\"><a class=\"option-anchor\" href=\"#option-cargo-new--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-new---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--q\"><a class=\"option-anchor\" href=\"#option-cargo-new--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-new---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---color\"><a class=\"option-anchor\" href=\"#option-cargo-new---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-new-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-new-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new---config\"><a class=\"option-anchor\" href=\"#option-cargo-new---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--C\"><a class=\"option-anchor\" href=\"#option-cargo-new--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--h\"><a class=\"option-anchor\" href=\"#option-cargo-new--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-new---help\"><a class=\"option-anchor\" href=\"#option-cargo-new---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-new--Z\"><a class=\"option-anchor\" href=\"#option-cargo-new--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a binary Cargo package in the given directory:\n\n       cargo new foo\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-init(1)](cargo-init.html)\n\n<!-- File: doc/book/src/commands/cargo-owner.md (Tokens: ~2241 | Category: command-prompt) -->\n# cargo-owner(1)\n\n## NAME\n\ncargo-owner --- Manage the owners of a crate on the registry\n\n## SYNOPSIS\n\n`cargo owner` [_options_] `--add` _login_ [_crate_]\\\n`cargo owner` [_options_] `--remove` _login_ [_crate_]\\\n`cargo owner` [_options_] `--list` [_crate_]\n\n## DESCRIPTION\n\nThis command will modify the owners for a crate on the registry. Owners of a\ncrate can upload new versions and yank old versions. Non-team owners can also\nmodify the set of owners, so take care!\n\nThis command requires you to be authenticated with either the `--token` option\nor using [cargo-login(1)](cargo-login.html).\n\nIf the crate name is not specified, it will use the package name from the\ncurrent directory.\n\nSee [the reference](../reference/publishing.html#cargo-owner) for more\ninformation about owners and publishing.\n\n## OPTIONS\n\n### Owner Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-owner--a\"><a class=\"option-anchor\" href=\"#option-cargo-owner--a\"><code>-a</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---add\"><a class=\"option-anchor\" href=\"#option-cargo-owner---add\"><code>--add</code> <em>login</em>…</a></dt>\n<dd class=\"option-desc\"><p>Invite the given user or team as an owner.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--r\"><a class=\"option-anchor\" href=\"#option-cargo-owner--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---remove\"><a class=\"option-anchor\" href=\"#option-cargo-owner---remove\"><code>--remove</code> <em>login</em>…</a></dt>\n<dd class=\"option-desc\"><p>Remove the given user or team as an owner.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--l\"><a class=\"option-anchor\" href=\"#option-cargo-owner--l\"><code>-l</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---list\"><a class=\"option-anchor\" href=\"#option-cargo-owner---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>List owners of a crate.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---token\"><a class=\"option-anchor\" href=\"#option-cargo-owner---token\"><code>--token</code> <em>token</em></a></dt>\n<dd class=\"option-desc\"><p>API token to use when authenticating. This overrides the token stored in\nthe credentials file (which is created by <a href=\"cargo-login.html\">cargo-login(1)</a>).</p>\n<p><a href=\"../reference/config.html\">Cargo config</a> environment variables can be\nused to override the tokens stored in the credentials file. The token for\ncrates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment\nvariable. Tokens for other registries may be specified with environment\nvariables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name\nof the registry in all capital letters.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---index\"><a class=\"option-anchor\" href=\"#option-cargo-owner---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---registry\"><a class=\"option-anchor\" href=\"#option-cargo-owner---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to use. Registry names are defined in <a href=\"../reference/config.html\">Cargo config\nfiles</a>. If not specified, the default registry is used,\nwhich is defined by the <code>registry.default</code> config key which defaults to\n<code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-owner--v\"><a class=\"option-anchor\" href=\"#option-cargo-owner--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-owner---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--q\"><a class=\"option-anchor\" href=\"#option-cargo-owner--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-owner---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---color\"><a class=\"option-anchor\" href=\"#option-cargo-owner---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-owner-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-owner-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner---config\"><a class=\"option-anchor\" href=\"#option-cargo-owner---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--C\"><a class=\"option-anchor\" href=\"#option-cargo-owner--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--h\"><a class=\"option-anchor\" href=\"#option-cargo-owner--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-owner---help\"><a class=\"option-anchor\" href=\"#option-cargo-owner---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-owner--Z\"><a class=\"option-anchor\" href=\"#option-cargo-owner--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. List owners of a package:\n\n       cargo owner --list foo\n\n2. Invite an owner to a package:\n\n       cargo owner --add username foo\n\n3. Remove an owner from a package:\n\n       cargo owner --remove username foo\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-login(1)](cargo-login.html), [cargo-publish(1)](cargo-publish.html)\n\n<!-- File: doc/book/src/commands/cargo-package.md (Tokens: ~5346 | Category: command-prompt) -->\n# cargo-package(1)\n## NAME\n\ncargo-package --- Assemble the local package into a distributable tarball\n\n## SYNOPSIS\n\n`cargo package` [_options_]\n\n## DESCRIPTION\n\nThis command will create a distributable, compressed `.crate` file with the\nsource code of the package in the current directory. The resulting file will be\nstored in the `target/package` directory. This performs the following steps:\n\n1. Load and check the current workspace, performing some basic checks.\n    - Path dependencies are not allowed unless they have a version key. Cargo\n      will ignore the path key for dependencies in published packages.\n      `dev-dependencies` do not have this restriction.\n2. Create the compressed `.crate` file.\n    - The original `Cargo.toml` file is rewritten and normalized.\n    - `[patch]`, `[replace]`, and `[workspace]` sections are removed from the\n      manifest.\n    - `Cargo.lock` is always included. When missing, a new lock file will be\n      generated unless the `--exclude-lockfile` flag is used. [cargo-install(1)](cargo-install.html)\n      will use the packaged lock file if the `--locked` flag is used.\n    - A `.cargo_vcs_info.json` file is included that contains information\n      about the current VCS checkout hash if available, as well as a flag if the\n      worktree is dirty.\n    - Symlinks are flattened to their target files.\n    - Files and directories are included or excluded based on rules mentioned in\n      [the `[include]` and `[exclude]` fields](../reference/manifest.html#the-exclude-and-include-fields).\n\n3. Extract the `.crate` file and build it to verify it can build.\n    - This will rebuild your package from scratch to ensure that it can be\n      built from a pristine state. The `--no-verify` flag can be used to skip\n      this step.\n4. Check that build scripts did not modify any source files.\n\nThe list of files included can be controlled with the `include` and `exclude`\nfields in the manifest.\n\nSee [the reference](../reference/publishing.html) for more details about\npackaging and publishing.\n\n### .cargo_vcs_info.json format\n\nWill generate a `.cargo_vcs_info.json` in the following format\n\n```javascript\n{\n \"git\": {\n   \"sha1\": \"aac20b6e7e543e6dd4118b246c77225e3a3a1302\",\n   \"dirty\": true\n },\n \"path_in_vcs\": \"\"\n}\n```\n\n`dirty` indicates that the Git worktree was dirty when the package\nwas built.\n\n`path_in_vcs` will be set to a repo-relative path for packages\nin subdirectories of the version control repository.\n\nThe compatibility of this file is maintained under the same policy\nas the JSON output of [cargo-metadata(1)](cargo-metadata.html).\n\nNote that this file provides a best-effort snapshot of the VCS information.\nHowever, the provenance of the package is not verified.\nThere is no guarantee that the source code in the tarball matches the VCS information.\n\n## OPTIONS\n\n### Package Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--l\"><a class=\"option-anchor\" href=\"#option-cargo-package--l\"><code>-l</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---list\"><a class=\"option-anchor\" href=\"#option-cargo-package---list\"><code>--list</code></a></dt>\n<dd class=\"option-desc\"><p>Print files included in a package without making one.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-verify\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-verify\"><code>--no-verify</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t verify the contents by building them.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-metadata\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-metadata\"><code>--no-metadata</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore warnings about a lack of human-usable metadata (such as the description\nor the license).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-package---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Allow working directories with uncommitted VCS changes to be packaged.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---exclude-lockfile\"><a class=\"option-anchor\" href=\"#option-cargo-package---exclude-lockfile\"><code>--exclude-lockfile</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t include the lock file when packaging.</p>\n<p>This flag is not for general use.\nSome tools may expect a lock file to be present (e.g. <code>cargo install --locked</code>).\nConsider other options before using this.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---index\"><a class=\"option-anchor\" href=\"#option-cargo-package---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---registry\"><a class=\"option-anchor\" href=\"#option-cargo-package---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to package for; see <code>cargo publish --help</code> for more details\nabout configuration of registry names. The packages will not be published\nto this registry, but if we are packaging multiple inter-dependent crates,\nlock-files will be generated under the assumption that dependencies will be\npublished to this registry.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-package---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>Specifies the output message format.\nCurrently, it only works with <code>--list</code> and affects the file listing format.\nThis is unstable and requires <code>-Zunstable-options</code>.\nValid output formats:</p>\n<ul>\n<li><code>human</code> (default): Display in a file-per-line format.</li>\n<li><code>json</code>: Emit machine-readable JSON information about each package.\nOne package per JSON line (Newline delimited JSON).\n<pre><code class=\"language-javascript\">{\n  /* The Package ID Spec of the package. */\n  \"id\": \"path+file:///home/foo#0.0.0\",\n  /* Files of this package */\n  \"files\" {\n    /* Relative path in the archive file. */\n    \"Cargo.toml.orig\": {\n      /* Where the file is from.\n         - \"generate\" for file being generated during packaging\n         - \"copy\" for file being copied from another location.\n      */\n      \"kind\": \"copy\",\n      /* For the \"copy\" kind,\n         it is an absolute path to the actual file content.\n         For the \"generate\" kind,\n         it is the original file the generated one is based on.\n      */\n      \"path\": \"/home/foo/Cargo.toml\"\n    },\n    \"Cargo.toml\": {\n      \"kind\": \"generate\",\n      \"path\": \"/home/foo/Cargo.toml\"\n    },\n    \"src/main.rs\": {\n      \"kind\": \"copy\",\n      \"path\": \"/home/foo/src/main.rs\"\n    }\n  }\n}\n</code></pre>\n</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--p\"><a class=\"option-anchor\" href=\"#option-cargo-package--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---package\"><a class=\"option-anchor\" href=\"#option-cargo-package---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-package---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Package all members in the workspace.</p>\n</dd>\n\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-package---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package---target\"><a class=\"option-anchor\" href=\"#option-cargo-package---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Package for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-package---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package--F\"><a class=\"option-anchor\" href=\"#option-cargo-package--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---features\"><a class=\"option-anchor\" href=\"#option-cargo-package---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-package---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-package---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-package---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---locked\"><a class=\"option-anchor\" href=\"#option-cargo-package---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---offline\"><a class=\"option-anchor\" href=\"#option-cargo-package---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-package---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-package--j\"><a class=\"option-anchor\" href=\"#option-cargo-package--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-package---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-package---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-package---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo package -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo package -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-package--v\"><a class=\"option-anchor\" href=\"#option-cargo-package--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-package---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--q\"><a class=\"option-anchor\" href=\"#option-cargo-package--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-package---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---color\"><a class=\"option-anchor\" href=\"#option-cargo-package---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-package-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-package-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package---config\"><a class=\"option-anchor\" href=\"#option-cargo-package---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--C\"><a class=\"option-anchor\" href=\"#option-cargo-package--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--h\"><a class=\"option-anchor\" href=\"#option-cargo-package--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-package---help\"><a class=\"option-anchor\" href=\"#option-cargo-package---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-package--Z\"><a class=\"option-anchor\" href=\"#option-cargo-package--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Create a compressed `.crate` file of the current package:\n\n       cargo package\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-publish(1)](cargo-publish.html)\n\n<!-- File: doc/book/src/commands/cargo-pkgid.md (Tokens: ~2535 | Category: command-prompt) -->\n# cargo-pkgid(1)\n\n## NAME\n\ncargo-pkgid --- Print a fully qualified package specification\n\n## SYNOPSIS\n\n`cargo pkgid` [_options_] [_spec_]\n\n## DESCRIPTION\n\nGiven a _spec_ argument, print out the fully qualified package ID specifier\nfor a package or dependency in the current workspace. This command will\ngenerate an error if _spec_ is ambiguous as to which package it refers to in\nthe dependency graph. If no _spec_ is given, then the specifier for the local\npackage is printed.\n\nThis command requires that a lockfile is available and dependencies have been\nfetched.\n\nA package specifier consists of a name, version, and source URL. You are\nallowed to use partial specifiers to succinctly match a specific package as\nlong as it matches only one package. This specifier is also used by other parts\nin Cargo, such as [cargo-metadata(1)](cargo-metadata.html) and [JSON messages] emitted by Cargo.\n\nThe format of a _spec_ can be one of the following:\n\nSPEC Structure             | Example SPEC\n---------------------------|--------------\n_name_                     | `bitflags`\n_name_`@`_version_         | `bitflags@1.0.4`\n_url_                      | `https://github.com/rust-lang/cargo`\n_url_`#`_version_          | `https://github.com/rust-lang/cargo#0.33.0`\n_url_`#`_name_             | `https://github.com/rust-lang/crates.io-index#bitflags`\n_url_`#`_name_`@`_version_ | `https://github.com/rust-lang/cargo#crates-io@0.21.0`\n\nThe specification grammar can be found in chapter [Package ID Specifications].\n\n## OPTIONS\n\n### Package Selection\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--p\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---package\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>Get the package ID for the given package instead of the current package.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-pkgid--v\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--q\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---color\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---locked\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---offline\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid---config\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--C\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--h\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-pkgid---help\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-pkgid--Z\"><a class=\"option-anchor\" href=\"#option-cargo-pkgid--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Retrieve package specification for `foo` package:\n\n       cargo pkgid foo\n\n2. Retrieve package specification for version 1.0.0 of `foo`:\n\n       cargo pkgid foo@1.0.0\n\n3. Retrieve package specification for `foo` from crates.io:\n\n       cargo pkgid https://github.com/rust-lang/crates.io-index#foo\n\n4. Retrieve package specification for `foo` from a local package:\n\n       cargo pkgid file:///path/to/local/package#foo\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html), [cargo-metadata(1)](cargo-metadata.html),\n[Package ID Specifications], [JSON messages]\n\n[Package ID Specifications]: ../reference/pkgid-spec.html\n[JSON messages]: ../reference/external-tools.html#json-messages\n\n<!-- File: doc/book/src/commands/cargo-publish.md (Tokens: ~4478 | Category: command-prompt) -->\n# cargo-publish(1)\n## NAME\n\ncargo-publish --- Upload a package to the registry\n\n## SYNOPSIS\n\n`cargo publish` [_options_]\n\n## DESCRIPTION\n\nThis command will create a distributable, compressed `.crate` file with the\nsource code of the package in the current directory and upload it to a\nregistry. The default registry is <https://crates.io>. This performs the\nfollowing steps:\n\n1. Performs a few checks, including:\n   - Checks the `package.publish` key in the manifest for restrictions on\n     which registries you are allowed to publish to.\n2. Create a `.crate` file by following the steps in [cargo-package(1)](cargo-package.html).\n3. Upload the crate to the registry. The server will perform additional\n   checks on the crate. \n4. The client will poll waiting for the package to appear in the index,\n   and may timeout. In that case, you will need to check for completion\n   manually. This timeout does not affect the upload.\n\nThis command requires you to be authenticated using [cargo-login(1)](cargo-login.html)\nor environment variables of the [`registry.token`](../reference/config.html#registrytoken)\nand [`registries.<name>.token`](../reference/config.html#registriesnametoken) config fields.\n\nSee [the reference](../reference/publishing.html) for more details about\npackaging and publishing.\n\n## OPTIONS\n\n### Publish Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-publish---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Perform all checks without uploading.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---no-verify\"><a class=\"option-anchor\" href=\"#option-cargo-publish---no-verify\"><code>--no-verify</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t verify the contents by building them.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---allow-dirty\"><a class=\"option-anchor\" href=\"#option-cargo-publish---allow-dirty\"><code>--allow-dirty</code></a></dt>\n<dd class=\"option-desc\"><p>Allow working directories with uncommitted VCS changes to be packaged.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---index\"><a class=\"option-anchor\" href=\"#option-cargo-publish---index\"><code>--index</code> <em>index</em></a></dt>\n<dd class=\"option-desc\"><p>The URL of the registry index to use.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---registry\"><a class=\"option-anchor\" href=\"#option-cargo-publish---registry\"><code>--registry</code> <em>registry</em></a></dt>\n<dd class=\"option-desc\"><p>Name of the registry to publish to. Registry names are defined in <a href=\"../reference/config.html\">Cargo\nconfig files</a>. If not specified, and there is a\n<a href=\"../reference/manifest.html#the-publish-field\"><code>package.publish</code></a> field in\n<code>Cargo.toml</code> with a single registry, then it will publish to that registry.\nOtherwise it will use the default registry, which is defined by the\n<a href=\"../reference/config.html#registrydefault\"><code>registry.default</code></a> config key\nwhich defaults to <code>crates-io</code>.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, when no package selection options are given, the packages selected\ndepend on the selected manifest file (based on the current working directory if\n`--manifest-path` is not given). If the manifest is the root of a workspace then\nthe workspaces default members are selected, otherwise only the package defined\nby the manifest will be selected.\n\nThe default members of a workspace can be set explicitly with the\n`workspace.default-members` key in the root manifest. If this is not set, a\nvirtual workspace will include all workspace members (equivalent to passing\n`--workspace`), and a non-virtual workspace will include only the root crate itself.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish--p\"><a class=\"option-anchor\" href=\"#option-cargo-publish--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---package\"><a class=\"option-anchor\" href=\"#option-cargo-publish---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Publish only the specified packages. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the\nSPEC format. This flag may be specified multiple times and supports common Unix\nglob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally\nexpanding glob patterns before Cargo handles them, you must use single quotes or\ndouble quotes around each pattern.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---workspace\"><a class=\"option-anchor\" href=\"#option-cargo-publish---workspace\"><code>--workspace</code></a></dt>\n<dd class=\"option-desc\"><p>Publish all members in the workspace.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---all\"><a class=\"option-anchor\" href=\"#option-cargo-publish---all\"><code>--all</code></a></dt>\n<dd class=\"option-desc\"><p>Deprecated alias for <code>--workspace</code>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---exclude\"><a class=\"option-anchor\" href=\"#option-cargo-publish---exclude\"><code>--exclude</code> <em>SPEC</em>…</a></dt>\n<dd class=\"option-desc\"><p>Exclude the specified packages. Must be used in conjunction with the\n<code>--workspace</code> flag. This flag may be specified multiple times and supports\ncommon Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell\naccidentally expanding glob patterns before Cargo handles them, you must use\nsingle quotes or double quotes around each pattern.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---target\"><a class=\"option-anchor\" href=\"#option-cargo-publish---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Publish for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-publish---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish--F\"><a class=\"option-anchor\" href=\"#option-cargo-publish--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-publish---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-publish---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---locked\"><a class=\"option-anchor\" href=\"#option-cargo-publish---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---offline\"><a class=\"option-anchor\" href=\"#option-cargo-publish---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-publish---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-publish--j\"><a class=\"option-anchor\" href=\"#option-cargo-publish--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-publish---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-publish---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-publish---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo publish -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo publish -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-publish--v\"><a class=\"option-anchor\" href=\"#option-cargo-publish--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-publish---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--q\"><a class=\"option-anchor\" href=\"#option-cargo-publish--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-publish---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---color\"><a class=\"option-anchor\" href=\"#option-cargo-publish---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-publish-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-publish-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish---config\"><a class=\"option-anchor\" href=\"#option-cargo-publish---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--C\"><a class=\"option-anchor\" href=\"#option-cargo-publish--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--h\"><a class=\"option-anchor\" href=\"#option-cargo-publish--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-publish---help\"><a class=\"option-anchor\" href=\"#option-cargo-publish---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-publish--Z\"><a class=\"option-anchor\" href=\"#option-cargo-publish--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Publish the current package:\n\n       cargo publish\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-package(1)](cargo-package.html), [cargo-login(1)](cargo-login.html)\n\n<!-- File: doc/book/src/commands/cargo-remove.md (Tokens: ~2414 | Category: command-prompt) -->\n# cargo-remove(1)\n## NAME\n\ncargo-remove --- Remove dependencies from a Cargo.toml manifest file\n\n## SYNOPSIS\n\n`cargo remove` [_options_] _dependency_...\n\n## DESCRIPTION\n\nRemove one or more dependencies from a `Cargo.toml` manifest.\n\n## OPTIONS\n\n### Section options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove---dev\"><a class=\"option-anchor\" href=\"#option-cargo-remove---dev\"><code>--dev</code></a></dt>\n<dd class=\"option-desc\"><p>Remove as a <a href=\"../reference/specifying-dependencies.html#development-dependencies\">development dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---build\"><a class=\"option-anchor\" href=\"#option-cargo-remove---build\"><code>--build</code></a></dt>\n<dd class=\"option-desc\"><p>Remove as a <a href=\"../reference/specifying-dependencies.html#build-dependencies\">build dependency</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---target\"><a class=\"option-anchor\" href=\"#option-cargo-remove---target\"><code>--target</code> <em>target</em></a></dt>\n<dd class=\"option-desc\"><p>Remove as a dependency to the <a href=\"../reference/specifying-dependencies.html#platform-specific-dependencies\">given target platform</a>.</p>\n<p>To avoid unexpected shell expansions, you may use quotes around each target, e.g., <code>--target 'cfg(unix)'</code>.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove---dry-run\"><a class=\"option-anchor\" href=\"#option-cargo-remove---dry-run\"><code>--dry-run</code></a></dt>\n<dd class=\"option-desc\"><p>Don’t actually write to the manifest.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-remove--v\"><a class=\"option-anchor\" href=\"#option-cargo-remove--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-remove---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--q\"><a class=\"option-anchor\" href=\"#option-cargo-remove--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-remove---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---color\"><a class=\"option-anchor\" href=\"#option-cargo-remove---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-remove---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-remove---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---locked\"><a class=\"option-anchor\" href=\"#option-cargo-remove---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---offline\"><a class=\"option-anchor\" href=\"#option-cargo-remove---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-remove---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove--p\"><a class=\"option-anchor\" href=\"#option-cargo-remove--p\"><code>-p</code> <em>spec</em>…</a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---package\"><a class=\"option-anchor\" href=\"#option-cargo-remove---package\"><code>--package</code> <em>spec</em>…</a></dt>\n<dd class=\"option-desc\"><p>Package to remove from.</p>\n</dd>\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-remove-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-remove-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove---config\"><a class=\"option-anchor\" href=\"#option-cargo-remove---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--C\"><a class=\"option-anchor\" href=\"#option-cargo-remove--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--h\"><a class=\"option-anchor\" href=\"#option-cargo-remove--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-remove---help\"><a class=\"option-anchor\" href=\"#option-cargo-remove---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-remove--Z\"><a class=\"option-anchor\" href=\"#option-cargo-remove--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Remove `regex` as a dependency\n\n       cargo remove regex\n\n2. Remove `trybuild` as a dev-dependency\n\n       cargo remove --dev trybuild\n\n3. Remove `nom` from the `wasm32-unknown-unknown` dependencies table\n\n       cargo remove --target wasm32-unknown-unknown nom\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-add(1)](cargo-add.html)\n\n<!-- File: doc/book/src/commands/cargo-report-future-incompatibilities.md (Tokens: ~2312 | Category: command-prompt) -->\n# cargo-report-future-incompatibilities(1)\n## NAME\n\ncargo-report-future-incompatibilities --- Reports any crates which will eventually stop compiling\n\n## SYNOPSIS\n\n`cargo report future-incompatibilities` [_options_]\n\n## DESCRIPTION\n\nDisplays a report of future-incompatible warnings that were emitted during\nprevious builds.\nThese are warnings for changes that may become hard errors in the future,\ncausing dependencies to stop building in a future version of rustc.\n\nFor more, see the chapter on [Future incompat report](../reference/future-incompat-report.html).\n\n## OPTIONS\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---id\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---id\"><code>--id</code> <em>id</em></a></dt>\n<dd class=\"option-desc\"><p>Show the report with the specified Cargo-generated id.\nIf not specified, shows the most recent report.</p>\n</dd>\n\n\n</dl>\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--p\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---package\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to display a report for. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--v\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--q\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---color\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---locked\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---offline\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---config\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--C\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--h\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities---help\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report-future-incompatibilities--Z\"><a class=\"option-anchor\" href=\"#option-cargo-report-future-incompatibilities--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the latest future-incompat report:\n\n       cargo report future-incompat\n\n2. Display the latest future-incompat report for a specific package:\n\n       cargo report future-incompat --package my-dep@0.0.1\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-report(1)](cargo-report.html), [cargo-build(1)](cargo-build.html)\n\n<!-- File: doc/book/src/commands/cargo-report.md (Tokens: ~1782 | Category: command-prompt) -->\n# cargo-report(1)\n\n## NAME\n\ncargo-report --- Generate and display various kinds of reports\n\n## SYNOPSIS\n\n`cargo report` _type_ [_options_]\n\n## DESCRIPTION\n\nDisplays a report of the given _type_ --- currently, only `future-incompat` is supported\n\n## OPTIONS\n\n### Display Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report--v\"><a class=\"option-anchor\" href=\"#option-cargo-report--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-report---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--q\"><a class=\"option-anchor\" href=\"#option-cargo-report--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-report---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---color\"><a class=\"option-anchor\" href=\"#option-cargo-report---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n</dl>\n\n### Manifest Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-report---locked\"><a class=\"option-anchor\" href=\"#option-cargo-report---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---offline\"><a class=\"option-anchor\" href=\"#option-cargo-report---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-report---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-report-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-report-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report---config\"><a class=\"option-anchor\" href=\"#option-cargo-report---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--C\"><a class=\"option-anchor\" href=\"#option-cargo-report--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--h\"><a class=\"option-anchor\" href=\"#option-cargo-report--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-report---help\"><a class=\"option-anchor\" href=\"#option-cargo-report---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-report--Z\"><a class=\"option-anchor\" href=\"#option-cargo-report--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Display the available kinds of reports:\n\n       cargo report --help\n\n## SEE ALSO\n\n[cargo(1)](cargo.html), [cargo-report-future-incompatibilities(1)](cargo-report-future-incompatibilities.html)\n\n<!-- File: doc/book/src/commands/cargo-run.md (Tokens: ~4534 | Category: command-prompt) -->\n# cargo-run(1)\n## NAME\n\ncargo-run --- Run the current package\n\n## SYNOPSIS\n\n`cargo run` [_options_] [`--` _args_]\n\n## DESCRIPTION\n\nRun a binary or example of the local package.\n\nAll the arguments following the two dashes (`--`) are passed to the binary to\nrun. If you're passing arguments to both Cargo and the binary, the ones after\n`--` go to the binary, the ones before go to Cargo.\n\nUnlike [cargo-test(1)](cargo-test.html) and [cargo-bench(1)](cargo-bench.html), `cargo run` sets the \nworking directory of the binary executed to the current working directory, same \nas if it was executed in the shell directly.\n\n## OPTIONS\n\n### Package Selection\n\nBy default, the package in the current working directory is selected. The `-p`\nflag can be used to choose a different package in a workspace.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--p\"><a class=\"option-anchor\" href=\"#option-cargo-run--p\"><code>-p</code> <em>spec</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---package\"><a class=\"option-anchor\" href=\"#option-cargo-run---package\"><code>--package</code> <em>spec</em></a></dt>\n<dd class=\"option-desc\"><p>The package to run. See <a href=\"cargo-pkgid.html\">cargo-pkgid(1)</a> for the SPEC\nformat.</p>\n</dd>\n\n\n</dl>\n\n### Target Selection\n\nWhen no target selection options are given, `cargo run` will run the binary\ntarget. If there are multiple binary targets, you must pass a target flag to\nchoose one. Or, the `default-run` field may be specified in the `[package]`\nsection of `Cargo.toml` to choose the name of the binary to run by default.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---bin\"><a class=\"option-anchor\" href=\"#option-cargo-run---bin\"><code>--bin</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run the specified binary.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---example\"><a class=\"option-anchor\" href=\"#option-cargo-run---example\"><code>--example</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run the specified example.</p>\n</dd>\n\n\n</dl>\n\n### Feature Selection\n\nThe feature flags allow you to control which features are enabled. When no\nfeature options are given, the `default` feature is activated for every\nselected package.\n\nSee [the features documentation](../reference/features.html#command-line-feature-options)\nfor more details.\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--F\"><a class=\"option-anchor\" href=\"#option-cargo-run--F\"><code>-F</code> <em>features</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---features\"><a class=\"option-anchor\" href=\"#option-cargo-run---features\"><code>--features</code> <em>features</em></a></dt>\n<dd class=\"option-desc\"><p>Space or comma separated list of features to activate. Features of workspace\nmembers may be enabled with <code>package-name/feature-name</code> syntax. This flag may\nbe specified multiple times, which enables all specified features.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---all-features\"><a class=\"option-anchor\" href=\"#option-cargo-run---all-features\"><code>--all-features</code></a></dt>\n<dd class=\"option-desc\"><p>Activate all available features of all selected packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---no-default-features\"><a class=\"option-anchor\" href=\"#option-cargo-run---no-default-features\"><code>--no-default-features</code></a></dt>\n<dd class=\"option-desc\"><p>Do not activate the <code>default</code> feature of the selected packages.</p>\n</dd>\n\n\n</dl>\n\n### Compilation Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---target\"><a class=\"option-anchor\" href=\"#option-cargo-run---target\"><code>--target</code> <em>tuple</em></a></dt>\n<dd class=\"option-desc\"><p>Run for the specified target architecture. The default is the host architecture. The general format of the tuple is\n<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>.</p>\n<p>Possible values:</p>\n<ul>\n<li>Any supported target in <code>rustc --print target-list</code>.</li>\n<li><code>\"host-tuple\"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>\n<li>A path to a custom target specification. See <a href=\"../../rustc/targets/custom.html#custom-target-lookup-path\">Custom Target Lookup Path</a> for more information.</li>\n</ul>\n<p>This may also be specified with the <code>build.target</code> <a href=\"../reference/config.html\">config value</a>.</p>\n<p>Note that specifying this flag makes Cargo run in a different mode where the\ntarget artifacts are placed in a separate directory. See the\n<a href=\"../reference/build-cache.html\">build cache</a> documentation for more details.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--r\"><a class=\"option-anchor\" href=\"#option-cargo-run--r\"><code>-r</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---release\"><a class=\"option-anchor\" href=\"#option-cargo-run---release\"><code>--release</code></a></dt>\n<dd class=\"option-desc\"><p>Run optimized artifacts with the <code>release</code> profile.\nSee also the <code>--profile</code> option for choosing a specific profile by name.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---profile\"><a class=\"option-anchor\" href=\"#option-cargo-run---profile\"><code>--profile</code> <em>name</em></a></dt>\n<dd class=\"option-desc\"><p>Run with the given profile.\nSee <a href=\"../reference/profiles.html\">the reference</a> for more details on profiles.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---timings\"><a class=\"option-anchor\" href=\"#option-cargo-run---timings\"><code>--timings</code></a></dt>\n<dd class=\"option-desc\"><p>Output information how long each compilation takes, and track concurrency\ninformation over time.</p>\n<p>A file <code>cargo-timing.html</code> will be written to the <code>target/cargo-timings</code>\ndirectory at the end of the build. An additional report with a timestamp\nin its filename is also written if you want to look at a previous run.\nThese reports are suitable for human consumption only, and do not provide\nmachine-readable timing data.</p>\n</dd>\n\n\n\n</dl>\n\n### Output Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-run---target-dir\"><a class=\"option-anchor\" href=\"#option-cargo-run---target-dir\"><code>--target-dir</code> <em>directory</em></a></dt>\n<dd class=\"option-desc\"><p>Directory for all generated artifacts and intermediate files. May also be\nspecified with the <code>CARGO_TARGET_DIR</code> environment variable, or the\n<code>build.target-dir</code> <a href=\"../reference/config.html\">config value</a>.\nDefaults to <code>target</code> in the root of the workspace.</p>\n</dd>\n\n</dl>\n\n### Display Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run--v\"><a class=\"option-anchor\" href=\"#option-cargo-run--v\"><code>-v</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---verbose\"><a class=\"option-anchor\" href=\"#option-cargo-run---verbose\"><code>--verbose</code></a></dt>\n<dd class=\"option-desc\"><p>Use verbose output. May be specified twice for “very verbose” output which\nincludes extra output such as dependency warnings and build script output.\nMay also be specified with the <code>term.verbose</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--q\"><a class=\"option-anchor\" href=\"#option-cargo-run--q\"><code>-q</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---quiet\"><a class=\"option-anchor\" href=\"#option-cargo-run---quiet\"><code>--quiet</code></a></dt>\n<dd class=\"option-desc\"><p>Do not print cargo log messages.\nMay also be specified with the <code>term.quiet</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---color\"><a class=\"option-anchor\" href=\"#option-cargo-run---color\"><code>--color</code> <em>when</em></a></dt>\n<dd class=\"option-desc\"><p>Control when colored output is used. Valid values:</p>\n<ul>\n<li><code>auto</code> (default): Automatically detect if color support is available on the\nterminal.</li>\n<li><code>always</code>: Always display colors.</li>\n<li><code>never</code>: Never display colors.</li>\n</ul>\n<p>May also be specified with the <code>term.color</code>\n<a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---message-format\"><a class=\"option-anchor\" href=\"#option-cargo-run---message-format\"><code>--message-format</code> <em>fmt</em></a></dt>\n<dd class=\"option-desc\"><p>The output format for diagnostic messages. Can be specified multiple times\nand consists of comma-separated values. Valid values:</p>\n<ul>\n<li><code>human</code> (default): Display in a human-readable text format. Conflicts with\n<code>short</code> and <code>json</code>.</li>\n<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>\nand <code>json</code>.</li>\n<li><code>json</code>: Emit JSON messages to stdout. See\n<a href=\"../reference/external-tools.html#json-messages\">the reference</a>\nfor more details. Conflicts with <code>human</code> and <code>short</code>.</li>\n<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains\nthe “short” rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages\ncontains embedded ANSI color codes for respecting rustc’s default color\nscheme. Cannot be used with <code>human</code> or <code>short</code>.</li>\n<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics\nin JSON messages printed, but instead Cargo itself should render the\nJSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others\ncoming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>\n</ul>\n</dd>\n\n\n</dl>\n\n### Manifest Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run---manifest-path\"><a class=\"option-anchor\" href=\"#option-cargo-run---manifest-path\"><code>--manifest-path</code> <em>path</em></a></dt>\n<dd class=\"option-desc\"><p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the\n<code>Cargo.toml</code> file in the current directory or any parent directory.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---ignore-rust-version\"><a class=\"option-anchor\" href=\"#option-cargo-run---ignore-rust-version\"><code>--ignore-rust-version</code></a></dt>\n<dd class=\"option-desc\"><p>Ignore <code>rust-version</code> specification in packages.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---locked\"><a class=\"option-anchor\" href=\"#option-cargo-run---locked\"><code>--locked</code></a></dt>\n<dd class=\"option-desc\"><p>Asserts that the exact same dependencies and versions are used as when the\nexisting <code>Cargo.lock</code> file was originally generated. Cargo will exit with an\nerror when either of the following scenarios arises:</p>\n<ul>\n<li>The lock file is missing.</li>\n<li>Cargo attempted to change the lock file due to a different dependency resolution.</li>\n</ul>\n<p>It may be used in environments where deterministic builds are desired,\nsuch as in CI pipelines.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---offline\"><a class=\"option-anchor\" href=\"#option-cargo-run---offline\"><code>--offline</code></a></dt>\n<dd class=\"option-desc\"><p>Prevents Cargo from accessing the network for any reason. Without this\nflag, Cargo will stop with an error if it needs to access the network and\nthe network is not available. With this flag, Cargo will attempt to\nproceed without the network if possible.</p>\n<p>Beware that this may result in different dependency resolution than online\nmode. Cargo will restrict itself to crates that are downloaded locally, even\nif there might be a newer version as indicated in the local copy of the index.\nSee the <a href=\"cargo-fetch.html\">cargo-fetch(1)</a> command to download dependencies before going\noffline.</p>\n<p>May also be specified with the <code>net.offline</code> <a href=\"../reference/config.html\">config value</a>.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---frozen\"><a class=\"option-anchor\" href=\"#option-cargo-run---frozen\"><code>--frozen</code></a></dt>\n<dd class=\"option-desc\"><p>Equivalent to specifying both <code>--locked</code> and <code>--offline</code>.</p>\n</dd>\n\n\n\n</dl>\n\n### Common Options\n\n<dl>\n\n<dt class=\"option-term\" id=\"option-cargo-run-+toolchain\"><a class=\"option-anchor\" href=\"#option-cargo-run-+toolchain\"><code>+</code><em>toolchain</em></a></dt>\n<dd class=\"option-desc\"><p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>\nbegins with <code>+</code>, it will be interpreted as a rustup toolchain name (such\nas <code>+stable</code> or <code>+nightly</code>).\nSee the <a href=\"https://rust-lang.github.io/rustup/overrides.html\">rustup documentation</a>\nfor more information about how toolchain overrides work.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run---config\"><a class=\"option-anchor\" href=\"#option-cargo-run---config\"><code>--config</code> <em>KEY=VALUE</em> or <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Overrides a Cargo configuration value. The argument should be in TOML syntax of <code>KEY=VALUE</code>,\nor provided as a path to an extra configuration file. This flag may be specified multiple times.\nSee the <a href=\"../reference/config.html#command-line-overrides\">command-line overrides section</a> for more information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--C\"><a class=\"option-anchor\" href=\"#option-cargo-run--C\"><code>-C</code> <em>PATH</em></a></dt>\n<dd class=\"option-desc\"><p>Changes the current working directory before executing any specified operations. This affects\nthings like where cargo looks by default for the project manifest (<code>Cargo.toml</code>), as well as\nthe directories searched for discovering <code>.cargo/config.toml</code>, for example. This option must\nappear before the command name, for example <code>cargo -C path/to/my-project build</code>.</p>\n<p>This option is only available on the <a href=\"https://doc.rust-lang.org/book/appendix-07-nightly-rust.html\">nightly\nchannel</a> and\nrequires the <code>-Z unstable-options</code> flag to enable (see\n<a href=\"https://github.com/rust-lang/cargo/issues/10098\">#10098</a>).</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--h\"><a class=\"option-anchor\" href=\"#option-cargo-run--h\"><code>-h</code></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---help\"><a class=\"option-anchor\" href=\"#option-cargo-run---help\"><code>--help</code></a></dt>\n<dd class=\"option-desc\"><p>Prints help information.</p>\n</dd>\n\n\n<dt class=\"option-term\" id=\"option-cargo-run--Z\"><a class=\"option-anchor\" href=\"#option-cargo-run--Z\"><code>-Z</code> <em>flag</em></a></dt>\n<dd class=\"option-desc\"><p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for details.</p>\n</dd>\n\n\n</dl>\n\n### Miscellaneous Options\n\n<dl>\n<dt class=\"option-term\" id=\"option-cargo-run--j\"><a class=\"option-anchor\" href=\"#option-cargo-run--j\"><code>-j</code> <em>N</em></a></dt>\n<dt class=\"option-term\" id=\"option-cargo-run---jobs\"><a class=\"option-anchor\" href=\"#option-cargo-run---jobs\"><code>--jobs</code> <em>N</em></a></dt>\n<dd class=\"option-desc\"><p>Number of parallel jobs to run. May also be specified with the\n<code>build.jobs</code> <a href=\"../reference/config.html\">config value</a>. Defaults to\nthe number of logical CPUs. If negative, it sets the maximum number of\nparallel jobs to the number of logical CPUs plus provided value. If\na string <code>default</code> is provided, it sets the value back to defaults.\nShould not be 0.</p>\n</dd>\n\n<dt class=\"option-term\" id=\"option-cargo-run---keep-going\"><a class=\"option-anchor\" href=\"#option-cargo-run---keep-going\"><code>--keep-going</code></a></dt>\n<dd class=\"option-desc\"><p>Build as many crates in the dependency graph as possible, rather than aborting\nthe build on the first one that fails to build.</p>\n<p>For example if the current package depends on dependencies <code>fails</code> and <code>works</code>,\none of which fails to build, <code>cargo run -j1</code> may or may not build the\none that succeeds (depending on which one of the two builds Cargo picked to run\nfirst), whereas <code>cargo run -j1 --keep-going</code> would definitely run both\nbuilds, even if the one run first fails.</p>\n</dd>\n\n</dl>\n\n## ENVIRONMENT\n\nSee [the reference](../reference/environment-variables.html) for\ndetails on environment variables that Cargo reads.\n\n## EXIT STATUS\n\n* `0`: Cargo succeeded.\n* `101`: Cargo failed to complete.\n\n## EXAMPLES\n\n1. Build the local package and run its main target (assuming only one binary):\n\n       cargo run\n\n2. Run an example with extra arguments:\n\n       cargo run --example exname -- --exoption exarg1 exarg2\n\n## SEE ALSO\n[cargo(1)](cargo.html), [cargo-build(1)](cargo-build.html)\n\n<!-- ... +18 more modular skills available via /api/skills/rust-lang/cargo?path={path} -->\n</yakaai_skills>"}