diff --git a/src/cargo/core/features.rs b/src/cargo/core/features.rs index 3c6410ec684..406f76c5468 100644 --- a/src/cargo/core/features.rs +++ b/src/cargo/core/features.rs @@ -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> = ("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)?, diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index 01800764d9c..c8b64236fe1 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -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 diff --git a/tests/testsuite/cargo/z_help/stdout.term.svg b/tests/testsuite/cargo/z_help/stdout.term.svg index 623911104d4..f48d5c64e5f 100644 --- a/tests/testsuite/cargo/z_help/stdout.term.svg +++ b/tests/testsuite/cargo/z_help/stdout.term.svg @@ -1,4 +1,4 @@ - +