From cceec33a8d12a38141e0efe7a07a18639f502cd9 Mon Sep 17 00:00:00 2001 From: Jacob Stephens Date: Wed, 30 Sep 2026 20:29:04 +0000 Subject: [PATCH 1/2] Use line-table debuginfo for dev builds Line tables for the crate and no debuginfo for dependencies: the debug binary drops from 108MB to 27MB and target/ from 1.5GB to 838MB, and backtraces keep file and line. Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 834e59280..302272b72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,14 @@ tempfile = "3.27.0" toml = "1.1.6" toml_edit = "0.25.15" +# Line tables keep file and line in the crate's backtraces; full debuginfo +# made the debug binary 108MB and target/ 1.5GB per worktree. +[profile.dev] +debug = "line-tables-only" + +[profile.dev.package."*"] +debug = false + # The profile that 'dist' will build with [profile.dist] inherits = "release" From 7a366925ce860edcdffaf0b87338458d34d4368a Mon Sep 17 00:00:00 2001 From: Jacob Stephens Date: Wed, 30 Sep 2026 20:29:49 +0000 Subject: [PATCH 2/2] Say dependency frames lose file and line Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 302272b72..043be93d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,9 @@ tempfile = "3.27.0" toml = "1.1.6" toml_edit = "0.25.15" -# Line tables keep file and line in the crate's backtraces; full debuginfo -# made the debug binary 108MB and target/ 1.5GB per worktree. +# Line tables keep file and line in the crate's backtraces, and dependencies +# get no debuginfo, so their frames show no file or line. Full debuginfo made +# the debug binary 108MB and target/ 1.5GB per worktree. [profile.dev] debug = "line-tables-only"