mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Remove old HTML generated man pages.
This commit is contained in:
parent
7b7d80e84a
commit
25291c6c36
@ -1,545 +0,0 @@
|
||||
<h2 id="cargo_bench_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-bench - Execute benchmarks of a package</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_bench_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo bench [<em>OPTIONS</em>] [BENCHNAME] [-- <em>BENCH-OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_bench_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Compile and execute benchmarks.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The benchmark filtering argument <code>BENCHNAME</code> and all the arguments following
|
||||
the two dashes (<code>--</code>) are passed to the benchmark binaries and thus to
|
||||
<em>libtest</em> (rustc’s built in unit-test and micro-benchmarking framework). If
|
||||
you’re passing arguments to both Cargo and the binary, the ones after <code>--</code> go
|
||||
to the binary, the ones before go to Cargo. For details about libtest’s
|
||||
arguments see the output of <code>cargo bench -- --help</code>. As an example, this will
|
||||
run only the benchmark named <code>foo</code> (and skip other similarly named benchmarks
|
||||
like <code>foobar</code>):</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo bench -- foo --exact</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Benchmarks are built with the <code>--test</code> option to <code>rustc</code> which creates an
|
||||
executable with a <code>main</code> function that automatically runs all functions
|
||||
annotated with the <code>#[bench]</code> attribute. Cargo passes the <code>--bench</code> flag to
|
||||
the test harness to tell it to run only benchmarks.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The libtest harness may be disabled by setting <code>harness = false</code> in the target
|
||||
manifest settings, in which case your code will need to provide its own <code>main</code>
|
||||
function to handle running benchmarks.</p>
|
||||
</div>
|
||||
<div class="quoteblock">
|
||||
<blockquote>
|
||||
<div class="paragraph">
|
||||
<p><strong>Note</strong>: The
|
||||
<a href="https://doc.rust-lang.org/nightly/unstable-book/library-features/test.html"><code>#[bench]</code> attribute</a>
|
||||
is currently unstable and only available on the
|
||||
<a href="https://doc.rust-lang.org/book/appendix-07-nightly-rust.html">nightly channel</a>.
|
||||
There are some packages available on
|
||||
<a href="https://crates.io/keywords/benchmark">crates.io</a> that may help with
|
||||
running benchmarks on the stable channel, such as
|
||||
<a href="https://crates.io/crates/criterion">Criterion</a>.</p>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_bench_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_benchmark_options">Benchmark Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--no-run</strong></dt>
|
||||
<dd>
|
||||
<p>Compile, but don’t run benchmarks.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-fail-fast</strong></dt>
|
||||
<dd>
|
||||
<p>Run all benchmarks regardless of failure. Without this flag, Cargo will exit
|
||||
after the first executable fails. The Rust test harness will run all
|
||||
benchmarks within the executable to completion, this flag only applies to
|
||||
the executable as a whole.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, when no package selection options are given, the packages selected
|
||||
depend on the selected manifest file (based on the current working directory if
|
||||
<code>--manifest-path</code> is not given). If the manifest is the root of a workspace then
|
||||
the workspaces default members are selected, otherwise only the package defined
|
||||
by the manifest will be selected.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default members of a workspace can be set explicitly with the
|
||||
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
|
||||
virtual workspace will include all workspace members (equivalent to passing
|
||||
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em>…​</dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Benchmark only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
|
||||
SPEC format. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--workspace</strong></dt>
|
||||
<dd>
|
||||
<p>Benchmark all members in the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all</strong></dt>
|
||||
<dd>
|
||||
<p>Deprecated alias for <code>--workspace</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Exclude the specified packages. Must be used in conjunction with the
|
||||
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_target_selection">Target Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no target selection options are given, <code>cargo bench</code> will build the
|
||||
following targets of the selected packages:</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p>lib — used to link with binaries and benchmarks</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>bins (only if benchmark targets are built and required features are
|
||||
available)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>lib as a benchmark</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>bins as benchmarks</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>benchmark targets</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default behavior can be changed by setting the <code>bench</code> flag for the target
|
||||
in the manifest settings. Setting examples to <code>bench = true</code> will build and
|
||||
run the example as a benchmark. Setting targets to <code>bench = false</code> will stop
|
||||
them from being benchmarked by default. Target selection options that take a
|
||||
target by name ignore the <code>bench</code> flag and will always benchmark the given
|
||||
target.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Passing target selection flags will benchmark only the
|
||||
specified targets.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Benchmark the package’s library.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Benchmark the specified binary. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bins</strong></dt>
|
||||
<dd>
|
||||
<p>Benchmark all binary targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--example</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Benchmark the specified example. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--examples</strong></dt>
|
||||
<dd>
|
||||
<p>Benchmark all example targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--test</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Benchmark the specified integration test. This flag may be specified multiple
|
||||
times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--tests</strong></dt>
|
||||
<dd>
|
||||
<p>Benchmark all targets in test mode that have the <code>test = true</code> manifest
|
||||
flag set. By default this includes the library and binaries built as
|
||||
unittests, and integration tests. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
unittest, and once as a dependency for binaries, integration tests, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>test</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bench</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Benchmark the specified benchmark. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--benches</strong></dt>
|
||||
<dd>
|
||||
<p>Benchmark all targets in benchmark mode that have the <code>bench = true</code>
|
||||
manifest flag set. By default this includes the library and binaries built
|
||||
as benchmarks, and bench targets. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
benchmark, and once as a dependency for binaries, benchmarks, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>bench</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-targets</strong></dt>
|
||||
<dd>
|
||||
<p>Benchmark all targets. This is equivalent to specifying <code>--lib --bins
|
||||
--tests --benches --examples</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Benchmark for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_display_options">Display Options</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default the Rust test harness hides output from benchmark execution to keep
|
||||
results readable. Benchmark output can be recovered (e.g., for debugging) by
|
||||
passing <code>--nocapture</code> to the benchmark binaries:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo bench -- --nocapture</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
|
||||
<dd>
|
||||
<p>The output format for diagnostic messages. Can be specified multiple times
|
||||
and consists of comma-separated values. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>human</code> (default): Display in a human-readable text format.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json</code>: Emit JSON messages to stdout. See
|
||||
<a href="../reference/external-tools.html#json-messages">the reference</a>
|
||||
for more details.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
|
||||
the "short" rendering from rustc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
|
||||
contains embedded ANSI color codes for respecting rustc’s default color
|
||||
scheme.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
|
||||
in JSON messages printed, but instead Cargo itself should render the
|
||||
JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others
|
||||
coming from rustc are still emitted.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_bench_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="paragraph">
|
||||
<p>The <code>--jobs</code> argument affects the building of the benchmark executable but
|
||||
does not affect how many threads are used when running the benchmarks. The
|
||||
Rust test harness runs benchmarks serially in a single thread.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_bench_profiles">PROFILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Profiles may be used to configure compiler options such as optimization levels
|
||||
and debug settings. See
|
||||
<a href="../reference/profiles.html">the reference</a>
|
||||
for more details.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Benchmarks are always built with the <code>bench</code> profile. Binary and lib targets
|
||||
are built separately as benchmarks with the <code>bench</code> profile. Library targets
|
||||
are built with the <code>release</code> profiles when linked to binaries and benchmarks.
|
||||
Dependencies use the <code>release</code> profile.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If you need a debug build of a benchmark, try building it with
|
||||
<a href="cargo-build.html">cargo-build(1)</a> which will use the <code>test</code> profile which is by default
|
||||
unoptimized and includes debug information. You can then run the debug-enabled
|
||||
benchmark manually.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_bench_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_bench_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_bench_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Build and execute all the benchmarks of the current package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo bench</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Run only a specific benchmark within a specific benchmark target:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo bench --bench bench_name -- modname::some_benchmark</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_bench_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-test.html">cargo-test(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,494 +0,0 @@
|
||||
<h2 id="cargo_build_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-build - Compile the current package</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_build_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo build [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_build_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Compile local packages and all of their dependencies.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_build_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_build_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, when no package selection options are given, the packages selected
|
||||
depend on the selected manifest file (based on the current working directory if
|
||||
<code>--manifest-path</code> is not given). If the manifest is the root of a workspace then
|
||||
the workspaces default members are selected, otherwise only the package defined
|
||||
by the manifest will be selected.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default members of a workspace can be set explicitly with the
|
||||
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
|
||||
virtual workspace will include all workspace members (equivalent to passing
|
||||
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em>…​</dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Build only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
|
||||
SPEC format. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--workspace</strong></dt>
|
||||
<dd>
|
||||
<p>Build all members in the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all</strong></dt>
|
||||
<dd>
|
||||
<p>Deprecated alias for <code>--workspace</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Exclude the specified packages. Must be used in conjunction with the
|
||||
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_build_target_selection">Target Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no target selection options are given, <code>cargo build</code> will build all
|
||||
binary and library targets of the selected packages. Binaries are skipped if
|
||||
they have <code>required-features</code> that are missing.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Passing target selection flags will build only the
|
||||
specified targets.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Build the package’s library.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Build the specified binary. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bins</strong></dt>
|
||||
<dd>
|
||||
<p>Build all binary targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--example</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Build the specified example. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--examples</strong></dt>
|
||||
<dd>
|
||||
<p>Build all example targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--test</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Build the specified integration test. This flag may be specified multiple
|
||||
times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--tests</strong></dt>
|
||||
<dd>
|
||||
<p>Build all targets in test mode that have the <code>test = true</code> manifest
|
||||
flag set. By default this includes the library and binaries built as
|
||||
unittests, and integration tests. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
unittest, and once as a dependency for binaries, integration tests, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>test</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bench</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Build the specified benchmark. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--benches</strong></dt>
|
||||
<dd>
|
||||
<p>Build all targets in benchmark mode that have the <code>bench = true</code>
|
||||
manifest flag set. By default this includes the library and binaries built
|
||||
as benchmarks, and bench targets. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
benchmark, and once as a dependency for binaries, benchmarks, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>bench</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-targets</strong></dt>
|
||||
<dd>
|
||||
<p>Build all targets. This is equivalent to specifying <code>--lib --bins
|
||||
--tests --benches --examples</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_build_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_build_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Build for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--release</strong></dt>
|
||||
<dd>
|
||||
<p>Build optimized artifacts with the <code>release</code> profile. See the
|
||||
<a href="#cargo_build_profiles">PROFILES</a> section for details on how this affects profile selection.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_build_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--out-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Copy final artifacts to this directory.</p>
|
||||
<div class="paragraph">
|
||||
<p>This option is unstable and available only on the
|
||||
<a href="https://doc.rust-lang.org/book/appendix-07-nightly-rust.html">nightly channel</a>
|
||||
and requires the <code>-Z unstable-options</code> flag to enable.
|
||||
See <a href="https://github.com/rust-lang/cargo/issues/6790" class="bare">https://github.com/rust-lang/cargo/issues/6790</a> for more information.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_build_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
|
||||
<dd>
|
||||
<p>The output format for diagnostic messages. Can be specified multiple times
|
||||
and consists of comma-separated values. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>human</code> (default): Display in a human-readable text format.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json</code>: Emit JSON messages to stdout. See
|
||||
<a href="../reference/external-tools.html#json-messages">the reference</a>
|
||||
for more details.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
|
||||
the "short" rendering from rustc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
|
||||
contains embedded ANSI color codes for respecting rustc’s default color
|
||||
scheme.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
|
||||
in JSON messages printed, but instead Cargo itself should render the
|
||||
JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others
|
||||
coming from rustc are still emitted.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--build-plan</strong></dt>
|
||||
<dd>
|
||||
<p>Outputs a series of JSON messages to stdout that indicate the commands to
|
||||
run the build.</p>
|
||||
<div class="paragraph">
|
||||
<p>This option is unstable and available only on the
|
||||
<a href="https://doc.rust-lang.org/book/appendix-07-nightly-rust.html">nightly channel</a>
|
||||
and requires the <code>-Z unstable-options</code> flag to enable.
|
||||
See <a href="https://github.com/rust-lang/cargo/issues/5579" class="bare">https://github.com/rust-lang/cargo/issues/5579</a> for more information.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_build_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_build_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_build_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_build_profiles">PROFILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Profiles may be used to configure compiler options such as optimization levels
|
||||
and debug settings. See
|
||||
<a href="../reference/profiles.html">the reference</a>
|
||||
for more details.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Profile selection depends on the target and crate being built. By default the
|
||||
<code>dev</code> or <code>test</code> profiles are used. If the <code>--release</code> flag is given, then the
|
||||
<code>release</code> or <code>bench</code> profiles are used.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all fit-content">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Target</th>
|
||||
<th class="tableblock halign-left valign-top">Default Profile</th>
|
||||
<th class="tableblock halign-left valign-top"><code>--release</code> Profile</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">lib, bin, example</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dev</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>release</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">test, bench, or any target<br>
|
||||
in "test" or "bench" mode</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>test</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bench</code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="paragraph">
|
||||
<p>Dependencies use the <code>dev</code>/<code>release</code> profiles.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_build_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_build_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_build_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Build the local package and all of its dependencies:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo build</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Build with optimizations:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo build --release</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_build_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-rustc.html">cargo-rustc(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,485 +0,0 @@
|
||||
<h2 id="cargo_check_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-check - Check the current package</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_check_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo check [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_check_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Check a local package and all of its dependencies for errors. This will
|
||||
essentially compile the packages without performing the final step of code
|
||||
generation, which is faster than running <code>cargo build</code>. The compiler will save
|
||||
metadata files to disk so that future runs will reuse them if the source has
|
||||
not been modified.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_check_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_check_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, when no package selection options are given, the packages selected
|
||||
depend on the selected manifest file (based on the current working directory if
|
||||
<code>--manifest-path</code> is not given). If the manifest is the root of a workspace then
|
||||
the workspaces default members are selected, otherwise only the package defined
|
||||
by the manifest will be selected.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default members of a workspace can be set explicitly with the
|
||||
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
|
||||
virtual workspace will include all workspace members (equivalent to passing
|
||||
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em>…​</dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Check only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
|
||||
SPEC format. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--workspace</strong></dt>
|
||||
<dd>
|
||||
<p>Check all members in the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all</strong></dt>
|
||||
<dd>
|
||||
<p>Deprecated alias for <code>--workspace</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Exclude the specified packages. Must be used in conjunction with the
|
||||
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_check_target_selection">Target Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no target selection options are given, <code>cargo check</code> will check all
|
||||
binary and library targets of the selected packages. Binaries are skipped if
|
||||
they have <code>required-features</code> that are missing.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Passing target selection flags will check only the
|
||||
specified targets.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Check the package’s library.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Check the specified binary. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bins</strong></dt>
|
||||
<dd>
|
||||
<p>Check all binary targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--example</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Check the specified example. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--examples</strong></dt>
|
||||
<dd>
|
||||
<p>Check all example targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--test</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Check the specified integration test. This flag may be specified multiple
|
||||
times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--tests</strong></dt>
|
||||
<dd>
|
||||
<p>Check all targets in test mode that have the <code>test = true</code> manifest
|
||||
flag set. By default this includes the library and binaries built as
|
||||
unittests, and integration tests. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
unittest, and once as a dependency for binaries, integration tests, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>test</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bench</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Check the specified benchmark. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--benches</strong></dt>
|
||||
<dd>
|
||||
<p>Check all targets in benchmark mode that have the <code>bench = true</code>
|
||||
manifest flag set. By default this includes the library and binaries built
|
||||
as benchmarks, and bench targets. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
benchmark, and once as a dependency for binaries, benchmarks, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>bench</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-targets</strong></dt>
|
||||
<dd>
|
||||
<p>Check all targets. This is equivalent to specifying <code>--lib --bins
|
||||
--tests --benches --examples</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_check_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_check_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Check for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--release</strong></dt>
|
||||
<dd>
|
||||
<p>Check optimized artifacts with the <code>release</code> profile. See the
|
||||
<a href="#cargo_check_profiles">PROFILES</a> section for details on how this affects profile selection.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--profile</strong> <em>NAME</em></dt>
|
||||
<dd>
|
||||
<p>Changes check behavior. Currently only <code>test</code> is
|
||||
supported, which will check with the
|
||||
<code>#[cfg(test)]</code> attribute enabled. This is useful to have it
|
||||
check unit tests which are usually excluded via
|
||||
the <code>cfg</code> attribute. This does not change the actual profile used.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_check_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_check_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
|
||||
<dd>
|
||||
<p>The output format for diagnostic messages. Can be specified multiple times
|
||||
and consists of comma-separated values. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>human</code> (default): Display in a human-readable text format.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json</code>: Emit JSON messages to stdout. See
|
||||
<a href="../reference/external-tools.html#json-messages">the reference</a>
|
||||
for more details.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
|
||||
the "short" rendering from rustc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
|
||||
contains embedded ANSI color codes for respecting rustc’s default color
|
||||
scheme.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
|
||||
in JSON messages printed, but instead Cargo itself should render the
|
||||
JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others
|
||||
coming from rustc are still emitted.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_check_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_check_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_check_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_check_profiles">PROFILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Profiles may be used to configure compiler options such as optimization levels
|
||||
and debug settings. See
|
||||
<a href="../reference/profiles.html">the reference</a>
|
||||
for more details.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Profile selection depends on the target and crate being built. By default the
|
||||
<code>dev</code> or <code>test</code> profiles are used. If the <code>--release</code> flag is given, then the
|
||||
<code>release</code> or <code>bench</code> profiles are used.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all fit-content">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Target</th>
|
||||
<th class="tableblock halign-left valign-top">Default Profile</th>
|
||||
<th class="tableblock halign-left valign-top"><code>--release</code> Profile</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">lib, bin, example</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dev</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>release</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">test, bench, or any target<br>
|
||||
in "test" or "bench" mode</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>test</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bench</code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="paragraph">
|
||||
<p>Dependencies use the <code>dev</code>/<code>release</code> profiles.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_check_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_check_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_check_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Check the local package for errors:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo check</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Check all targets, including unit tests:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo check --all-targets --profile=test</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_check_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-build.html">cargo-build(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,254 +0,0 @@
|
||||
<h2 id="cargo_clean_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-clean - Remove generated artifacts</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_clean_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo clean [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_clean_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Remove artifacts from the target directory that Cargo has generated in the
|
||||
past.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>With no options, <code>cargo clean</code> will delete the entire target directory.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_clean_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_clean_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no packages are selected, all packages and all dependencies in the
|
||||
workspace are cleaned.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em>…​</dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Clean only the specified packages. This flag may be specified
|
||||
multiple times. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the SPEC format.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_clean_clean_options">Clean Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--doc</strong></dt>
|
||||
<dd>
|
||||
<p>This option will cause <code>cargo clean</code> to remove only the <code>doc</code> directory in
|
||||
the target directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--release</strong></dt>
|
||||
<dd>
|
||||
<p>Clean all artifacts that were built with the <code>release</code> or <code>bench</code>
|
||||
profiles.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Clean for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_clean_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_clean_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_clean_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_clean_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_clean_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_clean_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Remove the entire target directory:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo clean</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Remove only the release artifacts:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo clean --release</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_clean_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-build.html">cargo-build(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,448 +0,0 @@
|
||||
<h2 id="cargo_doc_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-doc - Build a package's documentation</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_doc_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo doc [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_doc_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Build the documentation for the local package and all dependencies. The output
|
||||
is placed in <code>target/doc</code> in rustdoc’s usual format.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_doc_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_documentation_options">Documentation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--open</strong></dt>
|
||||
<dd>
|
||||
<p>Open the docs in a browser after building them. This will use your default
|
||||
browser unless you define another one in the <code>BROWSER</code> environment
|
||||
variable.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-deps</strong></dt>
|
||||
<dd>
|
||||
<p>Do not build documentation for dependencies.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--document-private-items</strong></dt>
|
||||
<dd>
|
||||
<p>Include non-public items in the documentation.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, when no package selection options are given, the packages selected
|
||||
depend on the selected manifest file (based on the current working directory if
|
||||
<code>--manifest-path</code> is not given). If the manifest is the root of a workspace then
|
||||
the workspaces default members are selected, otherwise only the package defined
|
||||
by the manifest will be selected.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default members of a workspace can be set explicitly with the
|
||||
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
|
||||
virtual workspace will include all workspace members (equivalent to passing
|
||||
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em>…​</dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Document only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
|
||||
SPEC format. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--workspace</strong></dt>
|
||||
<dd>
|
||||
<p>Document all members in the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all</strong></dt>
|
||||
<dd>
|
||||
<p>Deprecated alias for <code>--workspace</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Exclude the specified packages. Must be used in conjunction with the
|
||||
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_target_selection">Target Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no target selection options are given, <code>cargo doc</code> will document all
|
||||
binary and library targets of the selected package. The binary will be skipped
|
||||
if its name is the same as the lib target. Binaries are skipped if they have
|
||||
<code>required-features</code> that are missing.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default behavior can be changed by setting <code>doc = false</code> for the target in
|
||||
the manifest settings. Using target selection options will ignore the <code>doc</code>
|
||||
flag and will always document the given target.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Document the package’s library.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Document the specified binary. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bins</strong></dt>
|
||||
<dd>
|
||||
<p>Document all binary targets.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Document for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--release</strong></dt>
|
||||
<dd>
|
||||
<p>Document optimized artifacts with the <code>release</code> profile. See the
|
||||
<a href="#cargo_doc_profiles">PROFILES</a> section for details on how this affects profile selection.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
|
||||
<dd>
|
||||
<p>The output format for diagnostic messages. Can be specified multiple times
|
||||
and consists of comma-separated values. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>human</code> (default): Display in a human-readable text format.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json</code>: Emit JSON messages to stdout. See
|
||||
<a href="../reference/external-tools.html#json-messages">the reference</a>
|
||||
for more details.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
|
||||
the "short" rendering from rustc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
|
||||
contains embedded ANSI color codes for respecting rustc’s default color
|
||||
scheme.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
|
||||
in JSON messages printed, but instead Cargo itself should render the
|
||||
JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others
|
||||
coming from rustc are still emitted.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_doc_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_doc_profiles">PROFILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Profiles may be used to configure compiler options such as optimization levels
|
||||
and debug settings. See
|
||||
<a href="../reference/profiles.html">the reference</a>
|
||||
for more details.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Profile selection depends on the target and crate being built. By default the
|
||||
<code>dev</code> or <code>test</code> profiles are used. If the <code>--release</code> flag is given, then the
|
||||
<code>release</code> or <code>bench</code> profiles are used.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all fit-content">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Target</th>
|
||||
<th class="tableblock halign-left valign-top">Default Profile</th>
|
||||
<th class="tableblock halign-left valign-top"><code>--release</code> Profile</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">lib, bin, example</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dev</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>release</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">test, bench, or any target<br>
|
||||
in "test" or "bench" mode</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>test</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bench</code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="paragraph">
|
||||
<p>Dependencies use the <code>dev</code>/<code>release</code> profiles.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_doc_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_doc_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_doc_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Build the local package documentation and its dependencies and output to
|
||||
<code>target/doc</code>.</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo doc</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_doc_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-rustdoc.html">cargo-rustdoc(1)</a>, <a href="https://doc.rust-lang.org/rustdoc/index.html">rustdoc(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,223 +0,0 @@
|
||||
<h2 id="cargo_fetch_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-fetch - Fetch dependencies of a package from the network</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fetch_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo fetch [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fetch_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>If a <code>Cargo.lock</code> file is available, this command will ensure that all of the
|
||||
git dependencies and/or registry dependencies are downloaded and locally
|
||||
available. Subsequent Cargo commands never touch the network after a <code>cargo
|
||||
fetch</code> unless the lock file changes.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If the lock file is not available, then this command will generate the lock
|
||||
file before fetching the dependencies.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If <code>--target</code> is not specified, then all target dependencies are fetched.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See also the <a href="https://crates.io/crates/cargo-prefetch">cargo-prefetch</a>
|
||||
plugin which adds a command to download popular crates. This may be useful if
|
||||
you plan to use Cargo without a network with the <code>--offline</code> flag.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fetch_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fetch_fetch_options">Fetch options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Fetch for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fetch_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fetch_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fetch_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fetch_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fetch_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fetch_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Fetch all dependencies:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo fetch</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fetch_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-update.html">cargo-update(1)</a>, <a href="cargo-generate-lockfile.html">cargo-generate-lockfile(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,569 +0,0 @@
|
||||
<h2 id="cargo_fix_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-fix - Automatically fix lint warnings reported by rustc</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fix_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo fix [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fix_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This Cargo subcommand will automatically take rustc’s suggestions from
|
||||
diagnostics like warnings and apply them to your source code. This is intended
|
||||
to help automate tasks that rustc itself already knows how to tell you to fix!
|
||||
The <code>cargo fix</code> subcommand is also being developed for the Rust 2018 edition
|
||||
to provide code the ability to easily opt-in to the new edition without having
|
||||
to worry about any breakage.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Executing <code>cargo fix</code> will under the hood execute <a href="cargo-check.html">cargo-check(1)</a>. Any warnings
|
||||
applicable to your crate will be automatically fixed (if possible) and all
|
||||
remaining warnings will be displayed when the check process is finished. For
|
||||
example if you’d like to prepare for the 2018 edition, you can do so by
|
||||
executing:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo fix --edition</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>which behaves the same as <code>cargo check --all-targets</code>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p><code>cargo fix</code> is only capable of fixing code that is normally compiled with
|
||||
<code>cargo check</code>. If code is conditionally enabled with optional features, you
|
||||
will need to enable those features for that code to be analyzed:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo fix --edition --features foo</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Similarly, other <code>cfg</code> expressions like platform-specific code will need to
|
||||
pass <code>--target</code> to fix code for the given target.</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo fix --edition --target x86_64-pc-windows-gnu</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If you encounter any problems with <code>cargo fix</code> or otherwise have any questions
|
||||
or feature requests please don’t hesitate to file an issue at
|
||||
<a href="https://github.com/rust-lang/cargo" class="bare">https://github.com/rust-lang/cargo</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fix_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_fix_options">Fix options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--broken-code</strong></dt>
|
||||
<dd>
|
||||
<p>Fix code even if it already has compiler errors. This is useful if <code>cargo
|
||||
fix</code> fails to apply the changes. It will apply the changes and leave the
|
||||
broken code in the working directory for you to inspect and manually fix.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--edition</strong></dt>
|
||||
<dd>
|
||||
<p>Apply changes that will update the code to the latest edition. This will
|
||||
not update the edition in the <code>Cargo.toml</code> manifest, which must be updated
|
||||
manually.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--edition-idioms</strong></dt>
|
||||
<dd>
|
||||
<p>Apply suggestions that will update code to the preferred style for the
|
||||
current edition.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--allow-no-vcs</strong></dt>
|
||||
<dd>
|
||||
<p>Fix code even if a VCS was not detected.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--allow-dirty</strong></dt>
|
||||
<dd>
|
||||
<p>Fix code even if the working directory has changes.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--allow-staged</strong></dt>
|
||||
<dd>
|
||||
<p>Fix code even if the working directory has staged changes.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, when no package selection options are given, the packages selected
|
||||
depend on the selected manifest file (based on the current working directory if
|
||||
<code>--manifest-path</code> is not given). If the manifest is the root of a workspace then
|
||||
the workspaces default members are selected, otherwise only the package defined
|
||||
by the manifest will be selected.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default members of a workspace can be set explicitly with the
|
||||
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
|
||||
virtual workspace will include all workspace members (equivalent to passing
|
||||
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em>…​</dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Fix only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
|
||||
SPEC format. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--workspace</strong></dt>
|
||||
<dd>
|
||||
<p>Fix all members in the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all</strong></dt>
|
||||
<dd>
|
||||
<p>Deprecated alias for <code>--workspace</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Exclude the specified packages. Must be used in conjunction with the
|
||||
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_target_selection">Target Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no target selection options are given, <code>cargo fix</code> will fix all targets
|
||||
(<code>--all-targets</code> implied). Binaries are skipped if they have
|
||||
<code>required-features</code> that are missing.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Passing target selection flags will fix only the
|
||||
specified targets.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Fix the package’s library.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Fix the specified binary. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bins</strong></dt>
|
||||
<dd>
|
||||
<p>Fix all binary targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--example</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Fix the specified example. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--examples</strong></dt>
|
||||
<dd>
|
||||
<p>Fix all example targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--test</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Fix the specified integration test. This flag may be specified multiple
|
||||
times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--tests</strong></dt>
|
||||
<dd>
|
||||
<p>Fix all targets in test mode that have the <code>test = true</code> manifest
|
||||
flag set. By default this includes the library and binaries built as
|
||||
unittests, and integration tests. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
unittest, and once as a dependency for binaries, integration tests, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>test</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bench</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Fix the specified benchmark. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--benches</strong></dt>
|
||||
<dd>
|
||||
<p>Fix all targets in benchmark mode that have the <code>bench = true</code>
|
||||
manifest flag set. By default this includes the library and binaries built
|
||||
as benchmarks, and bench targets. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
benchmark, and once as a dependency for binaries, benchmarks, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>bench</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-targets</strong></dt>
|
||||
<dd>
|
||||
<p>Fix all targets. This is equivalent to specifying <code>--lib --bins
|
||||
--tests --benches --examples</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Fix for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--release</strong></dt>
|
||||
<dd>
|
||||
<p>Fix optimized artifacts with the <code>release</code> profile. See the
|
||||
<a href="#cargo_fix_profiles">PROFILES</a> section for details on how this affects profile selection.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--profile</strong> <em>NAME</em></dt>
|
||||
<dd>
|
||||
<p>Changes fix behavior. Currently only <code>test</code> is
|
||||
supported, which will fix with the
|
||||
<code>#[cfg(test)]</code> attribute enabled. This is useful to have it
|
||||
fix unit tests which are usually excluded via
|
||||
the <code>cfg</code> attribute. This does not change the actual profile used.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
|
||||
<dd>
|
||||
<p>The output format for diagnostic messages. Can be specified multiple times
|
||||
and consists of comma-separated values. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>human</code> (default): Display in a human-readable text format.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json</code>: Emit JSON messages to stdout. See
|
||||
<a href="../reference/external-tools.html#json-messages">the reference</a>
|
||||
for more details.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
|
||||
the "short" rendering from rustc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
|
||||
contains embedded ANSI color codes for respecting rustc’s default color
|
||||
scheme.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
|
||||
in JSON messages printed, but instead Cargo itself should render the
|
||||
JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others
|
||||
coming from rustc are still emitted.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_fix_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fix_profiles">PROFILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Profiles may be used to configure compiler options such as optimization levels
|
||||
and debug settings. See
|
||||
<a href="../reference/profiles.html">the reference</a>
|
||||
for more details.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Profile selection depends on the target and crate being built. By default the
|
||||
<code>dev</code> or <code>test</code> profiles are used. If the <code>--release</code> flag is given, then the
|
||||
<code>release</code> or <code>bench</code> profiles are used.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all fit-content">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Target</th>
|
||||
<th class="tableblock halign-left valign-top">Default Profile</th>
|
||||
<th class="tableblock halign-left valign-top"><code>--release</code> Profile</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">lib, bin, example</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dev</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>release</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">test, bench, or any target<br>
|
||||
in "test" or "bench" mode</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>test</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bench</code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="paragraph">
|
||||
<p>Dependencies use the <code>dev</code>/<code>release</code> profiles.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fix_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fix_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fix_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Apply compiler suggestions to the local package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo fix</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Convert a 2015 edition to 2018:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo fix --edition</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Apply suggested idioms for the current edition:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo fix --edition-idioms</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_fix_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-check.html">cargo-check(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,191 +0,0 @@
|
||||
<h2 id="cargo_generate_lockfile_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-generate-lockfile - Generate the lockfile for a package</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_generate_lockfile_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo generate-lockfile [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_generate_lockfile_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will create the <code>Cargo.lock</code> lockfile for the current package or
|
||||
workspace. If the lockfile already exists, it will be rebuilt if there are any
|
||||
manifest changes or dependency updates.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See also <a href="cargo-update.html">cargo-update(1)</a> which is also capable of creating a <code>Cargo.lock</code>
|
||||
lockfile and has more options for controlling update behavior.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_generate_lockfile_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_generate_lockfile_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_generate_lockfile_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_generate_lockfile_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_generate_lockfile_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_generate_lockfile_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_generate_lockfile_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Create or update the lockfile for the current package or workspace:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo generate-lockfile</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_generate_lockfile_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-update.html">cargo-update(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,53 +0,0 @@
|
||||
<h2 id="cargo_help_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-help - Get help for a Cargo command</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_help_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo help [<em>SUBCOMMAND</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_help_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Prints a help message for the given command.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_help_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Get help for a command:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo help build</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Help is also available with the <code>--help</code> flag:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo build --help</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_help_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,263 +0,0 @@
|
||||
<h2 id="cargo_init_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-init - Create a new Cargo package in an existing directory</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_init_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo init [<em>OPTIONS</em>] [<em>PATH</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_init_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will create a new Cargo manifest in the current directory. Give a
|
||||
path as an argument to create in the given directory.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If there are typically-named Rust source files already in the directory, those
|
||||
will be used. If not, then a sample <code>src/main.rs</code> file will be created, or
|
||||
<code>src/lib.rs</code> if <code>--lib</code> is passed.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If the directory is not already in a VCS repository, then a new repository
|
||||
is created (see <code>--vcs</code> below).</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The "authors" field in the manifest is determined from the environment or
|
||||
configuration settings. A name is required and is determined from (first match
|
||||
wins):</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>cargo-new.name</code> Cargo config value</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>CARGO_NAME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>GIT_AUTHOR_NAME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>GIT_COMMITTER_NAME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>user.name</code> git configuration value</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>USER</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>USERNAME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>NAME</code> environment variable</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The email address is optional and is determined from:</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>cargo-new.email</code> Cargo config value</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>CARGO_EMAIL</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>GIT_AUTHOR_EMAIL</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>GIT_COMMITTER_EMAIL</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>user.email</code> git configuration value</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>EMAIL</code> environment variable</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/config.html">the reference</a> for more information about
|
||||
configuration files.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See <a href="cargo-new.html">cargo-new(1)</a> for a similar command which will create a new package in
|
||||
a new directory.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_init_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_init_init_options">Init Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--bin</strong></dt>
|
||||
<dd>
|
||||
<p>Create a package with a binary target (<code>src/main.rs</code>).
|
||||
This is the default behavior.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Create a package with a library target (<code>src/lib.rs</code>).</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--edition</strong> <em>EDITION</em></dt>
|
||||
<dd>
|
||||
<p>Specify the Rust edition to use. Default is 2018.
|
||||
Possible values: 2015, 2018</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--name</strong> <em>NAME</em></dt>
|
||||
<dd>
|
||||
<p>Set the package name. Defaults to the directory name.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--vcs</strong> <em>VCS</em></dt>
|
||||
<dd>
|
||||
<p>Initialize a new VCS repository for the given version control system (git,
|
||||
hg, pijul, or fossil) or do not initialize any version control at all
|
||||
(none). If not specified, defaults to <code>git</code> or the configuration value
|
||||
<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--registry</strong> <em>REGISTRY</em></dt>
|
||||
<dd>
|
||||
<p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name
|
||||
which will restrict publishing only to that registry.</p>
|
||||
<div class="paragraph">
|
||||
<p>Registry names are defined in <a href="../reference/config.html">Cargo config files</a>.
|
||||
If not specified, the default registry defined by the <code>registry.default</code>
|
||||
config key is used. If the default registry is not set and <code>--registry</code> is not
|
||||
used, the <code>publish</code> field will not be set which means that publishing will not
|
||||
be restricted.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_init_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_init_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_init_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_init_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_init_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Create a binary Cargo package in the current directory:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo init</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_init_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-new.html">cargo-new(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,461 +0,0 @@
|
||||
<h2 id="cargo_install_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-install - Build and install a Rust binary</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_install_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo install [<em>OPTIONS</em>] <em>CRATE</em>…​</code><br>
|
||||
<code>cargo install [<em>OPTIONS</em>] --path <em>PATH</em></code><br>
|
||||
<code>cargo install [<em>OPTIONS</em>] --git <em>URL</em> [<em>CRATE</em>…​]</code><br>
|
||||
<code>cargo install [<em>OPTIONS</em>] --list</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_install_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command manages Cargo’s local set of installed binary crates. Only
|
||||
packages which have executable <code>[[bin]]</code> or <code>[[example]]</code> targets can be
|
||||
installed, and all executables are installed into the installation root’s
|
||||
<code>bin</code> folder.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The installation root is determined, in order of precedence:</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>--root</code> option</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>CARGO_INSTALL_ROOT</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>install.root</code> Cargo <a href="../reference/config.html">config value</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>CARGO_HOME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>$HOME/.cargo</code></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>There are multiple sources from which a crate can be installed. The default
|
||||
location is crates.io but the <code>--git</code>, <code>--path</code>, and <code>--registry</code> flags can
|
||||
change this source. If the source contains more than one package (such as
|
||||
crates.io or a git repository with multiple crates) the <em>CRATE</em> argument is
|
||||
required to indicate which crate should be installed.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Crates from crates.io can optionally specify the version they wish to install
|
||||
via the <code>--version</code> flags, and similarly packages from git repositories can
|
||||
optionally specify the branch, tag, or revision that should be installed. If a
|
||||
crate has multiple binaries, the <code>--bin</code> argument can selectively install only
|
||||
one of them, and if you’d rather install examples the <code>--example</code> argument can
|
||||
be used as well.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If the package is already installed, Cargo will reinstall it if the installed
|
||||
version does not appear to be up-to-date. If any of the following values
|
||||
change, then Cargo will reinstall the package:</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p>The package version and source.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The set of binary names installed.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The chosen features.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The release mode (<code>--debug</code>).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The target (<code>--target</code>).</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Installing with <code>--path</code> will always build and install, unless there are
|
||||
conflicting binaries from another package. The <code>--force</code> flag may be used to
|
||||
force Cargo to always reinstall the package.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If the source is crates.io or <code>--git</code> then by default the crate will be built
|
||||
in a temporary target directory. To avoid this, the target directory can be
|
||||
specified by setting the <code>CARGO_TARGET_DIR</code> environment variable to a relative
|
||||
path. In particular, this can be useful for caching build artifacts on
|
||||
continuous integration systems.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>By default, the <code>Cargo.lock</code> file that is included with the package will be
|
||||
ignored. This means that Cargo will recompute which versions of dependencies
|
||||
to use, possibly using newer versions that have been released since the
|
||||
package was published. The <code>--locked</code> flag can be used to force Cargo to use
|
||||
the packaged <code>Cargo.lock</code> file if it is available. This may be useful for
|
||||
ensuring reproducible builds, to use the exact same set of dependencies that
|
||||
were available when the package was published. It may also be useful if a
|
||||
newer version of a dependency is published that no longer builds on your
|
||||
system, or has other problems. The downside to using <code>--locked</code> is that you
|
||||
will not receive any fixes or updates to any dependency. Note that Cargo did
|
||||
not start publishing <code>Cargo.lock</code> files until version 1.37, which means
|
||||
packages published with prior versions will not have a <code>Cargo.lock</code> file
|
||||
available.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_install_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_install_install_options">Install Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--vers</strong> <em>VERSION</em></dt>
|
||||
<dt class="hdlist1"><strong>--version</strong> <em>VERSION</em></dt>
|
||||
<dd>
|
||||
<p>Specify a version to install. This may be a
|
||||
<a href="../reference/specifying-dependencies.md">version requirement</a>, like
|
||||
<code>~1.2</code>, to have Cargo select the newest version from the given
|
||||
requirement. If the version does not have a requirement operator (such as
|
||||
<code>^</code> or <code>~</code>), then it must be in the form <em>MAJOR.MINOR.PATCH</em>, and will
|
||||
install exactly that version; it is <strong>not</strong> treated as a caret requirement
|
||||
like Cargo dependencies are.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--git</strong> <em>URL</em></dt>
|
||||
<dd>
|
||||
<p>Git URL to install the specified crate from.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--branch</strong> <em>BRANCH</em></dt>
|
||||
<dd>
|
||||
<p>Branch to use when installing from git.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--tag</strong> <em>TAG</em></dt>
|
||||
<dd>
|
||||
<p>Tag to use when installing from git.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--rev</strong> <em>SHA</em></dt>
|
||||
<dd>
|
||||
<p>Specific commit to use when installing from git.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Filesystem path to local crate to install.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--list</strong></dt>
|
||||
<dd>
|
||||
<p>List all installed packages and their versions.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-f</strong></dt>
|
||||
<dt class="hdlist1"><strong>--force</strong></dt>
|
||||
<dd>
|
||||
<p>Force overwriting existing crates or binaries. This can be used if a
|
||||
package has installed a binary with the same name as another package. This
|
||||
is also useful if something has changed on the system that you want to
|
||||
rebuild with, such as a newer version of <code>rustc</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-track</strong></dt>
|
||||
<dd>
|
||||
<p>By default, Cargo keeps track of the installed packages with a metadata
|
||||
file stored in the installation root directory. This flag tells Cargo not
|
||||
to use or create that file. With this flag, Cargo will refuse to overwrite
|
||||
any existing files unless the <code>--force</code> flag is used. This also disables
|
||||
Cargo’s ability to protect against multiple concurrent invocations of
|
||||
Cargo installing at the same time.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Install only the specified binary.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bins</strong></dt>
|
||||
<dd>
|
||||
<p>Install all binaries.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--example</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Install only the specified example.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--examples</strong></dt>
|
||||
<dd>
|
||||
<p>Install all examples.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--root</strong> <em>DIR</em></dt>
|
||||
<dd>
|
||||
<p>Directory to install packages into.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--registry</strong> <em>REGISTRY</em></dt>
|
||||
<dd>
|
||||
<p>Name of the registry to use. Registry names are defined in <a href="../reference/config.html">Cargo config files</a>.
|
||||
If not specified, the default registry is used, which is defined by the
|
||||
<code>registry.default</code> config key which defaults to <code>crates-io</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--index</strong> <em>INDEX</em></dt>
|
||||
<dd>
|
||||
<p>The URL of the registry index to use.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_install_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_install_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Install for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--debug</strong></dt>
|
||||
<dd>
|
||||
<p>Build with the <code>dev</code> profile instead the <code>release</code> profile.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_install_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_install_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_install_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_install_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_install_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_install_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_install_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Install or upgrade a package from crates.io:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo install ripgrep</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Install or reinstall the package in the current directory:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo install --path .</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>View the list of installed packages:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo install --list</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_install_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-uninstall.html">cargo-uninstall(1)</a>, <a href="cargo-search.html">cargo-search(1)</a>, <a href="cargo-publish.html">cargo-publish(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,160 +0,0 @@
|
||||
<h2 id="cargo_locate_project_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-locate-project - Print a JSON representation of a Cargo.toml file's location</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_locate_project_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo locate-project [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_locate_project_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will print a JSON object to stdout with the full path to the
|
||||
<code>Cargo.toml</code> manifest.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See also <a href="cargo-metadata.html">cargo-metadata(1)</a> which is capable of returning the path to a
|
||||
workspace root.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_locate_project_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_locate_project_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_locate_project_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_locate_project_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_locate_project_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_locate_project_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_locate_project_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Display the path to the manifest based on the current directory:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo locate-project</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_locate_project_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-metadata.html">cargo-metadata(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,168 +0,0 @@
|
||||
<h2 id="cargo_login_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-login - Save an API token from the registry locally</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_login_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo login [<em>OPTIONS</em>] [<em>TOKEN</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_login_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will save the API token to disk so that commands that require
|
||||
authentication, such as <a href="cargo-publish.html">cargo-publish(1)</a>, will be automatically
|
||||
authenticated. The token is saved in <code>$CARGO_HOME/credentials.toml</code>. <code>CARGO_HOME</code>
|
||||
defaults to <code>.cargo</code> in your home directory.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If the <em>TOKEN</em> argument is not specified, it will be read from stdin.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The API token for crates.io may be retrieved from <a href="https://crates.io/me" class="bare">https://crates.io/me</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Take care to keep the token secret, it should not be shared with anyone else.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_login_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_login_login_options">Login Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--registry</strong> <em>REGISTRY</em></dt>
|
||||
<dd>
|
||||
<p>Name of the registry to use. Registry names are defined in <a href="../reference/config.html">Cargo config files</a>.
|
||||
If not specified, the default registry is used, which is defined by the
|
||||
<code>registry.default</code> config key which defaults to <code>crates-io</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_login_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_login_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_login_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_login_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_login_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Save the API token to disk:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo login</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_login_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-publish.html">cargo-publish(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,520 +0,0 @@
|
||||
<h2 id="cargo_metadata_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-metadata - Machine-readable metadata about the current package</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_metadata_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo metadata [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_metadata_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Output JSON to stdout containing information about the workspace members and
|
||||
resolved dependencies of the current package.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>It is recommended to include the <code>--format-version</code> flag to future-proof
|
||||
your code to ensure the output is in the format you are expecting.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See the <a href="https://crates.io/crates/cargo_metadata">cargo_metadata crate</a>
|
||||
for a Rust API for reading the metadata.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_metadata_output_format">OUTPUT FORMAT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>The output has the following format:</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlightjs highlight"><code data-lang="javascript" class="language-javascript hljs">{
|
||||
/* Array of all packages in the workspace.
|
||||
It also includes all feature-enabled dependencies unless --no-deps is used.
|
||||
*/
|
||||
"packages": [
|
||||
{
|
||||
/* The name of the package. */
|
||||
"name": "my-package",
|
||||
/* The version of the package. */
|
||||
"version": "0.1.0",
|
||||
/* The Package ID, a unique identifier for referring to the package. */
|
||||
"id": "my-package 0.1.0 (path+file:///path/to/my-package)",
|
||||
/* The license value from the manifest, or null. */
|
||||
"license": "MIT/Apache-2.0",
|
||||
/* The license-file value from the manifest, or null. */
|
||||
"license_file": "LICENSE",
|
||||
/* The description value from the manifest, or null. */
|
||||
"description": "Package description.",
|
||||
/* The source ID of the package. This represents where
|
||||
a package is retrieved from.
|
||||
This is null for path dependencies and workspace members.
|
||||
For other dependencies, it is a string with the format:
|
||||
- "registry+URL" for registry-based dependencies.
|
||||
Example: "registry+https://github.com/rust-lang/crates.io-index"
|
||||
- "git+URL" for git-based dependencies.
|
||||
Example: "git+https://github.com/rust-lang/cargo?rev=5e85ba14aaa20f8133863373404cb0af69eeef2c#5e85ba14aaa20f8133863373404cb0af69eeef2c"
|
||||
*/
|
||||
"source": null,
|
||||
/* Array of dependencies declared in the package's manifest. */
|
||||
"dependencies": [
|
||||
{
|
||||
/* The name of the dependency. */
|
||||
"name": "bitflags",
|
||||
/* The source ID of the dependency. May be null, see
|
||||
description for the package source.
|
||||
*/
|
||||
"source": "registry+https://github.com/rust-lang/crates.io-index",
|
||||
/* The version requirement for the dependency.
|
||||
Dependencies without a version requirement have a value of "*".
|
||||
*/
|
||||
"req": "^1.0",
|
||||
/* The dependency kind.
|
||||
"dev", "build", or null for a normal dependency.
|
||||
*/
|
||||
"kind": null,
|
||||
/* If the dependency is renamed, this is the new name for
|
||||
the dependency as a string. null if it is not renamed.
|
||||
*/
|
||||
"rename": null,
|
||||
/* Boolean of whether or not this is an optional dependency. */
|
||||
"optional": false,
|
||||
/* Boolean of whether or not default features are enabled. */
|
||||
"uses_default_features": true,
|
||||
/* Array of features enabled. */
|
||||
"features": [],
|
||||
/* The target platform for the dependency.
|
||||
null if not a target dependency.
|
||||
*/
|
||||
"target": "cfg(windows)",
|
||||
/* A string of the URL of the registry this dependency is from.
|
||||
If not specified or null, the dependency is from the default
|
||||
registry (crates.io).
|
||||
*/
|
||||
"registry": null
|
||||
}
|
||||
],
|
||||
/* Array of Cargo targets. */
|
||||
"targets": [
|
||||
{
|
||||
/* Array of target kinds.
|
||||
- lib targets list the `crate-type` values from the
|
||||
manifest such as "lib", "rlib", "dylib",
|
||||
"proc-macro", etc. (default ["lib"])
|
||||
- binary is ["bin"]
|
||||
- example is ["example"]
|
||||
- integration test is ["test"]
|
||||
- benchmark is ["bench"]
|
||||
- build script is ["custom-build"]
|
||||
*/
|
||||
"kind": [
|
||||
"bin"
|
||||
],
|
||||
/* Array of crate types.
|
||||
- lib and example libraries list the `crate-type` values
|
||||
from the manifest such as "lib", "rlib", "dylib",
|
||||
"proc-macro", etc. (default ["lib"])
|
||||
- all other target kinds are ["bin"]
|
||||
*/
|
||||
"crate_types": [
|
||||
"bin"
|
||||
],
|
||||
/* The name of the target. */
|
||||
"name": "my-package",
|
||||
/* Absolute path to the root source file of the target. */
|
||||
"src_path": "/path/to/my-package/src/main.rs",
|
||||
/* The Rust edition of the target.
|
||||
Defaults to the package edition.
|
||||
*/
|
||||
"edition": "2018",
|
||||
/* Array of required features.
|
||||
This property is not included if no required features are set.
|
||||
*/
|
||||
"required-features": ["feat1"],
|
||||
/* Whether or not this target has doc tests enabled, and
|
||||
the target is compatible with doc testing.
|
||||
*/
|
||||
"doctest": false,
|
||||
/* Whether or not this target should be built and run with `--test`
|
||||
*/
|
||||
"test": true
|
||||
}
|
||||
],
|
||||
/* Set of features defined for the package.
|
||||
Each feature maps to an array of features or dependencies it
|
||||
enables.
|
||||
*/
|
||||
"features": {
|
||||
"default": [
|
||||
"feat1"
|
||||
],
|
||||
"feat1": [],
|
||||
"feat2": []
|
||||
},
|
||||
/* Absolute path to this package's manifest. */
|
||||
"manifest_path": "/path/to/my-package/Cargo.toml",
|
||||
/* Package metadata.
|
||||
This is null if no metadata is specified.
|
||||
*/
|
||||
"metadata": {
|
||||
"docs": {
|
||||
"rs": {
|
||||
"all-features": true
|
||||
}
|
||||
}
|
||||
},
|
||||
/* List of registries to which this package may be published.
|
||||
Publishing is unrestricted if null, and forbidden if an empty array. */
|
||||
"publish": [
|
||||
"crates-io"
|
||||
],
|
||||
/* Array of authors from the manifest.
|
||||
Empty array if no authors specified.
|
||||
*/
|
||||
"authors": [
|
||||
"Jane Doe <user@example.com>"
|
||||
],
|
||||
/* Array of categories from the manifest. */
|
||||
"categories": [
|
||||
"command-line-utilities"
|
||||
],
|
||||
/* Array of keywords from the manifest. */
|
||||
"keywords": [
|
||||
"cli"
|
||||
],
|
||||
/* The readme value from the manifest or null if not specified. */
|
||||
"readme": "README.md",
|
||||
/* The repository value from the manifest or null if not specified. */
|
||||
"repository": "https://github.com/rust-lang/cargo",
|
||||
/* The default edition of the package.
|
||||
Note that individual targets may have different editions.
|
||||
*/
|
||||
"edition": "2018",
|
||||
/* Optional string that is the name of a native library the package
|
||||
is linking to.
|
||||
*/
|
||||
"links": null,
|
||||
}
|
||||
],
|
||||
/* Array of members of the workspace.
|
||||
Each entry is the Package ID for the package.
|
||||
*/
|
||||
"workspace_members": [
|
||||
"my-package 0.1.0 (path+file:///path/to/my-package)",
|
||||
],
|
||||
// The resolved dependency graph for the entire workspace. The enabled
|
||||
// features are based on the enabled features for the "current" package.
|
||||
// Inactivated optional dependencies are not listed.
|
||||
//
|
||||
// This is null if --no-deps is specified.
|
||||
//
|
||||
// By default, this includes all dependencies for all target platforms.
|
||||
// The `--filter-platform` flag may be used to narrow to a specific
|
||||
// target triple.
|
||||
"resolve": {
|
||||
/* Array of nodes within the dependency graph.
|
||||
Each node is a package.
|
||||
*/
|
||||
"nodes": [
|
||||
{
|
||||
/* The Package ID of this node. */
|
||||
"id": "my-package 0.1.0 (path+file:///path/to/my-package)",
|
||||
/* The dependencies of this package, an array of Package IDs. */
|
||||
"dependencies": [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||
],
|
||||
/* The dependencies of this package. This is an alternative to
|
||||
"dependencies" which contains additional information. In
|
||||
particular, this handles renamed dependencies.
|
||||
*/
|
||||
"deps": [
|
||||
{
|
||||
/* The name of the dependency's library target.
|
||||
If this is a renamed dependency, this is the new
|
||||
name.
|
||||
*/
|
||||
"name": "bitflags",
|
||||
/* The Package ID of the dependency. */
|
||||
"pkg": "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
/* Array of dependency kinds. Added in Cargo 1.40. */
|
||||
"dep_kinds": [
|
||||
{
|
||||
/* The dependency kind.
|
||||
"dev", "build", or null for a normal dependency.
|
||||
*/
|
||||
"kind": null,
|
||||
/* The target platform for the dependency.
|
||||
null if not a target dependency.
|
||||
*/
|
||||
"target": "cfg(windows)"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
/* Array of features enabled on this package. */
|
||||
"features": [
|
||||
"default"
|
||||
]
|
||||
}
|
||||
],
|
||||
/* The root package of the workspace.
|
||||
This is null if this is a virtual workspace. Otherwise it is
|
||||
the Package ID of the root package.
|
||||
*/
|
||||
"root": "my-package 0.1.0 (path+file:///path/to/my-package)"
|
||||
},
|
||||
/* The absolute path to the build directory where Cargo places its output. */
|
||||
"target_directory": "/path/to/my-package/target",
|
||||
/* The version of the schema for this metadata structure.
|
||||
This will be changed if incompatible changes are ever made.
|
||||
*/
|
||||
"version": 1,
|
||||
/* The absolute path to the root of the workspace. */
|
||||
"workspace_root": "/path/to/my-package"
|
||||
/* Workspace metadata.
|
||||
This is null if no metadata is specified. */
|
||||
"metadata": {
|
||||
"docs": {
|
||||
"rs": {
|
||||
"all-features": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_metadata_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_metadata_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--no-deps</strong></dt>
|
||||
<dd>
|
||||
<p>Output information only about the workspace members and don’t fetch
|
||||
dependencies.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--format-version</strong> <em>VERSION</em></dt>
|
||||
<dd>
|
||||
<p>Specify the version of the output format to use. Currently <code>1</code> is the only
|
||||
possible value.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--filter-platform</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>This filters the <code>resolve</code> output to only include dependencies for the
|
||||
given target triple. Without this flag, the resolve includes all targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>Note that the dependencies listed in the "packages" array still includes all
|
||||
dependencies. Each package definition is intended to be an unaltered
|
||||
reproduction of the information within <code>Cargo.toml</code>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_metadata_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_metadata_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_metadata_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_metadata_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_metadata_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_metadata_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_metadata_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Output JSON about the current package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo metadata --format-version=1</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_metadata_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,256 +0,0 @@
|
||||
<h2 id="cargo_new_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-new - Create a new Cargo package</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_new_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo new [<em>OPTIONS</em>] <em>PATH</em></code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_new_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will create a new Cargo package in the given directory. This
|
||||
includes a simple template with a <code>Cargo.toml</code> manifest, sample source file,
|
||||
and a VCS ignore file. If the directory is not already in a VCS repository,
|
||||
then a new repository is created (see <code>--vcs</code> below).</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The "authors" field in the manifest is determined from the environment or
|
||||
configuration settings. A name is required and is determined from (first match
|
||||
wins):</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>cargo-new.name</code> Cargo config value</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>CARGO_NAME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>GIT_AUTHOR_NAME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>GIT_COMMITTER_NAME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>user.name</code> git configuration value</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>USER</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>USERNAME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>NAME</code> environment variable</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The email address is optional and is determined from:</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>cargo-new.email</code> Cargo config value</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>CARGO_EMAIL</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>GIT_AUTHOR_EMAIL</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>GIT_COMMITTER_EMAIL</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>user.email</code> git configuration value</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>EMAIL</code> environment variable</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/config.html">the reference</a> for more information about
|
||||
configuration files.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See <a href="cargo-init.html">cargo-init(1)</a> for a similar command which will create a new manifest
|
||||
in an existing directory.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_new_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_new_new_options">New Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--bin</strong></dt>
|
||||
<dd>
|
||||
<p>Create a package with a binary target (<code>src/main.rs</code>).
|
||||
This is the default behavior.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Create a package with a library target (<code>src/lib.rs</code>).</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--edition</strong> <em>EDITION</em></dt>
|
||||
<dd>
|
||||
<p>Specify the Rust edition to use. Default is 2018.
|
||||
Possible values: 2015, 2018</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--name</strong> <em>NAME</em></dt>
|
||||
<dd>
|
||||
<p>Set the package name. Defaults to the directory name.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--vcs</strong> <em>VCS</em></dt>
|
||||
<dd>
|
||||
<p>Initialize a new VCS repository for the given version control system (git,
|
||||
hg, pijul, or fossil) or do not initialize any version control at all
|
||||
(none). If not specified, defaults to <code>git</code> or the configuration value
|
||||
<code>cargo-new.vcs</code>, or <code>none</code> if already inside a VCS repository.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--registry</strong> <em>REGISTRY</em></dt>
|
||||
<dd>
|
||||
<p>This sets the <code>publish</code> field in <code>Cargo.toml</code> to the given registry name
|
||||
which will restrict publishing only to that registry.</p>
|
||||
<div class="paragraph">
|
||||
<p>Registry names are defined in <a href="../reference/config.html">Cargo config files</a>.
|
||||
If not specified, the default registry defined by the <code>registry.default</code>
|
||||
config key is used. If the default registry is not set and <code>--registry</code> is not
|
||||
used, the <code>publish</code> field will not be set which means that publishing will not
|
||||
be restricted.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_new_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_new_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_new_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_new_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_new_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Create a binary Cargo package in the given directory:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo new foo</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_new_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-init.html">cargo-init(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,220 +0,0 @@
|
||||
<h2 id="cargo_owner_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-owner - Manage the owners of a crate on the registry</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_owner_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo owner [<em>OPTIONS</em>] --add <em>LOGIN</em> [<em>CRATE</em>]</code><br>
|
||||
<code>cargo owner [<em>OPTIONS</em>] --remove <em>LOGIN</em> [<em>CRATE</em>]</code><br>
|
||||
<code>cargo owner [<em>OPTIONS</em>] --list [<em>CRATE</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_owner_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will modify the owners for a crate on the registry. Owners of a
|
||||
crate can upload new versions and yank old versions. Non-team owners can also
|
||||
modify the set of owners, so take care!</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>This command requires you to be authenticated with either the <code>--token</code> option
|
||||
or using <a href="cargo-login.html">cargo-login(1)</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If the crate name is not specified, it will use the package name from the
|
||||
current directory.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/publishing.html#cargo-owner">the reference</a> for more
|
||||
information about owners and publishing.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_owner_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_owner_owner_options">Owner Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-a</strong></dt>
|
||||
<dt class="hdlist1"><strong>--add</strong> <em>LOGIN</em>…​</dt>
|
||||
<dd>
|
||||
<p>Invite the given user or team as an owner.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-r</strong></dt>
|
||||
<dt class="hdlist1"><strong>--remove</strong> <em>LOGIN</em>…​</dt>
|
||||
<dd>
|
||||
<p>Remove the given user or team as an owner.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-l</strong></dt>
|
||||
<dt class="hdlist1"><strong>--list</strong></dt>
|
||||
<dd>
|
||||
<p>List owners of a crate.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--token</strong> <em>TOKEN</em></dt>
|
||||
<dd>
|
||||
<p>API token to use when authenticating. This overrides the token stored in
|
||||
the credentials file (which is created by <a href="cargo-login.html">cargo-login(1)</a>).</p>
|
||||
<div class="paragraph">
|
||||
<p><a href="../reference/config.html">Cargo config</a> environment variables can be
|
||||
used to override the tokens stored in the credentials file. The token for
|
||||
crates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment
|
||||
variable. Tokens for other registries may be specified with environment
|
||||
variables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name
|
||||
of the registry in all capital letters.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--index</strong> <em>INDEX</em></dt>
|
||||
<dd>
|
||||
<p>The URL of the registry index to use.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--registry</strong> <em>REGISTRY</em></dt>
|
||||
<dd>
|
||||
<p>Name of the registry to use. Registry names are defined in <a href="../reference/config.html">Cargo config files</a>.
|
||||
If not specified, the default registry is used, which is defined by the
|
||||
<code>registry.default</code> config key which defaults to <code>crates-io</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_owner_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_owner_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_owner_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_owner_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_owner_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>List owners of a package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo owner --list foo</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Invite an owner to a package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo owner --add username foo</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Remove an owner from a package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo owner --remove username foo</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_owner_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-login.html">cargo-login(1)</a>, <a href="cargo-publish.html">cargo-publish(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,354 +0,0 @@
|
||||
<h2 id="cargo_package_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-package - Assemble the local package into a distributable tarball</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_package_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo package [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_package_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will create a distributable, compressed <code>.crate</code> file with the
|
||||
source code of the package in the current directory. The resulting file will
|
||||
be stored in the <code>target/package</code> directory. This performs the following
|
||||
steps:</p>
|
||||
</div>
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Load and check the current workspace, performing some basic checks.</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p>Path dependencies are not allowed unless they have a version key. Cargo
|
||||
will ignore the path key for dependencies in published packages.
|
||||
<code>dev-dependencies</code> do not have this restriction.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Create the compressed <code>.crate</code> file.</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p>The original <code>Cargo.toml</code> file is rewritten and normalized.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>[patch]</code>, <code>[replace]</code>, and <code>[workspace]</code> sections are removed from the
|
||||
manifest.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>Cargo.lock</code> is automatically included if the package contains an
|
||||
executable binary or example target. <a href="cargo-install.html">cargo-install(1)</a> will use the
|
||||
packaged lock file if the <code>--locked</code> flag is used.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>A <code>.cargo_vcs_info.json</code> file is included that contains information
|
||||
about the current VCS checkout hash if available (not included with
|
||||
<code>--allow-dirty</code>).</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Extract the <code>.crate</code> file and build it to verify it can build.</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p>This will rebuild your package from scratch to ensure that it can be
|
||||
built from a pristine state. The <code>--no-verify</code> flag can be used to skip
|
||||
this step.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Check that build scripts did not modify any source files.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The list of files included can be controlled with the <code>include</code> and <code>exclude</code>
|
||||
fields in the manifest.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/publishing.html">the reference</a> for more details about
|
||||
packaging and publishing.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_package_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_package_package_options">Package Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-l</strong></dt>
|
||||
<dt class="hdlist1"><strong>--list</strong></dt>
|
||||
<dd>
|
||||
<p>Print files included in a package without making one.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-verify</strong></dt>
|
||||
<dd>
|
||||
<p>Don’t verify the contents by building them.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-metadata</strong></dt>
|
||||
<dd>
|
||||
<p>Ignore warnings about a lack of human-usable metadata (such as the
|
||||
description or the license).</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--allow-dirty</strong></dt>
|
||||
<dd>
|
||||
<p>Allow working directories with uncommitted VCS changes to be packaged.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_package_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Package for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_package_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_package_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_package_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_package_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_package_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_package_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_package_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_package_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Create a compressed <code>.crate</code> file of the current package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo package</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_package_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-publish.html">cargo-publish(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,266 +0,0 @@
|
||||
<h2 id="cargo_pkgid_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-pkgid - Print a fully qualified package specification</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_pkgid_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo pkgid [<em>OPTIONS</em>] [<em>SPEC</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_pkgid_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Given a <em>SPEC</em> argument, print out the fully qualified package ID specifier
|
||||
for a package or dependency in the current workspace. This command will
|
||||
generate an error if <em>SPEC</em> is ambiguous as to which package it refers to in
|
||||
the dependency graph. If no <em>SPEC</em> is given, then the specifier for the local
|
||||
package is printed.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>This command requires that a lockfile is available and dependencies have been
|
||||
fetched.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>A package specifier consists of a name, version, and source URL. You are
|
||||
allowed to use partial specifiers to succinctly match a specific package as
|
||||
long as it matches only one package. The format of a <em>SPEC</em> can be one of the
|
||||
following:</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all fit-content">
|
||||
<caption class="title">Table 1. SPEC Query Format</caption>
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">SPEC Structure</th>
|
||||
<th class="tableblock halign-left valign-top">Example SPEC</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>NAME</em></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bitflags</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>NAME</em><code>:</code><em>VERSION</em></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bitflags:1.0.4</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>URL</em></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code><a href="https://github.com/rust-lang/cargo" class="bare">https://github.com/rust-lang/cargo</a></code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>URL</em><code>#</code><em>VERSION</em></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code><a href="https://github.com/rust-lang/cargo#0.33.0" class="bare">https://github.com/rust-lang/cargo#0.33.0</a></code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>URL</em><code>#</code><em>NAME</em></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code><a href="https://github.com/rust-lang/crates.io-index#bitflags" class="bare">https://github.com/rust-lang/crates.io-index#bitflags</a></code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>URL</em><code>#</code><em>NAME</em><code>:</code><em>VERSION</em></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code><a href="https://github.com/rust-lang/cargo#crates-io:0.21.0" class="bare">https://github.com/rust-lang/cargo#crates-io:0.21.0</a></code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_pkgid_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_pkgid_package_selection">Package Selection</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em></dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em></dt>
|
||||
<dd>
|
||||
<p>Get the package ID for the given package instead of the current package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_pkgid_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_pkgid_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_pkgid_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_pkgid_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_pkgid_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_pkgid_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Retrieve package specification for <code>foo</code> package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo pkgid foo</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Retrieve package specification for version 1.0.0 of <code>foo</code>:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo pkgid foo:1.0.0</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Retrieve package specification for <code>foo</code> from crates.io:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo pkgid https://github.com/rust-lang/crates.io-index#foo</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_pkgid_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-generate-lockfile.html">cargo-generate-lockfile(1)</a>, <a href="cargo-metadata.html">cargo-metadata(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,338 +0,0 @@
|
||||
<h2 id="cargo_publish_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-publish - Upload a package to the registry</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_publish_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo publish [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_publish_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will create a distributable, compressed <code>.crate</code> file with the
|
||||
source code of the package in the current directory and upload it to a
|
||||
registry. The default registry is <a href="https://crates.io" class="bare">https://crates.io</a>. This performs the
|
||||
following steps:</p>
|
||||
</div>
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Performs a few checks, including:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p>Checks the <code>package.publish</code> key in the manifest for restrictions on which
|
||||
registries you are allowed to publish to.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Create a <code>.crate</code> file by following the steps in <a href="cargo-package.html">cargo-package(1)</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Upload the crate to the registry. Note that the server will perform
|
||||
additional checks on the crate.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>This command requires you to be authenticated with either the <code>--token</code> option
|
||||
or using <a href="cargo-login.html">cargo-login(1)</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/publishing.html">the reference</a> for more details about
|
||||
packaging and publishing.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_publish_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_publish_publish_options">Publish Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--dry-run</strong></dt>
|
||||
<dd>
|
||||
<p>Perform all checks without uploading.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--token</strong> <em>TOKEN</em></dt>
|
||||
<dd>
|
||||
<p>API token to use when authenticating. This overrides the token stored in
|
||||
the credentials file (which is created by <a href="cargo-login.html">cargo-login(1)</a>).</p>
|
||||
<div class="paragraph">
|
||||
<p><a href="../reference/config.html">Cargo config</a> environment variables can be
|
||||
used to override the tokens stored in the credentials file. The token for
|
||||
crates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment
|
||||
variable. Tokens for other registries may be specified with environment
|
||||
variables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name
|
||||
of the registry in all capital letters.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-verify</strong></dt>
|
||||
<dd>
|
||||
<p>Don’t verify the contents by building them.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--allow-dirty</strong></dt>
|
||||
<dd>
|
||||
<p>Allow working directories with uncommitted VCS changes to be packaged.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--index</strong> <em>INDEX</em></dt>
|
||||
<dd>
|
||||
<p>The URL of the registry index to use.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--registry</strong> <em>REGISTRY</em></dt>
|
||||
<dd>
|
||||
<p>Name of the registry to use. Registry names are defined in <a href="../reference/config.html">Cargo config files</a>.
|
||||
If not specified, the default registry is used, which is defined by the
|
||||
<code>registry.default</code> config key which defaults to <code>crates-io</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_publish_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Publish for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_publish_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_publish_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_publish_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_publish_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_publish_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_publish_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_publish_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_publish_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Publish the current package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo publish</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_publish_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-package.html">cargo-package(1)</a>, <a href="cargo-login.html">cargo-login(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,407 +0,0 @@
|
||||
<h2 id="cargo_run_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-run - Run the current package</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_run_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo run [<em>OPTIONS</em>] [-- <em>ARGS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_run_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Run a binary or example of the local package.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>All the arguments following the two dashes (<code>--</code>) are passed to the binary to
|
||||
run. If you’re passing arguments to both Cargo and the binary, the ones after
|
||||
<code>--</code> go to the binary, the ones before go to Cargo.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_run_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_run_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, the package in the current working directory is selected. The <code>-p</code>
|
||||
flag can be used to choose a different package in a workspace.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em></dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em></dt>
|
||||
<dd>
|
||||
<p>The package to run. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for
|
||||
the SPEC format.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_run_target_selection">Target Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no target selection options are given, <code>cargo run</code> will run the binary
|
||||
target. If there are multiple binary targets, you must pass a target flag to
|
||||
choose one. Or, the <code>default-run</code> field may be specified in the <code>[package]</code>
|
||||
section of <code>Cargo.toml</code> to choose the name of the binary to run by default.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em></dt>
|
||||
<dd>
|
||||
<p>Run the specified binary.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--example</strong> <em>NAME</em></dt>
|
||||
<dd>
|
||||
<p>Run the specified example.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_run_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_run_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Run for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--release</strong></dt>
|
||||
<dd>
|
||||
<p>Run optimized artifacts with the <code>release</code> profile. See the
|
||||
<a href="#cargo_run_profiles">PROFILES</a> section for details on how this affects profile selection.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_run_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_run_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
|
||||
<dd>
|
||||
<p>The output format for diagnostic messages. Can be specified multiple times
|
||||
and consists of comma-separated values. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>human</code> (default): Display in a human-readable text format.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json</code>: Emit JSON messages to stdout. See
|
||||
<a href="../reference/external-tools.html#json-messages">the reference</a>
|
||||
for more details.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
|
||||
the "short" rendering from rustc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
|
||||
contains embedded ANSI color codes for respecting rustc’s default color
|
||||
scheme.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
|
||||
in JSON messages printed, but instead Cargo itself should render the
|
||||
JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others
|
||||
coming from rustc are still emitted.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_run_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_run_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_run_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_run_profiles">PROFILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Profiles may be used to configure compiler options such as optimization levels
|
||||
and debug settings. See
|
||||
<a href="../reference/profiles.html">the reference</a>
|
||||
for more details.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Profile selection depends on the target and crate being built. By default the
|
||||
<code>dev</code> or <code>test</code> profiles are used. If the <code>--release</code> flag is given, then the
|
||||
<code>release</code> or <code>bench</code> profiles are used.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all fit-content">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Target</th>
|
||||
<th class="tableblock halign-left valign-top">Default Profile</th>
|
||||
<th class="tableblock halign-left valign-top"><code>--release</code> Profile</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">lib, bin, example</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dev</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>release</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">test, bench, or any target<br>
|
||||
in "test" or "bench" mode</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>test</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bench</code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="paragraph">
|
||||
<p>Dependencies use the <code>dev</code>/<code>release</code> profiles.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_run_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_run_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_run_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Build the local package and run its main target (assuming only one binary):</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo run</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Run an example with extra arguments:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo run --example exname -- --exoption exarg1 exarg2</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_run_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-build.html">cargo-build(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,469 +0,0 @@
|
||||
<h2 id="cargo_rustc_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-rustc - Compile the current package, and pass extra options to the compiler</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustc_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo rustc [<em>OPTIONS</em>] [-- <em>ARGS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustc_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>The specified target for the current package (or package specified by <code>-p</code> if
|
||||
provided) will be compiled along with all of its dependencies. The specified
|
||||
<em>ARGS</em> will all be passed to the final compiler invocation, not any of the
|
||||
dependencies. Note that the compiler will still unconditionally receive
|
||||
arguments such as <code>-L</code>, <code>--extern</code>, and <code>--crate-type</code>, and the specified
|
||||
<em>ARGS</em> will simply be added to the compiler invocation.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See <a href="https://doc.rust-lang.org/rustc/index.html" class="bare">https://doc.rust-lang.org/rustc/index.html</a> for documentation on rustc
|
||||
flags.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>This command requires that only one target is being compiled when additional
|
||||
arguments are provided. If more than one target is available for the current
|
||||
package the filters of <code>--lib</code>, <code>--bin</code>, etc, must be used to select which
|
||||
target is compiled.
|
||||
To pass flags to all compiler processes spawned by Cargo, use the <code>RUSTFLAGS</code>
|
||||
<a href="../reference/environment-variables.html">environment variable</a> or the
|
||||
<code>build.rustflags</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustc_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustc_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, the package in the current working directory is selected. The <code>-p</code>
|
||||
flag can be used to choose a different package in a workspace.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em></dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em></dt>
|
||||
<dd>
|
||||
<p>The package to build. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for
|
||||
the SPEC format.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustc_target_selection">Target Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no target selection options are given, <code>cargo rustc</code> will build all
|
||||
binary and library targets of the selected package.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Passing target selection flags will build only the
|
||||
specified targets.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Build the package’s library.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Build the specified binary. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bins</strong></dt>
|
||||
<dd>
|
||||
<p>Build all binary targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--example</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Build the specified example. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--examples</strong></dt>
|
||||
<dd>
|
||||
<p>Build all example targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--test</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Build the specified integration test. This flag may be specified multiple
|
||||
times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--tests</strong></dt>
|
||||
<dd>
|
||||
<p>Build all targets in test mode that have the <code>test = true</code> manifest
|
||||
flag set. By default this includes the library and binaries built as
|
||||
unittests, and integration tests. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
unittest, and once as a dependency for binaries, integration tests, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>test</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bench</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Build the specified benchmark. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--benches</strong></dt>
|
||||
<dd>
|
||||
<p>Build all targets in benchmark mode that have the <code>bench = true</code>
|
||||
manifest flag set. By default this includes the library and binaries built
|
||||
as benchmarks, and bench targets. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
benchmark, and once as a dependency for binaries, benchmarks, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>bench</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-targets</strong></dt>
|
||||
<dd>
|
||||
<p>Build all targets. This is equivalent to specifying <code>--lib --bins
|
||||
--tests --benches --examples</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustc_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustc_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Build for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--release</strong></dt>
|
||||
<dd>
|
||||
<p>Build optimized artifacts with the <code>release</code> profile. See the
|
||||
<a href="#cargo_rustc_profiles">PROFILES</a> section for details on how this affects profile selection.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustc_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustc_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
|
||||
<dd>
|
||||
<p>The output format for diagnostic messages. Can be specified multiple times
|
||||
and consists of comma-separated values. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>human</code> (default): Display in a human-readable text format.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json</code>: Emit JSON messages to stdout. See
|
||||
<a href="../reference/external-tools.html#json-messages">the reference</a>
|
||||
for more details.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
|
||||
the "short" rendering from rustc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
|
||||
contains embedded ANSI color codes for respecting rustc’s default color
|
||||
scheme.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
|
||||
in JSON messages printed, but instead Cargo itself should render the
|
||||
JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others
|
||||
coming from rustc are still emitted.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustc_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustc_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustc_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustc_profiles">PROFILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Profiles may be used to configure compiler options such as optimization levels
|
||||
and debug settings. See
|
||||
<a href="../reference/profiles.html">the reference</a>
|
||||
for more details.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Profile selection depends on the target and crate being built. By default the
|
||||
<code>dev</code> or <code>test</code> profiles are used. If the <code>--release</code> flag is given, then the
|
||||
<code>release</code> or <code>bench</code> profiles are used.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all fit-content">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Target</th>
|
||||
<th class="tableblock halign-left valign-top">Default Profile</th>
|
||||
<th class="tableblock halign-left valign-top"><code>--release</code> Profile</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">lib, bin, example</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dev</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>release</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">test, bench, or any target<br>
|
||||
in "test" or "bench" mode</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>test</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bench</code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="paragraph">
|
||||
<p>Dependencies use the <code>dev</code>/<code>release</code> profiles.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustc_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustc_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustc_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Check if your package (not including dependencies) uses unsafe code:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo rustc --lib -- -D unsafe-code</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Try an experimental flag on the nightly compiler, such as this which prints
|
||||
the size of every type:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo rustc --lib -- -Z print-type-sizes</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustc_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-build.html">cargo-build(1)</a>, <a href="https://doc.rust-lang.org/rustc/index.html">rustc(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,475 +0,0 @@
|
||||
<h2 id="cargo_rustdoc_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-rustdoc - Build a package's documentation, using specified custom flags</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustdoc_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo rustdoc [<em>OPTIONS</em>] [-- <em>ARGS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustdoc_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>The specified target for the current package (or package specified by <code>-p</code> if
|
||||
provided) will be documented with the specified <em>ARGS</em> being passed to the
|
||||
final rustdoc invocation. Dependencies will not be documented as part of this
|
||||
command. Note that rustdoc will still unconditionally receive arguments such
|
||||
as <code>-L</code>, <code>--extern</code>, and <code>--crate-type</code>, and the specified <em>ARGS</em> will simply
|
||||
be added to the rustdoc invocation.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>See <a href="https://doc.rust-lang.org/rustdoc/index.html" class="bare">https://doc.rust-lang.org/rustdoc/index.html</a> for documentation on rustdoc
|
||||
flags.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>This command requires that only one target is being compiled when additional
|
||||
arguments are provided. If more than one target is available for the current
|
||||
package the filters of <code>--lib</code>, <code>--bin</code>, etc, must be used to select which
|
||||
target is compiled.
|
||||
To pass flags to all rustdoc processes spawned by Cargo, use the
|
||||
<code>RUSTDOCFLAGS</code> <a href="../reference/environment-variables.html">environment variable</a>
|
||||
or the <code>build.rustdocflags</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustdoc_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_documentation_options">Documentation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--open</strong></dt>
|
||||
<dd>
|
||||
<p>Open the docs in a browser after building them. This will use your default
|
||||
browser unless you define another one in the <code>BROWSER</code> environment
|
||||
variable.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, the package in the current working directory is selected. The <code>-p</code>
|
||||
flag can be used to choose a different package in a workspace.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em></dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em></dt>
|
||||
<dd>
|
||||
<p>The package to document. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for
|
||||
the SPEC format.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_target_selection">Target Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no target selection options are given, <code>cargo rustdoc</code> will document all
|
||||
binary and library targets of the selected package. The binary will be skipped
|
||||
if its name is the same as the lib target. Binaries are skipped if they have
|
||||
<code>required-features</code> that are missing.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Passing target selection flags will document only the
|
||||
specified targets.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Document the package’s library.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Document the specified binary. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bins</strong></dt>
|
||||
<dd>
|
||||
<p>Document all binary targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--example</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Document the specified example. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--examples</strong></dt>
|
||||
<dd>
|
||||
<p>Document all example targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--test</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Document the specified integration test. This flag may be specified multiple
|
||||
times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--tests</strong></dt>
|
||||
<dd>
|
||||
<p>Document all targets in test mode that have the <code>test = true</code> manifest
|
||||
flag set. By default this includes the library and binaries built as
|
||||
unittests, and integration tests. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
unittest, and once as a dependency for binaries, integration tests, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>test</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bench</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Document the specified benchmark. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--benches</strong></dt>
|
||||
<dd>
|
||||
<p>Document all targets in benchmark mode that have the <code>bench = true</code>
|
||||
manifest flag set. By default this includes the library and binaries built
|
||||
as benchmarks, and bench targets. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
benchmark, and once as a dependency for binaries, benchmarks, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>bench</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-targets</strong></dt>
|
||||
<dd>
|
||||
<p>Document all targets. This is equivalent to specifying <code>--lib --bins
|
||||
--tests --benches --examples</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Document for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--release</strong></dt>
|
||||
<dd>
|
||||
<p>Document optimized artifacts with the <code>release</code> profile. See the
|
||||
<a href="#cargo_rustdoc_profiles">PROFILES</a> section for details on how this affects profile selection.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
|
||||
<dd>
|
||||
<p>The output format for diagnostic messages. Can be specified multiple times
|
||||
and consists of comma-separated values. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>human</code> (default): Display in a human-readable text format.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json</code>: Emit JSON messages to stdout. See
|
||||
<a href="../reference/external-tools.html#json-messages">the reference</a>
|
||||
for more details.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
|
||||
the "short" rendering from rustc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
|
||||
contains embedded ANSI color codes for respecting rustc’s default color
|
||||
scheme.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
|
||||
in JSON messages printed, but instead Cargo itself should render the
|
||||
JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others
|
||||
coming from rustc are still emitted.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_rustdoc_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustdoc_profiles">PROFILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Profiles may be used to configure compiler options such as optimization levels
|
||||
and debug settings. See
|
||||
<a href="../reference/profiles.html">the reference</a>
|
||||
for more details.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Profile selection depends on the target and crate being built. By default the
|
||||
<code>dev</code> or <code>test</code> profiles are used. If the <code>--release</code> flag is given, then the
|
||||
<code>release</code> or <code>bench</code> profiles are used.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all fit-content">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Target</th>
|
||||
<th class="tableblock halign-left valign-top">Default Profile</th>
|
||||
<th class="tableblock halign-left valign-top"><code>--release</code> Profile</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">lib, bin, example</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dev</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>release</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">test, bench, or any target<br>
|
||||
in "test" or "bench" mode</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>test</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bench</code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="paragraph">
|
||||
<p>Dependencies use the <code>dev</code>/<code>release</code> profiles.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustdoc_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustdoc_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustdoc_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Build documentation with custom CSS included from a given file:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo rustdoc --lib -- --extend-css extra.css</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_rustdoc_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-doc.html">cargo-doc(1)</a>, <a href="https://doc.rust-lang.org/rustdoc/index.html">rustdoc(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,166 +0,0 @@
|
||||
<h2 id="cargo_search_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-search - Search packages in crates.io</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_search_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo search [<em>OPTIONS</em>] [<em>QUERY</em>…​]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_search_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This performs a textual search for crates on <a href="https://crates.io" class="bare">https://crates.io</a>. The matching
|
||||
crates will be displayed along with their description in TOML format suitable
|
||||
for copying into a <code>Cargo.toml</code> manifest.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_search_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_search_search_options">Search Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--limit</strong> <em>LIMIT</em></dt>
|
||||
<dd>
|
||||
<p>Limit the number of results (default: 10, max: 100).</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--index</strong> <em>INDEX</em></dt>
|
||||
<dd>
|
||||
<p>The URL of the registry index to use.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--registry</strong> <em>REGISTRY</em></dt>
|
||||
<dd>
|
||||
<p>Name of the registry to use. Registry names are defined in <a href="../reference/config.html">Cargo config files</a>.
|
||||
If not specified, the default registry is used, which is defined by the
|
||||
<code>registry.default</code> config key which defaults to <code>crates-io</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_search_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_search_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_search_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_search_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_search_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Search for a package from crates.io:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo search serde</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_search_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-install.html">cargo-install(1)</a>, <a href="cargo-publish.html">cargo-publish(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,613 +0,0 @@
|
||||
<h2 id="cargo_test_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-test - Execute unit and integration tests of a package</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_test_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo test [<em>OPTIONS</em>] [TESTNAME] [-- <em>TEST-OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_test_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Compile and execute unit and integration tests.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The test filtering argument <code>TESTNAME</code> and all the arguments following the two
|
||||
dashes (<code>--</code>) are passed to the test binaries and thus to <em>libtest</em> (rustc’s
|
||||
built in unit-test and micro-benchmarking framework). If you’re passing
|
||||
arguments to both Cargo and the binary, the ones after <code>--</code> go to the binary,
|
||||
the ones before go to Cargo. For details about libtest’s arguments see the
|
||||
output of <code>cargo test -- --help</code>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>As an example, this will filter for tests with <code>foo</code> in their name and run them
|
||||
on 3 threads in parallel:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo test foo -- --test-threads 3</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Tests are built with the <code>--test</code> option to <code>rustc</code> which creates an
|
||||
executable with a <code>main</code> function that automatically runs all functions
|
||||
annotated with the <code>#[test]</code> attribute in multiple threads. <code>#[bench]</code>
|
||||
annotated functions will also be run with one iteration to verify that they
|
||||
are functional.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The libtest harness may be disabled by setting <code>harness = false</code> in the target
|
||||
manifest settings, in which case your code will need to provide its own <code>main</code>
|
||||
function to handle running tests.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Documentation tests are also run by default, which is handled by <code>rustdoc</code>. It
|
||||
extracts code samples from documentation comments and executes them. See the
|
||||
<a href="https://doc.rust-lang.org/rustdoc/">rustdoc book</a> for more information on
|
||||
writing doc tests.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_test_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_test_options">Test Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--no-run</strong></dt>
|
||||
<dd>
|
||||
<p>Compile, but don’t run tests.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-fail-fast</strong></dt>
|
||||
<dd>
|
||||
<p>Run all tests regardless of failure. Without this flag, Cargo will exit
|
||||
after the first executable fails. The Rust test harness will run all
|
||||
tests within the executable to completion, this flag only applies to
|
||||
the executable as a whole.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, when no package selection options are given, the packages selected
|
||||
depend on the selected manifest file (based on the current working directory if
|
||||
<code>--manifest-path</code> is not given). If the manifest is the root of a workspace then
|
||||
the workspaces default members are selected, otherwise only the package defined
|
||||
by the manifest will be selected.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default members of a workspace can be set explicitly with the
|
||||
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
|
||||
virtual workspace will include all workspace members (equivalent to passing
|
||||
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em>…​</dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Test only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
|
||||
SPEC format. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--workspace</strong></dt>
|
||||
<dd>
|
||||
<p>Test all members in the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all</strong></dt>
|
||||
<dd>
|
||||
<p>Deprecated alias for <code>--workspace</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Exclude the specified packages. Must be used in conjunction with the
|
||||
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_target_selection">Target Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>When no target selection options are given, <code>cargo test</code> will build the
|
||||
following targets of the selected packages:</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p>lib — used to link with binaries, examples, integration tests, and doc tests</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>bins (only if integration tests are built and required features are
|
||||
available)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>examples — to ensure they compile</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>lib as a unit test</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>bins as unit tests</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>integration tests</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>doc tests for the lib target</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default behavior can be changed by setting the <code>test</code> flag for the target
|
||||
in the manifest settings. Setting examples to <code>test = true</code> will build and run
|
||||
the example as a test. Setting targets to <code>test = false</code> will stop them from
|
||||
being tested by default. Target selection options that take a target by name
|
||||
ignore the <code>test</code> flag and will always test the given target.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Doc tests for libraries may be disabled by setting <code>doctest = false</code> for the
|
||||
library in the manifest.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Binary targets are automatically built if there is an integration test or
|
||||
benchmark. This allows an integration test to execute the binary to exercise
|
||||
and test its behavior. The <code>CARGO_BIN_EXE_<name></code>
|
||||
<a href="../reference/environment-variables.html#environment-variables-cargo-sets-for-crates">environment variable</a>
|
||||
is set when the integration test is built so that it can use the
|
||||
<a href="https://doc.rust-lang.org/std/macro.env.html"><code>env</code> macro</a> to locate the
|
||||
executable.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Passing target selection flags will test only the
|
||||
specified targets.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--lib</strong></dt>
|
||||
<dd>
|
||||
<p>Test the package’s library.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Test the specified binary. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bins</strong></dt>
|
||||
<dd>
|
||||
<p>Test all binary targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--example</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Test the specified example. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--examples</strong></dt>
|
||||
<dd>
|
||||
<p>Test all example targets.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--test</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Test the specified integration test. This flag may be specified multiple
|
||||
times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--tests</strong></dt>
|
||||
<dd>
|
||||
<p>Test all targets in test mode that have the <code>test = true</code> manifest
|
||||
flag set. By default this includes the library and binaries built as
|
||||
unittests, and integration tests. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
unittest, and once as a dependency for binaries, integration tests, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>test</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bench</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Test the specified benchmark. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--benches</strong></dt>
|
||||
<dd>
|
||||
<p>Test all targets in benchmark mode that have the <code>bench = true</code>
|
||||
manifest flag set. By default this includes the library and binaries built
|
||||
as benchmarks, and bench targets. Be aware that this will also build any
|
||||
required dependencies, so the lib target may be built twice (once as a
|
||||
benchmark, and once as a dependency for binaries, benchmarks, etc.).
|
||||
Targets may be enabled or disabled by setting the <code>bench</code> flag in the
|
||||
manifest settings for the target.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-targets</strong></dt>
|
||||
<dd>
|
||||
<p>Test all targets. This is equivalent to specifying <code>--lib --bins
|
||||
--tests --benches --examples</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--doc</strong></dt>
|
||||
<dd>
|
||||
<p>Test only the library’s documentation. This cannot be mixed with other
|
||||
target options.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_compilation_options">Compilation Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Test for the given architecture. The default is the host
|
||||
architecture. The general format of the triple is
|
||||
<code><arch><sub>-<vendor>-<sys>-<abi></code>. Run <code>rustc --print target-list</code> for a
|
||||
list of supported targets.</p>
|
||||
<div class="paragraph">
|
||||
<p>This may also be specified with the <code>build.target</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that specifying this flag makes Cargo run in a different mode where the
|
||||
target artifacts are placed in a separate directory. See the
|
||||
<a href="../guide/build-cache.html">build cache</a> documentation for more details.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--release</strong></dt>
|
||||
<dd>
|
||||
<p>Test optimized artifacts with the <code>release</code> profile. See the
|
||||
<a href="#cargo_test_profiles">PROFILES</a> section for details on how this affects profile selection.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_output_options">Output Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
|
||||
<dd>
|
||||
<p>Directory for all generated artifacts and intermediate files. May also be
|
||||
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
|
||||
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
|
||||
to <code>target</code> in the root of the workspace.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_display_options">Display Options</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default the Rust test harness hides output from test execution to keep
|
||||
results readable. Test output can be recovered (e.g., for debugging) by passing
|
||||
<code>--nocapture</code> to the test binaries:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo test -- --nocapture</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
|
||||
<dd>
|
||||
<p>The output format for diagnostic messages. Can be specified multiple times
|
||||
and consists of comma-separated values. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>human</code> (default): Display in a human-readable text format.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json</code>: Emit JSON messages to stdout. See
|
||||
<a href="../reference/external-tools.html#json-messages">the reference</a>
|
||||
for more details.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
|
||||
the "short" rendering from rustc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
|
||||
contains embedded ANSI color codes for respecting rustc’s default color
|
||||
scheme.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
|
||||
in JSON messages printed, but instead Cargo itself should render the
|
||||
JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others
|
||||
coming from rustc are still emitted.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_test_miscellaneous_options">Miscellaneous Options</h3>
|
||||
<div class="paragraph">
|
||||
<p>The <code>--jobs</code> argument affects the building of the test executable but does not
|
||||
affect how many threads are used when running the tests. The Rust test harness
|
||||
includes an option to control the number of threads used:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo test -j 2 -- --test-threads=2</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-j</strong> <em>N</em></dt>
|
||||
<dt class="hdlist1"><strong>--jobs</strong> <em>N</em></dt>
|
||||
<dd>
|
||||
<p>Number of parallel jobs to run. May also be specified with the
|
||||
<code>build.jobs</code> <a href="../reference/config.html">config value</a>. Defaults to
|
||||
the number of CPUs.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_test_profiles">PROFILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Profiles may be used to configure compiler options such as optimization levels
|
||||
and debug settings. See
|
||||
<a href="../reference/profiles.html">the reference</a>
|
||||
for more details.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Profile selection depends on the target and crate being built. By default the
|
||||
<code>dev</code> or <code>test</code> profiles are used. If the <code>--release</code> flag is given, then the
|
||||
<code>release</code> or <code>bench</code> profiles are used.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all fit-content">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Target</th>
|
||||
<th class="tableblock halign-left valign-top">Default Profile</th>
|
||||
<th class="tableblock halign-left valign-top"><code>--release</code> Profile</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">lib, bin, example</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dev</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>release</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">test, bench, or any target<br>
|
||||
in "test" or "bench" mode</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>test</code></p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>bench</code></p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="paragraph">
|
||||
<p>Dependencies use the <code>dev</code>/<code>release</code> profiles.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Unit tests are separate executable artifacts which use the <code>test</code>/<code>bench</code>
|
||||
profiles. Example targets are built the same as with <code>cargo build</code> (using the
|
||||
<code>dev</code>/<code>release</code> profiles) unless you are building them with the test harness
|
||||
(by setting <code>test = true</code> in the manifest or using the <code>--example</code> flag) in
|
||||
which case they use the <code>test</code>/<code>bench</code> profiles. Library targets are built
|
||||
with the <code>dev</code>/<code>release</code> profiles when linked to an integration test, binary,
|
||||
or doctest.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_test_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_test_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_test_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Execute all the unit and integration tests of the current package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo test</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Run only tests whose names match against a filter string:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo test name_filter</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Run only a specific test within a specific integration test:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo test --test int_test_name -- modname::test_name</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_test_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-bench.html">cargo-bench(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,516 +0,0 @@
|
||||
<h2 id="cargo_tree_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-tree - Display a tree visualization of a dependency graph</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_tree_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo tree [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_tree_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will display a tree of dependencies to the terminal. An example
|
||||
of a simple project that depends on the "rand" package:</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre>myproject v0.1.0 (/myproject)
|
||||
└── rand v0.7.3
|
||||
├── getrandom v0.1.14
|
||||
│ ├── cfg-if v0.1.10
|
||||
│ └── libc v0.2.68
|
||||
├── libc v0.2.68 (*)
|
||||
├── rand_chacha v0.2.2
|
||||
│ ├── ppv-lite86 v0.2.6
|
||||
│ └── rand_core v0.5.1
|
||||
│ └── getrandom v0.1.14 (*)
|
||||
└── rand_core v0.5.1 (*)
|
||||
[build-dependencies]
|
||||
└── cc v1.0.50</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Packages marked with <code>(*)</code> have been "de-duplicated". The dependencies for the
|
||||
package have already been shown elswhere in the graph, and so are not
|
||||
repeated. Use the <code>--no-dedupe</code> option to repeat the duplicates.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The <code>-e</code> flag can be used to select the dependency kinds to display. The
|
||||
"features" kind changes the output to display the features enabled by
|
||||
each dependency. For example, <code>cargo tree -e features</code>:</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre>myproject v0.1.0 (/myproject)
|
||||
└── log feature "serde"
|
||||
└── log v0.4.8
|
||||
├── serde v1.0.106
|
||||
└── cfg-if feature "default"
|
||||
└── cfg-if v0.1.10</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>In this tree, <code>myproject</code> depends on <code>log</code> with the <code>serde</code> feature. <code>log</code> in
|
||||
turn depends on <code>cfg-if</code> with "default" features. When using <code>-e features</code> it
|
||||
can be helpful to use <code>-i</code> flag to show how the features flow into a package.
|
||||
See the examples below for more detail.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_tree_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_tree_tree_options">Tree Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-i</strong> <em>SPEC</em></dt>
|
||||
<dt class="hdlist1"><strong>--invert</strong> <em>SPEC</em></dt>
|
||||
<dd>
|
||||
<p>Show the reverse dependencies for the given package. This flag will invert
|
||||
the tree and display the packages that depend on the given package.</p>
|
||||
<div class="paragraph">
|
||||
<p>Note that in a workspace, by default it will only display the package’s
|
||||
reverse dependencies inside the tree of the workspace member in the current
|
||||
directory. The <code>--workspace</code> flag can be used to extend it so that it will
|
||||
show the package’s reverse dependencies across the entire workspace. The <code>-p</code>
|
||||
flag can be used to display the package’s reverse dependencies only with the
|
||||
subtree of the package given to <code>-p</code>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-dedupe</strong></dt>
|
||||
<dd>
|
||||
<p>Do not de-duplicate repeated dependencies. Usually, when a package has
|
||||
already displayed its dependencies, further occurrences will not
|
||||
re-display its dependencies, and will include a <code>(*)</code> to indicate it has
|
||||
already been shown. This flag will cause those duplicates to be repeated.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-d</strong></dt>
|
||||
<dt class="hdlist1"><strong>--duplicates</strong></dt>
|
||||
<dd>
|
||||
<p>Show only dependencies which come in multiple versions (implies
|
||||
<code>--invert</code>). When used with the <code>-p</code> flag, only shows duplicates within
|
||||
the subtree of the given package.</p>
|
||||
<div class="paragraph">
|
||||
<p>It can be beneficial for build times and executable sizes to avoid building
|
||||
that same package multiple times. This flag can help identify the offending
|
||||
packages. You can then investigate if the package that depends on the
|
||||
duplicate with the older version can be updated to the newer version so that
|
||||
only one instance is built.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-e</strong> <em>KINDS</em></dt>
|
||||
<dt class="hdlist1"><strong>--edges</strong> <em>KINDS</em></dt>
|
||||
<dd>
|
||||
<p>The dependency kinds to display. Takes a comma separated list of values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>all</code> — Show all edge kinds.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>normal</code> — Show normal dependencies.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>build</code> — Show build dependencies.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>dev</code> — Show development dependencies.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>features</code> — Show features enabled by each dependency. If this is
|
||||
the only kind given, then it will automatically include the other
|
||||
dependency kinds.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>no-normal</code> — Do not include normal dependencies.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>no-build</code> — Do not include build dependencies.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>no-dev</code> — Do not include development dependencies.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The <code>no-</code> prefixed options cannot be mixed with the other dependency kinds.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default is <code>normal,build,dev</code>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
|
||||
<dd>
|
||||
<p>Filter dependencies matching the given target-triple.
|
||||
The default is the host platform. Use the value <code>all</code> to include <strong>all</strong>
|
||||
targets.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_tree_tree_formatting_options">Tree Formatting Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--charset</strong> <em>CHARSET</em></dt>
|
||||
<dd>
|
||||
<p>Chooses the character set to use for the tree. Valid values are "utf8" or
|
||||
"ascii". Default is "utf8".</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-f</strong> <em>FORMAT</em></dt>
|
||||
<dt class="hdlist1"><strong>--format</strong> <em>FORMAT</em></dt>
|
||||
<dd>
|
||||
<p>Set the format string for each package. The default is "{p}".</p>
|
||||
<div class="paragraph">
|
||||
<p>This is an arbitrary string which will be used to display each package. The following
|
||||
strings will be replaced with the corresponding value:</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>{p}</code> — The package name.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>{l}</code> — The package license.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>{r}</code> — The package repository URL.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>{f}</code> — Comma-separated list of package features that are enabled.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--prefix</strong> <em>PREFIX</em></dt>
|
||||
<dd>
|
||||
<p>Sets how each line is displayed. The <em>PREFIX</em> value can be one of:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>indent</code> (default) — Shows each line indented as a tree.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>depth</code> — Show as a list, with the numeric depth printed before each entry.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>none</code> — Show as a flat list.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_tree_package_selection">Package Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>By default, when no package selection options are given, the packages selected
|
||||
depend on the selected manifest file (based on the current working directory if
|
||||
<code>--manifest-path</code> is not given). If the manifest is the root of a workspace then
|
||||
the workspaces default members are selected, otherwise only the package defined
|
||||
by the manifest will be selected.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The default members of a workspace can be set explicitly with the
|
||||
<code>workspace.default-members</code> key in the root manifest. If this is not set, a
|
||||
virtual workspace will include all workspace members (equivalent to passing
|
||||
<code>--workspace</code>), and a non-virtual workspace will include only the root crate itself.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em>…​</dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Display only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the
|
||||
SPEC format. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--workspace</strong></dt>
|
||||
<dd>
|
||||
<p>Display all members in the workspace.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--exclude</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Exclude the specified packages. Must be used in conjunction with the
|
||||
<code>--workspace</code> flag. This flag may be specified multiple times.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_tree_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_tree_feature_selection">Feature Selection</h3>
|
||||
<div class="paragraph">
|
||||
<p>The feature flags allow you to control the enabled features for the "current"
|
||||
package. The "current" package is the package in the current directory, or the
|
||||
one specified in <code>--manifest-path</code>. If running in the root of a virtual
|
||||
workspace, then the default features are selected for all workspace members,
|
||||
or all features if <code>--all-features</code> is specified.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>When no feature options are given, the <code>default</code> feature is activated for
|
||||
every selected package.</p>
|
||||
</div>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
|
||||
<dd>
|
||||
<p>Space or comma separated list of features to activate. These features only
|
||||
apply to the current directory’s package. Features of direct dependencies
|
||||
may be enabled with <code><dep-name>/<feature-name></code> syntax. This flag may be
|
||||
specified multiple times, which enables all specified features.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--all-features</strong></dt>
|
||||
<dd>
|
||||
<p>Activate all available features of all selected packages.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
|
||||
<dd>
|
||||
<p>Do not activate the <code>default</code> feature of the current directory’s
|
||||
package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_tree_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_tree_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_tree_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_tree_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_tree_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Display the tree for the package in the current directory:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo tree</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Display all the packages that depend on the <code>syn</code> package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo tree -i syn</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Show the features enabled on each package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo tree --format "{p} {f}"</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Show all packages that are built multiple times. This can happen if multiple
|
||||
semver-incompatible versions appear in the tree (like 1.0.0 and 2.0.0).</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo tree -d</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Explain why features are enabled for the <code>syn</code> package:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo tree -e features -i syn</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The <code>-e features</code> flag is used to show features. The <code>-i</code> flag is used to
|
||||
invert the graph so that it displays the packages that depend on <code>syn</code>. An
|
||||
example of what this would display:</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre>syn v1.0.17
|
||||
├── syn feature "clone-impls"
|
||||
│ └── syn feature "default"
|
||||
│ └── rustversion v1.0.2
|
||||
│ └── rustversion feature "default"
|
||||
│ └── myproject v0.1.0 (/myproject)
|
||||
│ └── myproject feature "default" (command-line)
|
||||
├── syn feature "default" (*)
|
||||
├── syn feature "derive"
|
||||
│ └── syn feature "default" (*)
|
||||
├── syn feature "full"
|
||||
│ └── rustversion v1.0.2 (*)
|
||||
├── syn feature "parsing"
|
||||
│ └── syn feature "default" (*)
|
||||
├── syn feature "printing"
|
||||
│ └── syn feature "default" (*)
|
||||
├── syn feature "proc-macro"
|
||||
│ └── syn feature "default" (*)
|
||||
└── syn feature "quote"
|
||||
├── syn feature "printing" (*)
|
||||
└── syn feature "proc-macro" (*)</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>To read this graph, you can follow the chain for each feature from the root to
|
||||
see why it is included. For example, the "full" feature is added by the
|
||||
<code>rustversion</code> crate which is included from <code>myproject</code> (with the default
|
||||
features), and <code>myproject</code> is the package selected on the command-line. All
|
||||
of the other <code>syn</code> features are added by the "default" feature ("quote" is
|
||||
added by "printing" and "proc-macro", both of which are default features).</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If you’re having difficulty cross-referencing the de-duplicated <code>(*)</code> entries,
|
||||
try with the <code>--no-dedupe</code> flag to get the full output.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_tree_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-metadata.html">cargo-metadata(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,191 +0,0 @@
|
||||
<h2 id="cargo_uninstall_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-uninstall - Remove a Rust binary</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_uninstall_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo uninstall [<em>OPTIONS</em>] [<em>SPEC</em>…​]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_uninstall_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command removes a package installed with <a href="cargo-install.html">cargo-install(1)</a>. The <em>SPEC</em>
|
||||
argument is a package ID specification of the package to remove (see
|
||||
<a href="cargo-pkgid.html">cargo-pkgid(1)</a>).</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>By default all binaries are removed for a crate but the <code>--bin</code> and
|
||||
<code>--example</code> flags can be used to only remove particular binaries.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The installation root is determined, in order of precedence:</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>--root</code> option</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>CARGO_INSTALL_ROOT</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>install.root</code> Cargo <a href="../reference/config.html">config value</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>CARGO_HOME</code> environment variable</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>$HOME/.cargo</code></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_uninstall_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_uninstall_install_options">Install Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong></dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Package to uninstall.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--bin</strong> <em>NAME</em>…​</dt>
|
||||
<dd>
|
||||
<p>Only uninstall the binary <em>NAME</em>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--root</strong> <em>DIR</em></dt>
|
||||
<dd>
|
||||
<p>Directory to uninstall packages from.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_uninstall_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_uninstall_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_uninstall_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_uninstall_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_uninstall_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Uninstall a previously installed package.</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo uninstall ripgrep</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_uninstall_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-install.html">cargo-install(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,241 +0,0 @@
|
||||
<h2 id="cargo_update_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-update - Update dependencies as recorded in the local lock file</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_update_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo update [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_update_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will update dependencies in the <code>Cargo.lock</code> file to the latest
|
||||
version. It requires that the <code>Cargo.lock</code> file already exists as generated
|
||||
by commands such as <a href="cargo-build.html">cargo-build(1)</a> or <a href="cargo-generate-lockfile.html">cargo-generate-lockfile(1)</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_update_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_update_update_options">Update Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-p</strong> <em>SPEC</em>…​</dt>
|
||||
<dt class="hdlist1"><strong>--package</strong> <em>SPEC</em>…​</dt>
|
||||
<dd>
|
||||
<p>Update only the specified packages. This flag may be specified
|
||||
multiple times. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the SPEC format.</p>
|
||||
<div class="paragraph">
|
||||
<p>If packages are specified with the <code>-p</code> flag, then a conservative update of
|
||||
the lockfile will be performed. This means that only the dependency specified
|
||||
by SPEC will be updated. Its transitive dependencies will be updated only if
|
||||
SPEC cannot be updated without updating dependencies. All other dependencies
|
||||
will remain locked at their currently recorded versions.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If <code>-p</code> is not specified, all dependencies are updated.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--aggressive</strong></dt>
|
||||
<dd>
|
||||
<p>When used with <code>-p</code>, dependencies of <em>SPEC</em> are forced to update as well.
|
||||
Cannot be used with <code>--precise</code>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--precise</strong> <em>PRECISE</em></dt>
|
||||
<dd>
|
||||
<p>When used with <code>-p</code>, allows you to specify a specific version number to
|
||||
set the package to. If the package comes from a git repository, this can
|
||||
be a git revision (such as a SHA hash or tag).</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--dry-run</strong></dt>
|
||||
<dd>
|
||||
<p>Displays what would be updated, but doesn’t actually write the lockfile.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_update_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_update_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_update_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_update_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_update_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_update_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Update all dependencies in the lockfile:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo update</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Update only specific dependencies:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo update -p foo -p bar</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Set a specific dependency to a specific version:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo update -p foo --precise 1.2.3</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_update_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-generate-lockfile.html">cargo-generate-lockfile(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,240 +0,0 @@
|
||||
<h2 id="cargo_vendor_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-vendor - Vendor all dependencies locally</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_vendor_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo vendor [<em>OPTIONS</em>] [<em>PATH</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_vendor_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This cargo subcommand will vendor all crates.io and git dependencies for a
|
||||
project into the specified directory at <code><path></code>. After this command completes
|
||||
the vendor directory specified by <code><path></code> will contain all remote sources from
|
||||
dependencies specified. Additional manifests beyond the default one can be
|
||||
specified with the <code>-s</code> option.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The <code>cargo vendor</code> command will also print out the configuration necessary
|
||||
to use the vendored sources, which you will need to add to <code>.cargo/config.toml</code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_vendor_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_vendor_vendor_options">Vendor Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-s</strong> <em>MANIFEST</em></dt>
|
||||
<dt class="hdlist1"><strong>--sync</strong> <em>MANIFEST</em></dt>
|
||||
<dd>
|
||||
<p>Specify extra <code>Cargo.toml</code> manifests to workspaces which should also be
|
||||
vendored and synced to the output.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--no-delete</strong></dt>
|
||||
<dd>
|
||||
<p>Don’t delete the "vendor" directory when vendoring, but rather keep all
|
||||
existing contents of the vendor directory</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--respect-source-config</strong></dt>
|
||||
<dd>
|
||||
<p>Instead of ignoring <code>[source]</code> configuration by default in <code>.cargo/config.toml</code>
|
||||
read it and use it when downloading crates from crates.io, for example</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--versioned-dirs</strong></dt>
|
||||
<dd>
|
||||
<p>Normally versions are only added to disambiguate multiple versions of the
|
||||
same package. This option causes all directories in the "vendor" directory
|
||||
to be versioned, which makes it easier to track the history of vendored
|
||||
packages over time, and can help with the performance of re-vendoring when
|
||||
only a subset of the packages have changed.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_vendor_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_vendor_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_vendor_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_vendor_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_vendor_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_vendor_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Vendor all dependencies into a local "vendor" folder</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo vendor</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Vendor all dependencies into a local "third-party/vendor" folder</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo vendor third-party/vendor</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Vendor the current workspace as well as another to "vendor"</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo vendor -s ../path/to/Cargo.toml</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_vendor_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,199 +0,0 @@
|
||||
<h2 id="cargo_verify_project_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-verify-project - Check correctness of crate manifest</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_verify_project_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo verify-project [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_verify_project_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This command will parse the local manifest and check its validity. It emits a
|
||||
JSON object with the result. A successful validation will display:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>{"success":"true"}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>An invalid workspace will display:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>{"invalid":"human-readable error message"}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_verify_project_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_verify_project_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_verify_project_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
|
||||
<dd>
|
||||
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches for the
|
||||
<code>Cargo.toml</code> file in the current directory or any parent directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_verify_project_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_verify_project_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_verify_project_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>The workspace is OK.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">1</dt>
|
||||
<dd>
|
||||
<p>The workspace is invalid.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_verify_project_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Check the current workspace for errors:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo verify-project</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_verify_project_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-package.html">cargo-package(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,76 +0,0 @@
|
||||
<h2 id="cargo_version_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-version - Show version information</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_version_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo version [<em>OPTIONS</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_version_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Displays the version of Cargo.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_version_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Display additional version information.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_version_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Display the version:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo version</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>The version is also available via flags:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo --version
|
||||
cargo -V</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Display extra version information:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo -Vv</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_version_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,196 +0,0 @@
|
||||
<h2 id="cargo_yank_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo-yank - Remove a pushed crate from the index</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_yank_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo yank [<em>OPTIONS</em>] --vers <em>VERSION</em> [<em>CRATE</em>]</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_yank_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>The yank command removes a previously published crate’s version from the
|
||||
server’s index. This command does not delete any data, and the crate will
|
||||
still be available for download via the registry’s download link.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Note that existing crates locked to a yanked version will still be able to
|
||||
download the yanked version to use it. Cargo will, however, not allow any new
|
||||
crates to be locked to any yanked version.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>This command requires you to be authenticated with either the <code>--token</code> option
|
||||
or using <a href="cargo-login.html">cargo-login(1)</a>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>If the crate name is not specified, it will use the package name from the
|
||||
current directory.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_yank_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_yank_yank_options">Yank Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--vers</strong> <em>VERSION</em></dt>
|
||||
<dd>
|
||||
<p>The version to yank or un-yank.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--undo</strong></dt>
|
||||
<dd>
|
||||
<p>Undo a yank, putting a version back into the index.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--token</strong> <em>TOKEN</em></dt>
|
||||
<dd>
|
||||
<p>API token to use when authenticating. This overrides the token stored in
|
||||
the credentials file (which is created by <a href="cargo-login.html">cargo-login(1)</a>).</p>
|
||||
<div class="paragraph">
|
||||
<p><a href="../reference/config.html">Cargo config</a> environment variables can be
|
||||
used to override the tokens stored in the credentials file. The token for
|
||||
crates.io may be specified with the <code>CARGO_REGISTRY_TOKEN</code> environment
|
||||
variable. Tokens for other registries may be specified with environment
|
||||
variables of the form <code>CARGO_REGISTRIES_NAME_TOKEN</code> where <code>NAME</code> is the name
|
||||
of the registry in all capital letters.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--index</strong> <em>INDEX</em></dt>
|
||||
<dd>
|
||||
<p>The URL of the registry index to use.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--registry</strong> <em>REGISTRY</em></dt>
|
||||
<dd>
|
||||
<p>Name of the registry to use. Registry names are defined in <a href="../reference/config.html">Cargo config files</a>.
|
||||
If not specified, the default registry is used, which is defined by the
|
||||
<code>registry.default</code> config key which defaults to <code>crates-io</code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_yank_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="cargo_yank_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_yank_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_yank_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_yank_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Yank a crate from the index:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo yank --vers 1.0.7 foo</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="cargo_yank_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="index.html">cargo(1)</a>, <a href="cargo-login.html">cargo-login(1)</a>, <a href="cargo-publish.html">cargo-publish(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,470 +0,0 @@
|
||||
<h2 id="_name">NAME</h2>
|
||||
<div class="sectionbody">
|
||||
<p>cargo - The Rust package manager</p>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_synopsis">SYNOPSIS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><code>cargo [<em>OPTIONS</em>] <em>COMMAND</em> [<em>ARGS</em>]</code><br>
|
||||
<code>cargo [<em>OPTIONS</em>] --version</code><br>
|
||||
<code>cargo [<em>OPTIONS</em>] --list</code><br>
|
||||
<code>cargo [<em>OPTIONS</em>] --help</code><br>
|
||||
<code>cargo [<em>OPTIONS</em>] --explain <em>CODE</em></code></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_description">DESCRIPTION</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>This program is a package manager and build tool for the Rust language,
|
||||
available at <a href="https://rust-lang.org" class="bare">https://rust-lang.org</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_commands">COMMANDS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="_build_commands">Build Commands</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><a href="cargo-bench.html">cargo-bench(1)</a></dt>
|
||||
<dd>
|
||||
<p>Execute benchmarks of a package.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-build.html">cargo-build(1)</a></dt>
|
||||
<dd>
|
||||
<p>Compile a package.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-check.html">cargo-check(1)</a></dt>
|
||||
<dd>
|
||||
<p>Check a local package and all of its dependencies for errors.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-clean.html">cargo-clean(1)</a></dt>
|
||||
<dd>
|
||||
<p>Remove artifacts that Cargo has generated in the past.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-doc.html">cargo-doc(1)</a></dt>
|
||||
<dd>
|
||||
<p>Build a package’s documentation.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-fetch.html">cargo-fetch(1)</a></dt>
|
||||
<dd>
|
||||
<p>Fetch dependencies of a package from the network.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-fix.html">cargo-fix(1)</a></dt>
|
||||
<dd>
|
||||
<p>Automatically fix lint warnings reported by rustc.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-run.html">cargo-run(1)</a></dt>
|
||||
<dd>
|
||||
<p>Run a binary or example of the local package.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-rustc.html">cargo-rustc(1)</a></dt>
|
||||
<dd>
|
||||
<p>Compile a package, and pass extra options to the compiler.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-rustdoc.html">cargo-rustdoc(1)</a></dt>
|
||||
<dd>
|
||||
<p>Build a package’s documentation, using specified custom flags.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-test.html">cargo-test(1)</a></dt>
|
||||
<dd>
|
||||
<p>Execute unit and integration tests of a package.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_manifest_commands">Manifest Commands</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><a href="cargo-generate-lockfile.html">cargo-generate-lockfile(1)</a></dt>
|
||||
<dd>
|
||||
<p>Generate <code>Cargo.lock</code> for a project.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-locate-project.html">cargo-locate-project(1)</a></dt>
|
||||
<dd>
|
||||
<p>Print a JSON representation of a <code>Cargo.toml</code> file’s location.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-metadata.html">cargo-metadata(1)</a></dt>
|
||||
<dd>
|
||||
<p>Output the resolved dependencies of a package, the concrete used versions
|
||||
including overrides, in machine-readable format.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-pkgid.html">cargo-pkgid(1)</a></dt>
|
||||
<dd>
|
||||
<p>Print a fully qualified package specification.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-tree.html">cargo-tree(1)</a></dt>
|
||||
<dd>
|
||||
<p>Display a tree visualization of a dependency graph.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-update.html">cargo-update(1)</a></dt>
|
||||
<dd>
|
||||
<p>Update dependencies as recorded in the local lock file.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-vendor.html">cargo-vendor(1)</a></dt>
|
||||
<dd>
|
||||
<p>Vendor all dependencies locally.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-verify-project.html">cargo-verify-project(1)</a></dt>
|
||||
<dd>
|
||||
<p>Check correctness of crate manifest.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_package_commands">Package Commands</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><a href="cargo-init.html">cargo-init(1)</a></dt>
|
||||
<dd>
|
||||
<p>Create a new Cargo package in an existing directory.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-install.html">cargo-install(1)</a></dt>
|
||||
<dd>
|
||||
<p>Build and install a Rust binary.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-new.html">cargo-new(1)</a></dt>
|
||||
<dd>
|
||||
<p>Create a new Cargo package.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-search.html">cargo-search(1)</a></dt>
|
||||
<dd>
|
||||
<p>Search packages in crates.io.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-uninstall.html">cargo-uninstall(1)</a></dt>
|
||||
<dd>
|
||||
<p>Remove a Rust binary.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_publishing_commands">Publishing Commands</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><a href="cargo-login.html">cargo-login(1)</a></dt>
|
||||
<dd>
|
||||
<p>Save an API token from the registry locally.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-owner.html">cargo-owner(1)</a></dt>
|
||||
<dd>
|
||||
<p>Manage the owners of a crate on the registry.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-package.html">cargo-package(1)</a></dt>
|
||||
<dd>
|
||||
<p>Assemble the local package into a distributable tarball.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-publish.html">cargo-publish(1)</a></dt>
|
||||
<dd>
|
||||
<p>Upload a package to the registry.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-yank.html">cargo-yank(1)</a></dt>
|
||||
<dd>
|
||||
<p>Remove a pushed crate from the index.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_general_commands">General Commands</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><a href="cargo-help.html">cargo-help(1)</a></dt>
|
||||
<dd>
|
||||
<p>Display help information about Cargo.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><a href="cargo-version.html">cargo-version(1)</a></dt>
|
||||
<dd>
|
||||
<p>Show version information.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_options">OPTIONS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="_special_options">Special Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-V</strong></dt>
|
||||
<dt class="hdlist1"><strong>--version</strong></dt>
|
||||
<dd>
|
||||
<p>Print version info and exit. If used with <code>--verbose</code>, prints extra
|
||||
information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--list</strong></dt>
|
||||
<dd>
|
||||
<p>List all installed Cargo subcommands. If used with <code>--verbose</code>, prints
|
||||
extra information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--explain <em>CODE</em></strong></dt>
|
||||
<dd>
|
||||
<p>Run <code>rustc --explain CODE</code> which will print out a detailed explanation of
|
||||
an error message (for example, <code>E0004</code>).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_display_options">Display Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>-v</strong></dt>
|
||||
<dt class="hdlist1"><strong>--verbose</strong></dt>
|
||||
<dd>
|
||||
<p>Use verbose output. May be specified twice for "very verbose" output which
|
||||
includes extra output such as dependency warnings and build script output.
|
||||
May also be specified with the <code>term.verbose</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-q</strong></dt>
|
||||
<dt class="hdlist1"><strong>--quiet</strong></dt>
|
||||
<dd>
|
||||
<p>No output printed to stdout.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
|
||||
<dd>
|
||||
<p>Control when colored output is used. Valid values:</p>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>auto</code> (default): Automatically detect if color support is available on the
|
||||
terminal.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>always</code>: Always display colors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>never</code>: Never display colors.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>term.color</code>
|
||||
<a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_manifest_options">Manifest Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>--frozen</strong></dt>
|
||||
<dt class="hdlist1"><strong>--locked</strong></dt>
|
||||
<dd>
|
||||
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
|
||||
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
||||
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
|
||||
attempting to access the network to determine if it is out-of-date.</p>
|
||||
<div class="paragraph">
|
||||
<p>These may be used in environments where you want to assert that the
|
||||
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
|
||||
access.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>--offline</strong></dt>
|
||||
<dd>
|
||||
<p>Prevents Cargo from accessing the network for any reason. Without this
|
||||
flag, Cargo will stop with an error if it needs to access the network and
|
||||
the network is not available. With this flag, Cargo will attempt to
|
||||
proceed without the network if possible.</p>
|
||||
<div class="paragraph">
|
||||
<p>Beware that this may result in different dependency resolution than online
|
||||
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
||||
if there might be a newer version as indicated in the local copy of the index.
|
||||
See the <a href="cargo-fetch.html">cargo-fetch(1)</a> command to download dependencies before going
|
||||
offline.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>May also be specified with the <code>net.offline</code> <a href="../reference/config.html">config value</a>.</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_common_options">Common Options</h3>
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><strong>+TOOLCHAIN</strong></dt>
|
||||
<dd>
|
||||
<p>If Cargo has been installed with rustup, and the first argument to <code>cargo</code>
|
||||
begins with <code>+</code>, it will be interpreted as a rustup toolchain name (such
|
||||
as <code>+stable</code> or <code>+nightly</code>).
|
||||
See the <a href="https://github.com/rust-lang/rustup/">rustup documentation</a>
|
||||
for more information about how toolchain overrides work.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-h</strong></dt>
|
||||
<dt class="hdlist1"><strong>--help</strong></dt>
|
||||
<dd>
|
||||
<p>Prints help information.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>…​</dt>
|
||||
<dd>
|
||||
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
|
||||
details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_environment">ENVIRONMENT</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="../reference/environment-variables.html">the reference</a> for
|
||||
details on environment variables that Cargo reads.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_exit_status">Exit Status</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1">0</dt>
|
||||
<dd>
|
||||
<p>Cargo succeeded.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">101</dt>
|
||||
<dd>
|
||||
<p>Cargo failed to complete.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_files">FILES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="dlist">
|
||||
<dl>
|
||||
<dt class="hdlist1"><code>~/.cargo/</code></dt>
|
||||
<dd>
|
||||
<p>Default location for Cargo’s "home" directory where it stores various
|
||||
files. The location can be changed with the <code>CARGO_HOME</code> environment
|
||||
variable.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><code>$CARGO_HOME/bin/</code></dt>
|
||||
<dd>
|
||||
<p>Binaries installed by <a href="cargo-install.html">cargo-install(1)</a> will be located here. If using
|
||||
rustup, executables distributed with Rust are also located here.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><code>$CARGO_HOME/config.toml</code></dt>
|
||||
<dd>
|
||||
<p>The global configuration file. See <a href="../reference/config.html">the reference</a>
|
||||
for more information about configuration files.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><code>.cargo/config.toml</code></dt>
|
||||
<dd>
|
||||
<p>Cargo automatically searches for a file named <code>.cargo/config.toml</code> in the
|
||||
current directory, and all parent directories. These configuration files
|
||||
will be merged with the global configuration file.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><code>$CARGO_HOME/credentials.toml</code></dt>
|
||||
<dd>
|
||||
<p>Private authentication information for logging in to a registry.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><code>$CARGO_HOME/registry/</code></dt>
|
||||
<dd>
|
||||
<p>This directory contains cached downloads of the registry index and any
|
||||
downloaded dependencies.</p>
|
||||
</dd>
|
||||
<dt class="hdlist1"><code>$CARGO_HOME/git/</code></dt>
|
||||
<dd>
|
||||
<p>This directory contains cached downloads of git dependencies.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Please note that the internal structure of the <code>$CARGO_HOME</code> directory is not
|
||||
stable yet and may be subject to change.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_examples">EXAMPLES</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="olist arabic">
|
||||
<ol class="arabic">
|
||||
<li>
|
||||
<p>Build a local package and all of its dependencies:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo build</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Build a package with optimizations:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo build --release</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Run tests for a cross-compiled target:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo test --target i686-unknown-linux-gnu</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Create a new package that builds an executable:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo new foobar</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Create a package in the current directory:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>mkdir foo && cd foo
|
||||
cargo init .</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Learn about a command’s options and usage:</p>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>cargo help clean</pre>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_bugs">BUGS</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>See <a href="https://github.com/rust-lang/cargo/issues" class="bare">https://github.com/rust-lang/cargo/issues</a> for issues.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_see_also">SEE ALSO</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="https://doc.rust-lang.org/rustc/index.html">rustc(1)</a>, <a href="https://doc.rust-lang.org/rustdoc/index.html">rustdoc(1)</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user