mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
feat(unstable): Added -Zbuild-dir-new-layout
unstable feature (#15848)
### What does this PR try to resolve? Added `-Zbuild-dir-new-layout` unstable feature as part of #15010 I will open a follow up PR with an initial implementation as mentioned [here](https://github.com/rust-lang/cargo/issues/15010#issuecomment-3193725891) r? @weihanglo
This commit is contained in:
commit
33cb1c2654
@ -845,6 +845,7 @@ unstable_cli_options!(
|
||||
binary_dep_depinfo: bool = ("Track changes to dependency artifacts"),
|
||||
bindeps: bool = ("Allow Cargo packages to depend on bin, cdylib, and staticlib crates, and use the artifacts built by those crates"),
|
||||
build_analysis: bool = ("Record and persist build metrics across runs, with commands to query past builds."),
|
||||
build_dir_new_layout: bool = ("Use the new build-dir filesystem layout"),
|
||||
#[serde(deserialize_with = "deserialize_comma_separated_list")]
|
||||
build_std: Option<Vec<String>> = ("Enable Cargo to compile the standard library itself as part of a crate graph compilation"),
|
||||
#[serde(deserialize_with = "deserialize_comma_separated_list")]
|
||||
@ -1365,6 +1366,7 @@ impl CliUnstable {
|
||||
"binary-dep-depinfo" => self.binary_dep_depinfo = parse_empty(k, v)?,
|
||||
"bindeps" => self.bindeps = parse_empty(k, v)?,
|
||||
"build-analysis" => self.build_analysis = parse_empty(k, v)?,
|
||||
"build-dir-new-layout" => self.build_dir_new_layout = parse_empty(k, v)?,
|
||||
"build-std" => self.build_std = Some(parse_list(v)),
|
||||
"build-std-features" => self.build_std_features = Some(parse_list(v)),
|
||||
"cargo-lints" => self.cargo_lints = parse_empty(k, v)?,
|
||||
|
@ -80,6 +80,7 @@ Each new feature described below should explain how to use it.
|
||||
* [feature-unification](#feature-unification) --- Enable new feature unification modes in workspaces
|
||||
* Output behavior
|
||||
* [artifact-dir](#artifact-dir) --- Adds a directory where artifacts are copied to.
|
||||
* [build-dir-new-layout](#build-dir-new-layout) --- Enables the new build-dir filesystem layout
|
||||
* [Different binary name](#different-binary-name) --- Assign a name to the built binary that is separate from the crate name.
|
||||
* [root-dir](#root-dir) --- Controls the root directory relative to which paths are printed
|
||||
* Compile behavior
|
||||
@ -1939,6 +1940,14 @@ The `-Zbuild-analysis` feature records and persists detailed build metrics
|
||||
enabled = true
|
||||
```
|
||||
|
||||
## build-dir-new-layout
|
||||
|
||||
* Tracking Issue: [#15010](https://github.com/rust-lang/cargo/issues/15010)
|
||||
|
||||
Enables the new build-dir filesystem layout.
|
||||
This layout change unblocks work towards caching and locking improvements.
|
||||
|
||||
|
||||
# Stabilized and removed features
|
||||
|
||||
## Compile progress
|
||||
|
@ -1,4 +1,4 @@
|
||||
<svg width="1255px" height="884px" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg width="1255px" height="902px" xmlns="http://www.w3.org/2000/svg">
|
||||
<style>
|
||||
.fg { fill: #AAAAAA }
|
||||
.bg { background: #000000 }
|
||||
@ -32,85 +32,87 @@
|
||||
</tspan>
|
||||
<tspan x="10px" y="154px"><tspan> -Z build-analysis Record and persist build metrics across runs, with commands to query past builds.</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="172px"><tspan> -Z build-std Enable Cargo to compile the standard library itself as part of a crate graph compilation</tspan>
|
||||
<tspan x="10px" y="172px"><tspan> -Z build-dir-new-layout Use the new build-dir filesystem layout</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="190px"><tspan> -Z build-std-features Configure features enabled for the standard library itself when building the standard library</tspan>
|
||||
<tspan x="10px" y="190px"><tspan> -Z build-std Enable Cargo to compile the standard library itself as part of a crate graph compilation</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="208px"><tspan> -Z cargo-lints Enable the `[lints.cargo]` table</tspan>
|
||||
<tspan x="10px" y="208px"><tspan> -Z build-std-features Configure features enabled for the standard library itself when building the standard library</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="226px"><tspan> -Z checksum-freshness Use a checksum to determine if output is fresh rather than filesystem mtime</tspan>
|
||||
<tspan x="10px" y="226px"><tspan> -Z cargo-lints Enable the `[lints.cargo]` table</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="244px"><tspan> -Z codegen-backend Enable the `codegen-backend` option in profiles in .cargo/config.toml file</tspan>
|
||||
<tspan x="10px" y="244px"><tspan> -Z checksum-freshness Use a checksum to determine if output is fresh rather than filesystem mtime</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="262px"><tspan> -Z config-include Enable the `include` key in config files</tspan>
|
||||
<tspan x="10px" y="262px"><tspan> -Z codegen-backend Enable the `codegen-backend` option in profiles in .cargo/config.toml file</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="280px"><tspan> -Z direct-minimal-versions Resolve minimal dependency versions instead of maximum (direct dependencies only)</tspan>
|
||||
<tspan x="10px" y="280px"><tspan> -Z config-include Enable the `include` key in config files</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="298px"><tspan> -Z dual-proc-macros Build proc-macros for both the host and the target</tspan>
|
||||
<tspan x="10px" y="298px"><tspan> -Z direct-minimal-versions Resolve minimal dependency versions instead of maximum (direct dependencies only)</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="316px"><tspan> -Z feature-unification Enable new feature unification modes in workspaces</tspan>
|
||||
<tspan x="10px" y="316px"><tspan> -Z dual-proc-macros Build proc-macros for both the host and the target</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="334px"><tspan> -Z fix-edition Permanently unstable edition migration helper</tspan>
|
||||
<tspan x="10px" y="334px"><tspan> -Z feature-unification Enable new feature unification modes in workspaces</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="352px"><tspan> -Z gc Track cache usage and "garbage collect" unused files</tspan>
|
||||
<tspan x="10px" y="352px"><tspan> -Z fix-edition Permanently unstable edition migration helper</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="370px"><tspan> -Z git Enable support for shallow git fetch operations</tspan>
|
||||
<tspan x="10px" y="370px"><tspan> -Z gc Track cache usage and "garbage collect" unused files</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="388px"><tspan> -Z gitoxide Use gitoxide for the given git interactions, or all of them if no argument is given</tspan>
|
||||
<tspan x="10px" y="388px"><tspan> -Z git Enable support for shallow git fetch operations</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="406px"><tspan> -Z host-config Enable the `[host]` section in the .cargo/config.toml file</tspan>
|
||||
<tspan x="10px" y="406px"><tspan> -Z gitoxide Use gitoxide for the given git interactions, or all of them if no argument is given</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="424px"><tspan> -Z minimal-versions Resolve minimal dependency versions instead of maximum</tspan>
|
||||
<tspan x="10px" y="424px"><tspan> -Z host-config Enable the `[host]` section in the .cargo/config.toml file</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="442px"><tspan> -Z msrv-policy Enable rust-version aware policy within cargo</tspan>
|
||||
<tspan x="10px" y="442px"><tspan> -Z minimal-versions Resolve minimal dependency versions instead of maximum</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="460px"><tspan> -Z mtime-on-use Configure Cargo to update the mtime of used files</tspan>
|
||||
<tspan x="10px" y="460px"><tspan> -Z msrv-policy Enable rust-version aware policy within cargo</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="478px"><tspan> -Z no-embed-metadata Avoid embedding metadata in library artifacts</tspan>
|
||||
<tspan x="10px" y="478px"><tspan> -Z mtime-on-use Configure Cargo to update the mtime of used files</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="496px"><tspan> -Z no-index-update Do not update the registry index even if the cache is outdated</tspan>
|
||||
<tspan x="10px" y="496px"><tspan> -Z no-embed-metadata Avoid embedding metadata in library artifacts</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="514px"><tspan> -Z panic-abort-tests Enable support to run tests with -Cpanic=abort</tspan>
|
||||
<tspan x="10px" y="514px"><tspan> -Z no-index-update Do not update the registry index even if the cache is outdated</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="532px"><tspan> -Z profile-hint-mostly-unused Enable the `hint-mostly-unused` setting in profiles to mark a crate as mostly unused.</tspan>
|
||||
<tspan x="10px" y="532px"><tspan> -Z panic-abort-tests Enable support to run tests with -Cpanic=abort</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="550px"><tspan> -Z profile-rustflags Enable the `rustflags` option in profiles in .cargo/config.toml file</tspan>
|
||||
<tspan x="10px" y="550px"><tspan> -Z profile-hint-mostly-unused Enable the `hint-mostly-unused` setting in profiles to mark a crate as mostly unused.</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="568px"><tspan> -Z public-dependency Respect a dependency's `public` field in Cargo.toml to control public/private dependencies</tspan>
|
||||
<tspan x="10px" y="568px"><tspan> -Z profile-rustflags Enable the `rustflags` option in profiles in .cargo/config.toml file</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="586px"><tspan> -Z publish-timeout Enable the `publish.timeout` key in .cargo/config.toml file</tspan>
|
||||
<tspan x="10px" y="586px"><tspan> -Z public-dependency Respect a dependency's `public` field in Cargo.toml to control public/private dependencies</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="604px"><tspan> -Z root-dir Set the root directory relative to which paths are printed (defaults to workspace root)</tspan>
|
||||
<tspan x="10px" y="604px"><tspan> -Z publish-timeout Enable the `publish.timeout` key in .cargo/config.toml file</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="622px"><tspan> -Z rustdoc-depinfo Use dep-info files in rustdoc rebuild detection</tspan>
|
||||
<tspan x="10px" y="622px"><tspan> -Z root-dir Set the root directory relative to which paths are printed (defaults to workspace root)</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="640px"><tspan> -Z rustdoc-map Allow passing external documentation mappings to rustdoc</tspan>
|
||||
<tspan x="10px" y="640px"><tspan> -Z rustdoc-depinfo Use dep-info files in rustdoc rebuild detection</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="658px"><tspan> -Z rustdoc-scrape-examples Allows Rustdoc to scrape code examples from reverse-dependencies</tspan>
|
||||
<tspan x="10px" y="658px"><tspan> -Z rustdoc-map Allow passing external documentation mappings to rustdoc</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="676px"><tspan> -Z sbom Enable the `sbom` option in build config in .cargo/config.toml file</tspan>
|
||||
<tspan x="10px" y="676px"><tspan> -Z rustdoc-scrape-examples Allows Rustdoc to scrape code examples from reverse-dependencies</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="694px"><tspan> -Z script Enable support for single-file, `.rs` packages</tspan>
|
||||
<tspan x="10px" y="694px"><tspan> -Z sbom Enable the `sbom` option in build config in .cargo/config.toml file</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="712px"><tspan> -Z section-timings Enable support for extended compilation sections in --timings output</tspan>
|
||||
<tspan x="10px" y="712px"><tspan> -Z script Enable support for single-file, `.rs` packages</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="730px"><tspan> -Z target-applies-to-host Enable the `target-applies-to-host` key in the .cargo/config.toml file</tspan>
|
||||
<tspan x="10px" y="730px"><tspan> -Z section-timings Enable support for extended compilation sections in --timings output</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="748px"><tspan> -Z trim-paths Enable the `trim-paths` option in profiles</tspan>
|
||||
<tspan x="10px" y="748px"><tspan> -Z target-applies-to-host Enable the `target-applies-to-host` key in the .cargo/config.toml file</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="766px"><tspan> -Z unstable-options Allow the usage of unstable options</tspan>
|
||||
<tspan x="10px" y="766px"><tspan> -Z trim-paths Enable the `trim-paths` option in profiles</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="784px"><tspan> -Z warnings Allow use of the build.warnings config key</tspan>
|
||||
<tspan x="10px" y="784px"><tspan> -Z unstable-options Allow the usage of unstable options</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="802px">
|
||||
<tspan x="10px" y="802px"><tspan> -Z warnings Allow use of the build.warnings config key</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="820px"><tspan>Run with `cargo -Z [FLAG] [COMMAND]`</tspan>
|
||||
<tspan x="10px" y="820px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="838px">
|
||||
<tspan x="10px" y="838px"><tspan>Run with `cargo -Z [FLAG] [COMMAND]`</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="856px"><tspan>See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html for more information about these flags.</tspan>
|
||||
<tspan x="10px" y="856px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="874px">
|
||||
<tspan x="10px" y="874px"><tspan>See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html for more information about these flags.</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="892px">
|
||||
</tspan>
|
||||
</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.1 KiB |
Loading…
x
Reference in New Issue
Block a user