mirror of
https://github.com/rust-lang/cargo
synced 2024-08-25 10:35:53 +00:00
Remove nbsp characters.
This commit is contained in:
parent
77d5647213
commit
70a607eaa7
|
@ -57,11 +57,11 @@ man page:
|
|||
|
||||
{{#option "`-t` _type_"}}
|
||||
Specifies the output type. The following output types are supported:
|
||||
- `man` — A troff-style man page. Outputs with a numbered extension (like
|
||||
- `man` — A troff-style man page. Outputs with a numbered extension (like
|
||||
`.1`) matching the man page section.
|
||||
- `md` — A markdown file, after all handlebars processing has been finished.
|
||||
- `md` — A markdown file, after all handlebars processing has been finished.
|
||||
Outputs with the `.md` extension.
|
||||
- `txt` — A text file, rendered for situations where a man page viewer isn't
|
||||
- `txt` — A text file, rendered for situations where a man page viewer isn't
|
||||
available. Outputs with the `.txt` extension.
|
||||
{{/option}}
|
||||
|
||||
|
|
|
@ -73,17 +73,17 @@ next to the source file. Templates can be included with an expression like
|
|||
Specifies the output type. The following output types are supported:
|
||||
.sp
|
||||
.RS 4
|
||||
\h'-04'\(bu\h'+02'\fBman\fR \[em]\ A troff\-style man page. Outputs with a numbered extension (like
|
||||
\h'-04'\(bu\h'+02'\fBman\fR \[em] A troff\-style man page. Outputs with a numbered extension (like
|
||||
\fB\&.1\fR) matching the man page section.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
\h'-04'\(bu\h'+02'\fBmd\fR \[em]\ A markdown file, after all handlebars processing has been finished.
|
||||
\h'-04'\(bu\h'+02'\fBmd\fR \[em] A markdown file, after all handlebars processing has been finished.
|
||||
Outputs with the \fB\&.md\fR extension.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
\h'-04'\(bu\h'+02'\fBtxt\fR \[em]\ A text file, rendered for situations where a man page viewer isn't
|
||||
\h'-04'\(bu\h'+02'\fBtxt\fR \[em] A text file, rendered for situations where a man page viewer isn't
|
||||
available. Outputs with the \fB\&.txt\fR extension.
|
||||
.RE
|
||||
.RE
|
||||
|
|
|
@ -54,36 +54,36 @@ man page:
|
|||
|
||||
<dl>
|
||||
|
||||
<dt><code>-t</code> <em>type</em></dt>
|
||||
<dd>Specifies the output type. The following output types are supported:</p>
|
||||
<dt class="option-term" id="option-mdman--t"><a class="option-anchor" href="#option-mdman--t"></a><code>-t</code> <em>type</em></dt>
|
||||
<dd class="option-desc">Specifies the output type. The following output types are supported:</p>
|
||||
<ul>
|
||||
<li><code>man</code> — A troff-style man page. Outputs with a numbered extension (like
|
||||
<li><code>man</code> — A troff-style man page. Outputs with a numbered extension (like
|
||||
<code>.1</code>) matching the man page section.</li>
|
||||
<li><code>md</code> — A markdown file, after all handlebars processing has been finished.
|
||||
<li><code>md</code> — A markdown file, after all handlebars processing has been finished.
|
||||
Outputs with the <code>.md</code> extension.</li>
|
||||
<li><code>txt</code> — A text file, rendered for situations where a man page viewer isn't
|
||||
<li><code>txt</code> — A text file, rendered for situations where a man page viewer isn't
|
||||
available. Outputs with the <code>.txt</code> extension.</li>
|
||||
</ul></dd>
|
||||
|
||||
|
||||
<dt><code>-o</code> <em>outdir</em></dt>
|
||||
<dd>Specifies the directory where to save the output.</dd>
|
||||
<dt class="option-term" id="option-mdman--o"><a class="option-anchor" href="#option-mdman--o"></a><code>-o</code> <em>outdir</em></dt>
|
||||
<dd class="option-desc">Specifies the directory where to save the output.</dd>
|
||||
|
||||
|
||||
<dt><code>--url</code> <em>base_url</em></dt>
|
||||
<dd>Specifies a base URL to use for relative URLs within the document. Any
|
||||
<dt class="option-term" id="option-mdman---url"><a class="option-anchor" href="#option-mdman---url"></a><code>--url</code> <em>base_url</em></dt>
|
||||
<dd class="option-desc">Specifies a base URL to use for relative URLs within the document. Any
|
||||
relative URL will be joined with this URL.</dd>
|
||||
|
||||
|
||||
<dt><code>--man</code> <em>name</em><code>:</code><em>section</em><code>=</code><em>url</em></dt>
|
||||
<dd>Specifies a URL to use for the given man page. When the <code>{{man name section}}</code> expression is used, the given URL will be inserted as a link. This
|
||||
<dt class="option-term" id="option-mdman---man"><a class="option-anchor" href="#option-mdman---man"></a><code>--man</code> <em>name</em><code>:</code><em>section</em><code>=</code><em>url</em></dt>
|
||||
<dd class="option-desc">Specifies a URL to use for the given man page. When the <code>{{man name section}}</code> expression is used, the given URL will be inserted as a link. This
|
||||
may be specified multiple times. If a man page reference does not have a
|
||||
matching <code>--man</code> entry, then a relative link to a file named <em>name</em><code>.md</code> will
|
||||
be used.</dd>
|
||||
|
||||
|
||||
<dt><em>sources...</em></dt>
|
||||
<dd>The source input filename, may be specified multiple times.</dd>
|
||||
<dt class="option-term" id="option-mdman-sources..."><a class="option-anchor" href="#option-mdman-sources..."></a><em>sources...</em></dt>
|
||||
<dd class="option-desc">The source input filename, may be specified multiple times.</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
|
|
@ -58,13 +58,13 @@ OPTIONS
|
|||
-t type
|
||||
Specifies the output type. The following output types are supported:
|
||||
|
||||
o man — A troff-style man page. Outputs with a numbered
|
||||
extension (like .1) matching the man page section.
|
||||
o man — A troff-style man page. Outputs with a numbered extension
|
||||
(like .1) matching the man page section.
|
||||
|
||||
o md — A markdown file, after all handlebars processing has been
|
||||
o md — A markdown file, after all handlebars processing has been
|
||||
finished. Outputs with the .md extension.
|
||||
|
||||
o txt — A text file, rendered for situations where a man page
|
||||
o txt — A text file, rendered for situations where a man page
|
||||
viewer isn't available. Outputs with the .txt extension.
|
||||
|
||||
-o outdir
|
||||
|
|
|
@ -643,7 +643,7 @@ fn render_rustc_info(bcx: &BuildContext<'_, '_>) -> String {
|
|||
static HTML_TMPL: &str = r#"
|
||||
<html>
|
||||
<head>
|
||||
<title>Cargo Build Timings — {ROOTS}</title>
|
||||
<title>Cargo Build Timings — {ROOTS}</title>
|
||||
<meta charset="utf-8">
|
||||
<style type="text/css">
|
||||
html {
|
||||
|
|
|
@ -851,7 +851,7 @@ pub struct UnitFor {
|
|||
/// uses the `get_profile_run_custom_build` method to get the correct
|
||||
/// profile information for the unit. `host` needs to be true so that all
|
||||
/// of the dependencies of that `RunCustomBuild` unit have this flag be
|
||||
/// sticky (and forced to `true` for all further dependencies) — which is
|
||||
/// sticky (and forced to `true` for all further dependencies) — which is
|
||||
/// the whole point of `UnitFor`.
|
||||
host: bool,
|
||||
/// A target for a build dependency or proc-macro (or any of its
|
||||
|
|
|
@ -9,37 +9,37 @@ This is a very high-level overview of the Cargo codebase.
|
|||
[SubCommands](subcommands.md).
|
||||
|
||||
* [`src/cargo/ops`](https://github.com/rust-lang/cargo/tree/master/src/cargo/ops)
|
||||
— Every major operation is implemented here. This is where the binary CLI
|
||||
— Every major operation is implemented here. This is where the binary CLI
|
||||
usually calls into to perform the appropriate action.
|
||||
|
||||
* [`src/cargo/ops/cargo_compile.rs`](https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_compile.rs)
|
||||
— This is the entry point for all the compilation commands. This is a
|
||||
— This is the entry point for all the compilation commands. This is a
|
||||
good place to start if you want to follow how compilation starts and
|
||||
flows to completion.
|
||||
|
||||
* [`src/cargo/core/resolver`](https://github.com/rust-lang/cargo/tree/master/src/cargo/core/resolver)
|
||||
— This is the dependency and feature resolvers.
|
||||
— This is the dependency and feature resolvers.
|
||||
|
||||
* [`src/cargo/core/compiler`](https://github.com/rust-lang/cargo/tree/master/src/cargo/core/compiler)
|
||||
— This is the code responsible for running `rustc` and `rustdoc`.
|
||||
— This is the code responsible for running `rustc` and `rustdoc`.
|
||||
|
||||
* [`src/cargo/core/compiler/build_context/mod.rs`](https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/build_context/mod.rs)
|
||||
— The `BuildContext` is the result of the "front end" of the build
|
||||
— The `BuildContext` is the result of the "front end" of the build
|
||||
process. This contains the graph of work to perform and any settings
|
||||
necessary for `rustc`. After this is built, the next stage of building
|
||||
is handled in `Context`.
|
||||
|
||||
* [`src/cargo/core/compiler/context`](https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/context/mod.rs)
|
||||
— The `Context` is the mutable state used during the build process. This
|
||||
— The `Context` is the mutable state used during the build process. This
|
||||
is the core of the build process, and everything is coordinated through
|
||||
this.
|
||||
|
||||
* [`src/cargo/core/compiler/fingerprint.rs`](https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/fingerprint.rs)
|
||||
— The `fingerprint` module contains all the code that handles detecting
|
||||
— The `fingerprint` module contains all the code that handles detecting
|
||||
if a crate needs to be recompiled.
|
||||
|
||||
* [`src/cargo/core/source`](https://github.com/rust-lang/cargo/tree/master/src/cargo/core/source)
|
||||
— The `Source` trait is an abstraction over different sources of packages.
|
||||
— The `Source` trait is an abstraction over different sources of packages.
|
||||
Sources are uniquely identified by a `SourceId`. Sources are implemented in
|
||||
the
|
||||
[`src/cargo/sources`](https://github.com/rust-lang/cargo/tree/master/src/cargo/sources)
|
||||
|
@ -56,20 +56,20 @@ This is a very high-level overview of the Cargo codebase.
|
|||
though references to it are scattered around for more convenient access.
|
||||
|
||||
* [`src/cargo/util/toml`](https://github.com/rust-lang/cargo/tree/master/src/cargo/util/toml)
|
||||
— This directory contains the code for parsing `Cargo.toml` files.
|
||||
— This directory contains the code for parsing `Cargo.toml` files.
|
||||
|
||||
* [`src/cargo/ops/lockfile.rs`](https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/lockfile.rs)
|
||||
— This is where `Cargo.lock` files are loaded and saved.
|
||||
— This is where `Cargo.lock` files are loaded and saved.
|
||||
|
||||
* [`src/doc`](https://github.com/rust-lang/cargo/tree/master/src/doc)
|
||||
— This directory contains Cargo's documentation and man pages.
|
||||
— This directory contains Cargo's documentation and man pages.
|
||||
|
||||
* [`src/etc`](https://github.com/rust-lang/cargo/tree/master/src/etc)
|
||||
— These are files that get distributed in the `etc` directory in the Rust release.
|
||||
— These are files that get distributed in the `etc` directory in the Rust release.
|
||||
The man pages are auto-generated by a script in the `src/doc` directory.
|
||||
|
||||
* [`crates`](https://github.com/rust-lang/cargo/tree/master/crates)
|
||||
— A collection of independent crates used by Cargo.
|
||||
— A collection of independent crates used by Cargo.
|
||||
|
||||
## Extra crates
|
||||
|
||||
|
@ -77,16 +77,16 @@ Some functionality is split off into separate crates, usually in the
|
|||
[`crates`](https://github.com/rust-lang/cargo/tree/master/crates) directory.
|
||||
|
||||
* [`cargo-platform`](https://github.com/rust-lang/cargo/tree/master/crates/cargo-platform)
|
||||
— This library handles parsing `cfg` expressions.
|
||||
— This library handles parsing `cfg` expressions.
|
||||
* [`cargo-test-macro`](https://github.com/rust-lang/cargo/tree/master/crates/cargo-test-macro)
|
||||
— This is a proc-macro used by the test suite to define tests. More
|
||||
— This is a proc-macro used by the test suite to define tests. More
|
||||
information can be found at [`cargo_test`
|
||||
attribute](../tests/writing.md#cargo_test-attribute).
|
||||
* [`cargo-test-support`](https://github.com/rust-lang/cargo/tree/master/crates/cargo-test-support)
|
||||
— This contains a variety of code to support [writing
|
||||
— This contains a variety of code to support [writing
|
||||
tests](../tests/writing.md).
|
||||
* [`cargo-util`](https://github.com/rust-lang/cargo/tree/master/crates/cargo-util)
|
||||
— This contains general utility code that is shared between cargo and the
|
||||
— This contains general utility code that is shared between cargo and the
|
||||
testsuite.
|
||||
* [`crates-io`](https://github.com/rust-lang/cargo/tree/master/crates/crates-io)
|
||||
— This contains code for accessing the crates.io API.
|
||||
|
@ -100,5 +100,5 @@ Some functionality is split off into separate crates, usually in the
|
|||
pages](https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages)
|
||||
for more information.
|
||||
* [`resolver-tests`](https://github.com/rust-lang/cargo/tree/master/crates/resolver-tests)
|
||||
— This is a dedicated package that defines tests for the [dependency
|
||||
— This is a dedicated package that defines tests for the [dependency
|
||||
resolver](../architecture/packages.md#resolver).
|
||||
|
|
|
@ -16,27 +16,27 @@ actually compiled by `rustc`.
|
|||
There are several data structures that are important to understand how
|
||||
packages are found and loaded:
|
||||
|
||||
* [`Package`] — A package, which is a `Cargo.toml` manifest and its associated
|
||||
* [`Package`] — A package, which is a `Cargo.toml` manifest and its associated
|
||||
source files.
|
||||
* [`PackageId`] — A unique identifier for a package.
|
||||
* [`PackageId`] — A unique identifier for a package.
|
||||
* [`Source`] — An abstraction for something that can fetch packages (a remote
|
||||
registry, a git repo, the local filesystem, etc.). Check out the [source
|
||||
implementations] for all the details about registries, indexes, git
|
||||
dependencies, etc.
|
||||
* [`SourceId`] — A unique identifier for a source.
|
||||
* [`SourceMap`] — Map of all available sources.
|
||||
* [`PackageRegistry`] — This is the main interface for how the dependency
|
||||
* [`SourceId`] — A unique identifier for a source.
|
||||
* [`SourceMap`] — Map of all available sources.
|
||||
* [`PackageRegistry`] — This is the main interface for how the dependency
|
||||
resolver finds packages. It contains the `SourceMap`, and handles things
|
||||
like the `[patch]` table. The `Registry` trait provides a generic interface
|
||||
to the `PackageRegistry`, but this is only used for providing an alternate
|
||||
implementation of the `PackageRegistry` for testing. The dependency resolver
|
||||
sends a query to the `PackageRegistry` to "get me all packages that match
|
||||
this dependency declaration".
|
||||
* [`Summary`] — A summary is a subset of a [`Manifest`], and is essentially
|
||||
* [`Summary`] — A summary is a subset of a [`Manifest`], and is essentially
|
||||
the information that can be found in a registry index. Queries against the
|
||||
`PackageRegistry` yields a `Summary`. The resolver uses the summary
|
||||
information to build the dependency graph.
|
||||
* [`PackageSet`] — Contains all of the `Package` objects. This works with the
|
||||
* [`PackageSet`] — Contains all of the `Package` objects. This works with the
|
||||
[`Downloads`] struct to coordinate downloading packages. It has a reference
|
||||
to the `SourceMap` to get the `Source` objects which tell the `Downloads`
|
||||
struct which URLs to fetch.
|
||||
|
|
|
@ -26,11 +26,11 @@ If you file in the wrong tracker, someone will either transfer it to the
|
|||
correct one or ask you to move it. Some other repositories that may be
|
||||
relevant are:
|
||||
|
||||
* [`rust-lang/rust`] — Home for the [`rustc`] compiler and [`rustdoc`].
|
||||
* [`rust-lang/rustup`] — Home for the [`rustup`] toolchain installer.
|
||||
* [`rust-lang/rustfmt`] — Home for the `rustfmt` tool, which also includes `cargo fmt`.
|
||||
* [`rust-lang/rust-clippy`] — Home for the `clippy` tool, which also includes `cargo clippy`.
|
||||
* [`rust-lang/crates.io`] — Home for the [crates.io] website.
|
||||
* [`rust-lang/rust`] — Home for the [`rustc`] compiler and [`rustdoc`].
|
||||
* [`rust-lang/rustup`] — Home for the [`rustup`] toolchain installer.
|
||||
* [`rust-lang/rustfmt`] — Home for the `rustfmt` tool, which also includes `cargo fmt`.
|
||||
* [`rust-lang/rust-clippy`] — Home for the `clippy` tool, which also includes `cargo clippy`.
|
||||
* [`rust-lang/crates.io`] — Home for the [crates.io] website.
|
||||
|
||||
Issues with [`cargo fix`] can be tricky to know where they should be filed,
|
||||
since the fixes are driven by `rustc`, processed by [`rustfix`], and the
|
||||
|
|
|
@ -37,7 +37,7 @@ The commands will let you interact with Cargo using its command-line interface.
|
|||
**Other Documentation:**
|
||||
* [Changelog](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md) —
|
||||
Detailed notes about changes in Cargo in each release.
|
||||
* [Rust documentation website](https://doc.rust-lang.org/) — Links to official
|
||||
* [Rust documentation website](https://doc.rust-lang.org/) — Links to official
|
||||
Rust documentation and tools.
|
||||
|
||||
[def-crate]: ./appendix/glossary.md#crate '"crate" (glossary entry)'
|
||||
|
|
|
@ -90,9 +90,9 @@ configuration). The stderr output is also saved in that same directory.
|
|||
The following is a summary of the instructions that Cargo recognizes, with each
|
||||
one detailed below.
|
||||
|
||||
* [`cargo:rerun-if-changed=PATH`](#rerun-if-changed) — Tells Cargo when to
|
||||
* [`cargo:rerun-if-changed=PATH`](#rerun-if-changed) — Tells Cargo when to
|
||||
re-run the script.
|
||||
* [`cargo:rerun-if-env-changed=VAR`](#rerun-if-env-changed) — Tells Cargo when
|
||||
* [`cargo:rerun-if-env-changed=VAR`](#rerun-if-env-changed) — Tells Cargo when
|
||||
to re-run the script.
|
||||
* [`cargo:rustc-link-arg=FLAG`](#rustc-link-arg) – Passes custom flags to a
|
||||
linker for benchmarks, binaries, `cdylib` crates, examples, and tests.
|
||||
|
@ -100,20 +100,20 @@ one detailed below.
|
|||
flags to a linker for the binary `BIN`.
|
||||
* [`cargo:rustc-link-arg-bins=FLAG`](#rustc-link-arg-bins) – Passes custom
|
||||
flags to a linker for binaries.
|
||||
* [`cargo:rustc-link-lib=[KIND=]NAME`](#rustc-link-lib) — Adds a library to
|
||||
* [`cargo:rustc-link-lib=[KIND=]NAME`](#rustc-link-lib) — Adds a library to
|
||||
link.
|
||||
* [`cargo:rustc-link-search=[KIND=]PATH`](#rustc-link-search) — Adds to the
|
||||
* [`cargo:rustc-link-search=[KIND=]PATH`](#rustc-link-search) — Adds to the
|
||||
library search path.
|
||||
* [`cargo:rustc-flags=FLAGS`](#rustc-flags) — Passes certain flags to the
|
||||
* [`cargo:rustc-flags=FLAGS`](#rustc-flags) — Passes certain flags to the
|
||||
compiler.
|
||||
* [`cargo:rustc-cfg=KEY[="VALUE"]`](#rustc-cfg) — Enables compile-time `cfg`
|
||||
* [`cargo:rustc-cfg=KEY[="VALUE"]`](#rustc-cfg) — Enables compile-time `cfg`
|
||||
settings.
|
||||
* [`cargo:rustc-env=VAR=VALUE`](#rustc-env) — Sets an environment variable.
|
||||
* [`cargo:rustc-cdylib-link-arg=FLAG`](#rustc-cdylib-link-arg) — Passes custom
|
||||
* [`cargo:rustc-env=VAR=VALUE`](#rustc-env) — Sets an environment variable.
|
||||
* [`cargo:rustc-cdylib-link-arg=FLAG`](#rustc-cdylib-link-arg) — Passes custom
|
||||
flags to a linker for cdylib crates.
|
||||
* [`cargo:warning=MESSAGE`](#cargo-warning) — Displays a warning on the
|
||||
* [`cargo:warning=MESSAGE`](#cargo-warning) — Displays a warning on the
|
||||
terminal.
|
||||
* [`cargo:KEY=VALUE`](#the-links-manifest-key) — Metadata, used by `links`
|
||||
* [`cargo:KEY=VALUE`](#the-links-manifest-key) — Metadata, used by `links`
|
||||
scripts.
|
||||
|
||||
|
||||
|
|
|
@ -52,12 +52,12 @@ system:
|
|||
will otherwise be used. See also [`build.incremental`] config value.
|
||||
* `CARGO_CACHE_RUSTC_INFO` — If this is set to 0 then Cargo will not try to cache
|
||||
compiler version information.
|
||||
* `HTTPS_PROXY` or `https_proxy` or `http_proxy` — The HTTP proxy to use, see
|
||||
* `HTTPS_PROXY` or `https_proxy` or `http_proxy` — The HTTP proxy to use, see
|
||||
[`http.proxy`] for more detail.
|
||||
* `HTTP_TIMEOUT` — The HTTP timeout in seconds, see [`http.timeout`] for more
|
||||
* `HTTP_TIMEOUT` — The HTTP timeout in seconds, see [`http.timeout`] for more
|
||||
detail.
|
||||
* `TERM` — If this is set to `dumb`, it disables the progress bar.
|
||||
* `BROWSER` — The web browser to execute to open documentation with [`cargo
|
||||
* `TERM` — If this is set to `dumb`, it disables the progress bar.
|
||||
* `BROWSER` — The web browser to execute to open documentation with [`cargo
|
||||
doc`]'s' `--open` flag, see [`doc.browser`] for more details.
|
||||
* `RUSTFMT` — Instead of running `rustfmt`,
|
||||
[`cargo fmt`](https://github.com/rust-lang/rustfmt) will execute this specified
|
||||
|
@ -69,7 +69,7 @@ Cargo reads environment variables for configuration values. See the
|
|||
[configuration chapter][config-env] for more details. In summary, the
|
||||
supported environment variables are:
|
||||
|
||||
* `CARGO_ALIAS_<name>` — Command aliases, see [`alias`].
|
||||
* `CARGO_ALIAS_<name>` — Command aliases, see [`alias`].
|
||||
* `CARGO_BUILD_JOBS` — Number of parallel jobs, see [`build.jobs`].
|
||||
* `CARGO_BUILD_RUSTC` — The `rustc` executable, see [`build.rustc`].
|
||||
* `CARGO_BUILD_RUSTC_WRAPPER` — The `rustc` wrapper, see [`build.rustc-wrapper`].
|
||||
|
@ -96,17 +96,17 @@ supported environment variables are:
|
|||
* `CARGO_NET_RETRY` — Number of times to retry network errors, see [`net.retry`].
|
||||
* `CARGO_NET_GIT_FETCH_WITH_CLI` — Enables the use of the `git` executable to fetch, see [`net.git-fetch-with-cli`].
|
||||
* `CARGO_NET_OFFLINE` — Offline mode, see [`net.offline`].
|
||||
* `CARGO_PROFILE_<name>_BUILD_OVERRIDE_<key>` — Override build script profile, see [`profile.<name>.build-override`].
|
||||
* `CARGO_PROFILE_<name>_CODEGEN_UNITS` — Set code generation units, see [`profile.<name>.codegen-units`].
|
||||
* `CARGO_PROFILE_<name>_DEBUG` — What kind of debug info to include, see [`profile.<name>.debug`].
|
||||
* `CARGO_PROFILE_<name>_BUILD_OVERRIDE_<key>` — Override build script profile, see [`profile.<name>.build-override`].
|
||||
* `CARGO_PROFILE_<name>_CODEGEN_UNITS` — Set code generation units, see [`profile.<name>.codegen-units`].
|
||||
* `CARGO_PROFILE_<name>_DEBUG` — What kind of debug info to include, see [`profile.<name>.debug`].
|
||||
* `CARGO_PROFILE_<name>_DEBUG_ASSERTIONS` — Enable/disable debug assertions, see [`profile.<name>.debug-assertions`].
|
||||
* `CARGO_PROFILE_<name>_INCREMENTAL` — Enable/disable incremental compilation, see [`profile.<name>.incremental`].
|
||||
* `CARGO_PROFILE_<name>_LTO` — Link-time optimization, see [`profile.<name>.lto`].
|
||||
* `CARGO_PROFILE_<name>_OVERFLOW_CHECKS` — Enable/disable overflow checks, see [`profile.<name>.overflow-checks`].
|
||||
* `CARGO_PROFILE_<name>_OPT_LEVEL` — Set the optimization level, see [`profile.<name>.opt-level`].
|
||||
* `CARGO_PROFILE_<name>_PANIC` — The panic strategy to use, see [`profile.<name>.panic`].
|
||||
* `CARGO_PROFILE_<name>_RPATH` — The rpath linking option, see [`profile.<name>.rpath`].
|
||||
* `CARGO_PROFILE_<name>_SPLIT_DEBUGINFO` — Controls debug file output behavior, see [`profile.<name>.split-debuginfo`].
|
||||
* `CARGO_PROFILE_<name>_INCREMENTAL` — Enable/disable incremental compilation, see [`profile.<name>.incremental`].
|
||||
* `CARGO_PROFILE_<name>_LTO` — Link-time optimization, see [`profile.<name>.lto`].
|
||||
* `CARGO_PROFILE_<name>_OVERFLOW_CHECKS` — Enable/disable overflow checks, see [`profile.<name>.overflow-checks`].
|
||||
* `CARGO_PROFILE_<name>_OPT_LEVEL` — Set the optimization level, see [`profile.<name>.opt-level`].
|
||||
* `CARGO_PROFILE_<name>_PANIC` — The panic strategy to use, see [`profile.<name>.panic`].
|
||||
* `CARGO_PROFILE_<name>_RPATH` — The rpath linking option, see [`profile.<name>.rpath`].
|
||||
* `CARGO_PROFILE_<name>_SPLIT_DEBUGINFO` — Controls debug file output behavior, see [`profile.<name>.split-debuginfo`].
|
||||
* `CARGO_REGISTRIES_<name>_INDEX` — URL of a registry index, see [`registries.<name>.index`].
|
||||
* `CARGO_REGISTRIES_<name>_TOKEN` — Authentication token of a registry, see [`registries.<name>.token`].
|
||||
* `CARGO_REGISTRY_DEFAULT` — Default registry for the `--registry` flag, see [`registry.default`].
|
||||
|
@ -215,7 +215,7 @@ corresponding environment variable is set to the empty string, `""`.
|
|||
* `OUT_DIR` — If the package has a build script, this is set to the folder where the build
|
||||
script should place its output. See below for more information.
|
||||
(Only set during compilation.)
|
||||
* `CARGO_BIN_EXE_<name>` — The absolute path to a binary target's executable.
|
||||
* `CARGO_BIN_EXE_<name>` — The absolute path to a binary target's executable.
|
||||
This is only set when building an [integration test] or benchmark. This may
|
||||
be used with the [`env` macro] to find the executable to run for testing
|
||||
purposes. The `<name>` is the name of the binary target, exactly as-is. For
|
||||
|
@ -307,16 +307,16 @@ let out_dir = env::var("OUT_DIR").unwrap();
|
|||
values built-in to the compiler (which can be seen with `rustc --print=cfg`)
|
||||
and values set by build scripts and extra flags passed to `rustc` (such as
|
||||
those defined in `RUSTFLAGS`). Some examples of what these variables are:
|
||||
* `CARGO_CFG_UNIX` — Set on [unix-like platforms].
|
||||
* `CARGO_CFG_WINDOWS` — Set on [windows-like platforms].
|
||||
* `CARGO_CFG_TARGET_FAMILY=unix` — The [target family], either `unix` or `windows`.
|
||||
* `CARGO_CFG_TARGET_OS=macos` — The [target operating system].
|
||||
* `CARGO_CFG_TARGET_ARCH=x86_64` — The CPU [target architecture].
|
||||
* `CARGO_CFG_TARGET_VENDOR=apple` — The [target vendor].
|
||||
* `CARGO_CFG_TARGET_ENV=gnu` — The [target environment] ABI.
|
||||
* `CARGO_CFG_TARGET_POINTER_WIDTH=64` — The CPU [pointer width].
|
||||
* `CARGO_CFG_TARGET_ENDIAN=little` — The CPU [target endianness].
|
||||
* `CARGO_CFG_TARGET_FEATURE=mmx,sse` — List of CPU [target features] enabled.
|
||||
* `CARGO_CFG_UNIX` — Set on [unix-like platforms].
|
||||
* `CARGO_CFG_WINDOWS` — Set on [windows-like platforms].
|
||||
* `CARGO_CFG_TARGET_FAMILY=unix` — The [target family], either `unix` or `windows`.
|
||||
* `CARGO_CFG_TARGET_OS=macos` — The [target operating system].
|
||||
* `CARGO_CFG_TARGET_ARCH=x86_64` — The CPU [target architecture].
|
||||
* `CARGO_CFG_TARGET_VENDOR=apple` — The [target vendor].
|
||||
* `CARGO_CFG_TARGET_ENV=gnu` — The [target environment] ABI.
|
||||
* `CARGO_CFG_TARGET_POINTER_WIDTH=64` — The CPU [pointer width].
|
||||
* `CARGO_CFG_TARGET_ENDIAN=little` — The CPU [target endianness].
|
||||
* `CARGO_CFG_TARGET_FEATURE=mmx,sse` — List of CPU [target features] enabled.
|
||||
* `OUT_DIR` — the folder in which all output should be placed. This folder is
|
||||
inside the build directory for the package being built, and it is
|
||||
unique for the package in question.
|
||||
|
|
|
@ -3,51 +3,51 @@
|
|||
The `Cargo.toml` file for each package is called its *manifest*. It is written
|
||||
in the [TOML] format. Every manifest file consists of the following sections:
|
||||
|
||||
* [`cargo-features`](unstable.md) — Unstable, nightly-only features.
|
||||
* [`[package]`](#the-package-section) — Defines a package.
|
||||
* [`name`](#the-name-field) — The name of the package.
|
||||
* [`version`](#the-version-field) — The version of the package.
|
||||
* [`authors`](#the-authors-field) — The authors of the package.
|
||||
* [`edition`](#the-edition-field) — The Rust edition.
|
||||
* [`description`](#the-description-field) — A description of the package.
|
||||
* [`documentation`](#the-documentation-field) — URL of the package documentation.
|
||||
* [`readme`](#the-readme-field) — Path to the package's README file.
|
||||
* [`homepage`](#the-homepage-field) — URL of the package homepage.
|
||||
* [`repository`](#the-repository-field) — URL of the package source repository.
|
||||
* [`license`](#the-license-and-license-file-fields) — The package license.
|
||||
* [`license-file`](#the-license-and-license-file-fields) — Path to the text of the license.
|
||||
* [`cargo-features`](unstable.md) — Unstable, nightly-only features.
|
||||
* [`[package]`](#the-package-section) — Defines a package.
|
||||
* [`name`](#the-name-field) — The name of the package.
|
||||
* [`version`](#the-version-field) — The version of the package.
|
||||
* [`authors`](#the-authors-field) — The authors of the package.
|
||||
* [`edition`](#the-edition-field) — The Rust edition.
|
||||
* [`description`](#the-description-field) — A description of the package.
|
||||
* [`documentation`](#the-documentation-field) — URL of the package documentation.
|
||||
* [`readme`](#the-readme-field) — Path to the package's README file.
|
||||
* [`homepage`](#the-homepage-field) — URL of the package homepage.
|
||||
* [`repository`](#the-repository-field) — URL of the package source repository.
|
||||
* [`license`](#the-license-and-license-file-fields) — The package license.
|
||||
* [`license-file`](#the-license-and-license-file-fields) — Path to the text of the license.
|
||||
* [`keywords`](#the-keywords-field) — Keywords for the package.
|
||||
* [`categories`](#the-categories-field) — Categories of the package.
|
||||
* [`workspace`](#the-workspace-field) — Path to the workspace for the package.
|
||||
* [`build`](#the-build-field) — Path to the package build script.
|
||||
* [`links`](#the-links-field) — Name of the native library the package links with.
|
||||
* [`exclude`](#the-exclude-and-include-fields) — Files to exclude when publishing.
|
||||
* [`include`](#the-exclude-and-include-fields) — Files to include when publishing.
|
||||
* [`publish`](#the-publish-field) — Can be used to prevent publishing the package.
|
||||
* [`metadata`](#the-metadata-table) — Extra settings for external tools.
|
||||
* [`default-run`](#the-default-run-field) — The default binary to run by [`cargo run`].
|
||||
* [`autobins`](cargo-targets.md#target-auto-discovery) — Disables binary auto discovery.
|
||||
* [`autoexamples`](cargo-targets.md#target-auto-discovery) — Disables example auto discovery.
|
||||
* [`autotests`](cargo-targets.md#target-auto-discovery) — Disables test auto discovery.
|
||||
* [`autobenches`](cargo-targets.md#target-auto-discovery) — Disables bench auto discovery.
|
||||
* [`resolver`](resolver.md#resolver-versions) — Sets the dependency resolver to use.
|
||||
* [`exclude`](#the-exclude-and-include-fields) — Files to exclude when publishing.
|
||||
* [`include`](#the-exclude-and-include-fields) — Files to include when publishing.
|
||||
* [`publish`](#the-publish-field) — Can be used to prevent publishing the package.
|
||||
* [`metadata`](#the-metadata-table) — Extra settings for external tools.
|
||||
* [`default-run`](#the-default-run-field) — The default binary to run by [`cargo run`].
|
||||
* [`autobins`](cargo-targets.md#target-auto-discovery) — Disables binary auto discovery.
|
||||
* [`autoexamples`](cargo-targets.md#target-auto-discovery) — Disables example auto discovery.
|
||||
* [`autotests`](cargo-targets.md#target-auto-discovery) — Disables test auto discovery.
|
||||
* [`autobenches`](cargo-targets.md#target-auto-discovery) — Disables bench auto discovery.
|
||||
* [`resolver`](resolver.md#resolver-versions) — Sets the dependency resolver to use.
|
||||
* Target tables: (see [configuration](cargo-targets.md#configuring-a-target) for settings)
|
||||
* [`[lib]`](cargo-targets.md#library) — Library target settings.
|
||||
* [`[[bin]]`](cargo-targets.md#binaries) — Binary target settings.
|
||||
* [`[[example]]`](cargo-targets.md#examples) — Example target settings.
|
||||
* [`[[test]]`](cargo-targets.md#tests) — Test target settings.
|
||||
* [`[[bench]]`](cargo-targets.md#benchmarks) — Benchmark target settings.
|
||||
* [`[lib]`](cargo-targets.md#library) — Library target settings.
|
||||
* [`[[bin]]`](cargo-targets.md#binaries) — Binary target settings.
|
||||
* [`[[example]]`](cargo-targets.md#examples) — Example target settings.
|
||||
* [`[[test]]`](cargo-targets.md#tests) — Test target settings.
|
||||
* [`[[bench]]`](cargo-targets.md#benchmarks) — Benchmark target settings.
|
||||
* Dependency tables:
|
||||
* [`[dependencies]`](specifying-dependencies.md) — Package library dependencies.
|
||||
* [`[dev-dependencies]`](specifying-dependencies.md#development-dependencies) — Dependencies for examples, tests, and benchmarks.
|
||||
* [`[build-dependencies]`](specifying-dependencies.md#build-dependencies) — Dependencies for build scripts.
|
||||
* [`[target]`](specifying-dependencies.md#platform-specific-dependencies) — Platform-specific dependencies.
|
||||
* [`[badges]`](#the-badges-section) — Badges to display on a registry.
|
||||
* [`[features]`](features.md) — Conditional compilation features.
|
||||
* [`[patch]`](overriding-dependencies.md#the-patch-section) — Override dependencies.
|
||||
* [`[replace]`](overriding-dependencies.md#the-replace-section) — Override dependencies (deprecated).
|
||||
* [`[profile]`](profiles.md) — Compiler settings and optimizations.
|
||||
* [`[workspace]`](workspaces.md) — The workspace definition.
|
||||
* [`[dependencies]`](specifying-dependencies.md) — Package library dependencies.
|
||||
* [`[dev-dependencies]`](specifying-dependencies.md#development-dependencies) — Dependencies for examples, tests, and benchmarks.
|
||||
* [`[build-dependencies]`](specifying-dependencies.md#build-dependencies) — Dependencies for build scripts.
|
||||
* [`[target]`](specifying-dependencies.md#platform-specific-dependencies) — Platform-specific dependencies.
|
||||
* [`[badges]`](#the-badges-section) — Badges to display on a registry.
|
||||
* [`[features]`](features.md) — Conditional compilation features.
|
||||
* [`[patch]`](overriding-dependencies.md#the-patch-section) — Override dependencies.
|
||||
* [`[replace]`](overriding-dependencies.md#the-replace-section) — Override dependencies (deprecated).
|
||||
* [`[profile]`](profiles.md) — Compiler settings and optimizations.
|
||||
* [`[workspace]`](workspaces.md) — The workspace definition.
|
||||
|
||||
<a id="package-metadata"></a>
|
||||
### The `[package]` section
|
||||
|
@ -108,7 +108,7 @@ breaking change.
|
|||
#### The `authors` field
|
||||
|
||||
The optional `authors` field lists people or organizations that are considered
|
||||
the "authors" of the package. The exact meaning is open to interpretation — it
|
||||
the "authors" of the package. The exact meaning is open to interpretation — it
|
||||
may list the original or primary authors, current maintainers, or owners of the
|
||||
package. An optional email address may be included within angled brackets at
|
||||
the end of each author entry.
|
||||
|
|
|
@ -406,11 +406,11 @@ opt-level = 3
|
|||
The precedence for which value is used is done in the following order (first
|
||||
match wins):
|
||||
|
||||
1. `[profile.dev.package.name]` — A named package.
|
||||
2. `[profile.dev.package."*"]` — For any non-workspace member.
|
||||
3. `[profile.dev.build-override]` — Only for build scripts, proc macros, and
|
||||
1. `[profile.dev.package.name]` — A named package.
|
||||
2. `[profile.dev.package."*"]` — For any non-workspace member.
|
||||
3. `[profile.dev.build-override]` — Only for build scripts, proc macros, and
|
||||
their dependencies.
|
||||
4. `[profile.dev]` — Settings in `Cargo.toml`.
|
||||
4. `[profile.dev]` — Settings in `Cargo.toml`.
|
||||
5. Default values built-in to Cargo.
|
||||
|
||||
Overrides cannot specify the `panic`, `lto`, or `rpath` settings.
|
||||
|
|
|
@ -61,50 +61,50 @@ Each new feature described below should explain how to use it.
|
|||
### List of unstable features
|
||||
|
||||
* Unstable-specific features
|
||||
* [-Z allow-features](#allow-features) — Provides a way to restrict which unstable features are used.
|
||||
* [-Z allow-features](#allow-features) — Provides a way to restrict which unstable features are used.
|
||||
* Build scripts and linking
|
||||
* [Metabuild](#metabuild) — Provides declarative build scripts.
|
||||
* [Metabuild](#metabuild) — Provides declarative build scripts.
|
||||
* Resolver and features
|
||||
* [no-index-update](#no-index-update) — Prevents cargo from updating the index cache.
|
||||
* [avoid-dev-deps](#avoid-dev-deps) — Prevents the resolver from including dev-dependencies during resolution.
|
||||
* [minimal-versions](#minimal-versions) — Forces the resolver to use the lowest compatible version instead of the highest.
|
||||
* [public-dependency](#public-dependency) — Allows dependencies to be classified as either public or private.
|
||||
* [Namespaced features](#namespaced-features) — Separates optional dependencies into a separate namespace from regular features, and allows feature names to be the same as some dependency name.
|
||||
* [Weak dependency features](#weak-dependency-features) — Allows setting features for dependencies without enabling optional dependencies.
|
||||
* [no-index-update](#no-index-update) — Prevents cargo from updating the index cache.
|
||||
* [avoid-dev-deps](#avoid-dev-deps) — Prevents the resolver from including dev-dependencies during resolution.
|
||||
* [minimal-versions](#minimal-versions) — Forces the resolver to use the lowest compatible version instead of the highest.
|
||||
* [public-dependency](#public-dependency) — Allows dependencies to be classified as either public or private.
|
||||
* [Namespaced features](#namespaced-features) — Separates optional dependencies into a separate namespace from regular features, and allows feature names to be the same as some dependency name.
|
||||
* [Weak dependency features](#weak-dependency-features) — Allows setting features for dependencies without enabling optional dependencies.
|
||||
* Output behavior
|
||||
* [out-dir](#out-dir) — Adds a directory where artifacts are copied to.
|
||||
* [terminal-width](#terminal-width) — Tells rustc the width of the terminal so that long diagnostic messages can be truncated to be more readable.
|
||||
* [out-dir](#out-dir) — Adds a directory where artifacts are copied to.
|
||||
* [terminal-width](#terminal-width) — Tells rustc the width of the terminal so that long diagnostic messages can be truncated to be more readable.
|
||||
* Compile behavior
|
||||
* [mtime-on-use](#mtime-on-use) — Updates the last-modified timestamp on every dependency every time it is used, to provide a mechanism to delete unused artifacts.
|
||||
* [doctest-xcompile](#doctest-xcompile) — Supports running doctests with the `--target` flag.
|
||||
* [multitarget](#multitarget) — Supports building for multiple targets at the same time.
|
||||
* [build-std](#build-std) — Builds the standard library instead of using pre-built binaries.
|
||||
* [build-std-features](#build-std-features) — Sets features to use with the standard library.
|
||||
* [binary-dep-depinfo](#binary-dep-depinfo) — Causes the dep-info file to track binary dependencies.
|
||||
* [panic-abort-tests](#panic-abort-tests) — Allows running tests with the "abort" panic strategy.
|
||||
* [mtime-on-use](#mtime-on-use) — Updates the last-modified timestamp on every dependency every time it is used, to provide a mechanism to delete unused artifacts.
|
||||
* [doctest-xcompile](#doctest-xcompile) — Supports running doctests with the `--target` flag.
|
||||
* [multitarget](#multitarget) — Supports building for multiple targets at the same time.
|
||||
* [build-std](#build-std) — Builds the standard library instead of using pre-built binaries.
|
||||
* [build-std-features](#build-std-features) — Sets features to use with the standard library.
|
||||
* [binary-dep-depinfo](#binary-dep-depinfo) — Causes the dep-info file to track binary dependencies.
|
||||
* [panic-abort-tests](#panic-abort-tests) — Allows running tests with the "abort" panic strategy.
|
||||
* rustdoc
|
||||
* [`doctest-in-workspace`](#doctest-in-workspace) — Fixes workspace-relative paths when running doctests.
|
||||
* [rustdoc-map](#rustdoc-map) — Provides mappings for documentation to link to external sites like [docs.rs](https://docs.rs/).
|
||||
* [`doctest-in-workspace`](#doctest-in-workspace) — Fixes workspace-relative paths when running doctests.
|
||||
* [rustdoc-map](#rustdoc-map) — Provides mappings for documentation to link to external sites like [docs.rs](https://docs.rs/).
|
||||
* `Cargo.toml` extensions
|
||||
* [Custom named profiles](#custom-named-profiles) — Adds custom named profiles in addition to the standard names.
|
||||
* [Profile `strip` option](#profile-strip-option) — Forces the removal of debug information and symbols from executables.
|
||||
* [per-package-target](#per-package-target) — Sets the `--target` to use for each individual package.
|
||||
* [rust-version](#rust-version) — Allows to declare the minimum supported Rust version.
|
||||
* [Edition 2021](#edition-2021) — Adds support for the 2021 Edition.
|
||||
* [Custom named profiles](#custom-named-profiles) — Adds custom named profiles in addition to the standard names.
|
||||
* [Profile `strip` option](#profile-strip-option) — Forces the removal of debug information and symbols from executables.
|
||||
* [per-package-target](#per-package-target) — Sets the `--target` to use for each individual package.
|
||||
* [rust-version](#rust-version) — Allows to declare the minimum supported Rust version.
|
||||
* [Edition 2021](#edition-2021) — Adds support for the 2021 Edition.
|
||||
* Information and metadata
|
||||
* [Build-plan](#build-plan) — Emits JSON information on which commands will be run.
|
||||
* [timings](#timings) — Generates a report on how long individual dependencies took to run.
|
||||
* [unit-graph](#unit-graph) — Emits JSON for Cargo's internal graph structure.
|
||||
* [future incompat report](#future-incompat-report) — Displays a report for future incompatibilities that may error in the future.
|
||||
* [Build-plan](#build-plan) — Emits JSON information on which commands will be run.
|
||||
* [timings](#timings) — Generates a report on how long individual dependencies took to run.
|
||||
* [unit-graph](#unit-graph) — Emits JSON for Cargo's internal graph structure.
|
||||
* [future incompat report](#future-incompat-report) — Displays a report for future incompatibilities that may error in the future.
|
||||
* [`cargo rustc --print`](#rustc---print) — Calls rustc with `--print` to display information from rustc.
|
||||
* Configuration
|
||||
* [config-cli](#config-cli) — Adds the ability to pass configuration options on the command-line.
|
||||
* [config-include](#config-include) — Adds the ability for config files to include other files.
|
||||
* [patch-in-config](#patch-in-config) — Adds support for specifying the `[patch]` table in config files.
|
||||
* [`cargo config`](#cargo-config) — Adds a new subcommand for viewing config files.
|
||||
* [config-cli](#config-cli) — Adds the ability to pass configuration options on the command-line.
|
||||
* [config-include](#config-include) — Adds the ability for config files to include other files.
|
||||
* [patch-in-config](#patch-in-config) — Adds support for specifying the `[patch]` table in config files.
|
||||
* [`cargo config`](#cargo-config) — Adds a new subcommand for viewing config files.
|
||||
* Registries
|
||||
* [credential-process](#credential-process) — Adds support for fetching registry tokens from an external authentication program.
|
||||
* [`cargo logout`](#cargo-logout) — Adds the `logout` command to remove the currently saved registry token.
|
||||
* [credential-process](#credential-process) — Adds support for fetching registry tokens from an external authentication program.
|
||||
* [`cargo logout`](#cargo-logout) — Adds the `logout` command to remove the currently saved registry token.
|
||||
|
||||
### allow-features
|
||||
|
||||
|
@ -525,10 +525,10 @@ cargo +nightly build -Z timings
|
|||
The `-Ztimings` flag can optionally take a comma-separated list of the
|
||||
following values:
|
||||
|
||||
- `html` — Saves a file called `cargo-timing.html` to the current directory
|
||||
- `html` — Saves a file called `cargo-timing.html` to the current directory
|
||||
with a report of the compilation. Files are also saved with a timestamp in
|
||||
the filename if you want to look at older runs.
|
||||
- `info` — Displays a message to stdout after each compilation finishes with
|
||||
- `info` — Displays a message to stdout after each compilation finishes with
|
||||
how long it took.
|
||||
- `json` — Emits some JSON information about timing information.
|
||||
|
||||
|
@ -553,11 +553,11 @@ The "custom build" units are `build.rs` scripts, which when run are
|
|||
highlighted in orange.
|
||||
|
||||
The second graph shows Cargo's concurrency over time. The three lines are:
|
||||
- "Waiting" (red) — This is the number of units waiting for a CPU slot to
|
||||
- "Waiting" (red) — This is the number of units waiting for a CPU slot to
|
||||
open.
|
||||
- "Inactive" (blue) — This is the number of units that are waiting for their
|
||||
- "Inactive" (blue) — This is the number of units that are waiting for their
|
||||
dependencies to finish.
|
||||
- "Active" (green) — This is the number of units currently running.
|
||||
- "Active" (green) — This is the number of units currently running.
|
||||
|
||||
Note: This does not show the concurrency in the compiler itself. `rustc`
|
||||
coordinates with Cargo via the "job server" to stay within the concurrency
|
||||
|
@ -804,12 +804,12 @@ The following is a description of the JSON structure:
|
|||
"platform": null,
|
||||
/* The "mode" for this unit. Valid values:
|
||||
|
||||
* "test" — Build using `rustc` as a test.
|
||||
* "build" — Build using `rustc`.
|
||||
* "test" — Build using `rustc` as a test.
|
||||
* "build" — Build using `rustc`.
|
||||
* "check" — Build using `rustc` in "check" mode.
|
||||
* "doc" — Build using `rustdoc`.
|
||||
* "doctest" — Test using `rustdoc`.
|
||||
* "run-custom-build" — Represents the execution of a build script.
|
||||
* "doc" — Build using `rustdoc`.
|
||||
* "doctest" — Test using `rustdoc`.
|
||||
* "run-custom-build" — Represents the execution of a build script.
|
||||
*/
|
||||
"mode": "build",
|
||||
/* Array of features enabled on this unit as strings. */
|
||||
|
@ -1033,9 +1033,9 @@ array of strings.
|
|||
Command-line arguments allow special placeholders which will be replaced with
|
||||
the corresponding value:
|
||||
|
||||
* `{name}` — The name of the registry.
|
||||
* `{api_url}` — The base URL of the registry API endpoints.
|
||||
* `{action}` — The authentication action (described below).
|
||||
* `{name}` — The name of the registry.
|
||||
* `{api_url}` — The base URL of the registry API endpoints.
|
||||
* `{action}` — The authentication action (described below).
|
||||
|
||||
Process names with the prefix `cargo:` are loaded from the `libexec` directory
|
||||
next to cargo. Several experimental credential wrappers are included with
|
||||
|
|
|
@ -1947,7 +1947,7 @@ fn minimal_download() {
|
|||
// ✓ | ✓ | | `cargo tree --target=all -e normal -Z features=all`†
|
||||
// ✓ | ✓ | ✓ | A normal build.
|
||||
//
|
||||
// † — However, `cargo tree` downloads everything.
|
||||
// † — However, `cargo tree` downloads everything.
|
||||
Package::new("normal", "1.0.0").publish();
|
||||
Package::new("normal_pm", "1.0.0").publish();
|
||||
Package::new("normal_opt", "1.0.0").publish();
|
||||
|
|
Loading…
Reference in a new issue