Skip to content

Commit 4373786

Browse files
committed
docs(unstable): add -Zbuild-analysis doc
1 parent b43404d commit 4373786

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/doc/src/reference/unstable.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Each new feature described below should explain how to use it.
113113
* [Build-plan](#build-plan) --- Emits JSON information on which commands will be run.
114114
* [unit-graph](#unit-graph) --- Emits JSON for Cargo's internal graph structure.
115115
* [`cargo rustc --print`](#rustc---print) --- Calls rustc with `--print` to display information from rustc.
116+
* [Build analysis](#build-analysis) --- Record and persist detailed build metrics across runs, with new commands to query past builds.
116117
* Configuration
117118
* [config-include](#config-include) --- Adds the ability for config files to include other files.
118119
* [`cargo config`](#cargo-config) --- Adds a new subcommand for viewing config files.
@@ -1922,6 +1923,22 @@ HTML/JSON output.
19221923
cargo +nightly -Zsection-timings build --timings
19231924
```
19241925

1926+
## Build analysis
1927+
1928+
* Original Issue: [rust-lang/rust-project-goals#332](https://github.com/rust-lang/rust-project-goals/pull/332)
1929+
* Tracking Issue: [#15844](https://github.com/rust-lang/cargo/issues/15844)
1930+
1931+
The `-Zbuild-analysis` feature records and persists detailed build metrics
1932+
(timings, rebuild reasons, etc.) across runs, with new commands to query past builds.
1933+
1934+
```toml
1935+
# Example config.toml file.
1936+
1937+
# Enable the build metric collection
1938+
[build.analysis]
1939+
enabled = true
1940+
```
1941+
19251942
# Stabilized and removed features
19261943

19271944
## Compile progress

0 commit comments

Comments
 (0)