This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Radar · Rust · Archive · Week 34 · Aug 17 – 23, 2026

Experiment in reducing target directory size on nightly

Nice to knowtooling

What changed
The Rust team experimented with reducing the size of the target directory on nightly.
Production impact
The source does not say.
Try it
Build a small crate on nightly and compare the size of target/debug before and after the experiment.
Source
blog.rust-lang.org/inside-rust/2026/08/18/reducing-target-dir-size-on-nightly/

Understand it, then run it

Cargo, the Rust package manager, keeps a folder called target where it stores all the files it creates while compiling your project. Those files can take up a lot of disk space, especially when you compile many projects or use debug builds. The Cargo team has added a new nightly‑only setting called -Zembed-metadata=no. When this flag is on, Cargo stops writing duplicate metadata into the compiled library files, which makes the target folder a little smaller. The change is only active on the nightly channel and is meant to test whether it helps users without breaking anything.

Run it now

Todayrust
// This program demonstrates the effect of the nightly-only `-Zembed-metadata=no` flag.
// Since the flag is not available on stable, we simply print a message explaining
// what would happen if it were enabled.

fn main() {
    println!("On nightly, Cargo automatically passes `-Zembed-metadata=no` to rustc,");
    println!("which removes duplicate metadata from .rlib files and reduces the");
    println!("size of the target directory. This change is experimental and only");
    println!("affects nightly builds.");
}

What it printed when we ran it on Rust 1.98.1 (edition 2024)

On nightly, Cargo automatically passes `-Zembed-metadata=no` to rustc,
which removes duplicate metadata from .rlib files and reduces the
size of the target directory. This change is experimental and only
affects nightly builds.

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed