Conversation
|
A #goals/proposed topic was opened to discuss this issue. |
Co-authored-by: Nurzhan Saken <nurzhan.sakenov@gmail.com>
| ## Summary | ||
|
|
||
| Investigate, triage, and decrease the size of intermediate compilation directories (e.g. `target/`). | ||
| With a funded team of 3-5 engineers, we aim over the next year to decrease the size of the directory by 60% or more for fresh builds and by 80% or more for repeated builds across version branches. |
There was a problem hiding this comment.
This is very ambitious :) That being said, -Zembed-metadata should already reduce the size in some cases by up to 35%, so that should be a good headstart 😆
| | Create a prototype PoC that breaks down `.rmeta` files and `incremental/` directories by size and query across multiple build invocations | @jyn514 | | | ||
| | Extend the PoC to a maintainable tool that can be used outside the project goal team | ? | Likely implemented as a `rustc_driver` or `-Z` flag | | ||
| | Add support for running that tool to `rustc-perf` benchmarks | ? | Subgoal id A2 | | ||
| | Add a graph of artifact sizes over time to the `rustc-perf` site | ? | | |
There was a problem hiding this comment.
rustc-perf can already graph the history of any metric, so if we add new metrics, that should work out of the box.
(btw I'm happy to help with any rustc-perf changes)
| |Task |Experience level |Time investment | | ||
| |-------------------------------------------------|----------------------------------------------------------------------|-----------------------------------------------------------------| | ||
| |Create a maintainable benchmarking tool |Medium Rust experience, compiler experience preferable |1-3 weeks full-time | | ||
| |Extend rustc-perf suite to measure artifact sizes|Medium Rust experience, compiler experience not necessary |2-4 weeks full-time | |
There was a problem hiding this comment.
This is more of a compiler work, than rustc-perf work, IMO.
| [cargo#17512]: https://github.com/rust-lang/cargo/pull/17512 | ||
| [brlo]: https://blog.rust-lang.org/inside-rust/2026/08/18/reducing-target-dir-size-on-nightly/ | ||
|
|
||
| Kobzol has been responsible for implementing and stabilizing `-Z embed-metadata=no`, and is a current member of the Council. |
There was a problem hiding this comment.
The Council note felt a bit out of nowhere 😆 But I guess street credit helps? 😆
Co-authored-by: Makai <m4kai410@gmail.com>
|
|
||
|
|
||
| Suggested reviewers: | ||
| - cargo: Ed Page, Ross Sullivan |
There was a problem hiding this comment.
I would love offering some review capacity (and anyway as a t-cargo member I have to review the design). However, this is also kinda fund-needed. At least I'll need to convince my employer to put me on it.
There was a problem hiding this comment.
Let me know if I or others can help with convincing your employer. The target directory size and churn is arguably the number 1 most-complained-about issue in all of Rust, so I think a very strong case can be made.
|
Maybe one more area of research, that strikes me as disproportionate: I have a workspace with 25 crates. When I run |
Rendered