From f8f09b73226d34d53c70401aa9056e1bc51a446b Mon Sep 17 00:00:00 2001 From: Joseph Malone Date: Wed, 17 Jun 2026 10:46:51 -0700 Subject: [PATCH] perf(build): drop debug info for dependencies in the dev profile Dependencies are compiled without debug info while workspace crates keep theirs. Debug info is ~50-70% of each pure-Rust dependency rlib in this workspace (measured via strip -S: swc_ecma_parser 71%, aws_sdk 67%), all for code that's rarely step-debugged. The "*" package spec matches dependencies only and excludes workspace members, so first-party crates stay fully debuggable; release builds are unaffected. Shrinks target/debug and speeds linking for every contributor and in CI. Signed-off-by: Joseph Malone --- Cargo.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 1cae6c797944..d99948f88557 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -113,3 +113,12 @@ icu_locale = { version = "=2.1.1", default-features = false } [patch.crates-io] v8 = { path = "vendor/v8" } cudaforge = { git = "https://github.com/jbg/cudaforge", rev = "e7c1967340e40673db98dc9e17da0f04834a456f" } + +# Dependencies don't need debug info. You rarely step-debug into third-party +# crates, but their DWARF dominates `target/debug` — roughly 50-70% of each +# dependency rlib in this workspace is debug info. Dropping it for dependencies +# only shrinks the debug build substantially and speeds linking. The "*" spec +# matches all dependencies but NOT workspace members, so first-party crates keep +# full debug info and stay fully debuggable; release builds are unaffected. +[profile.dev.package."*"] +debug = false