From 1121dad73bedb4b9b70eda1f21bb21f6016a6189 Mon Sep 17 00:00:00 2001 From: Aviator 5 Date: Tue, 18 Aug 2026 13:21:30 +0300 Subject: [PATCH] chore: optimize local development profiles - Reduce dependency debuginfo in dev and test builds to improve build speed and target size. - Retain line tables for workspace crates and provide a full-debuginfo debugging profile. Signed-off-by: Aviator 5 --- Cargo.toml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 4a3b8f3..563a142 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -198,3 +198,27 @@ colored = "3.0" # Format parsing serde-saphyr = "0.0.24" + +# --- Local dev speed ----------------------------------------------------------- +# Drop debuginfo on dependencies (the main source of target/ bloat) and keep only +# line tables on workspace crates so panic backtraces still carry file:line. +# Affects dev/test builds only; the release profile is untouched. +[profile.dev] +debug = "line-tables-only" + +[profile.dev.package."*"] +debug = false + +# Escape hatch: `cargo build --profile debugging` gives full debuginfo for the +# workspace and its dependencies. Builds into target/debugging/, safe to delete. +[profile.debugging] +inherits = "dev" +debug = true + +[profile.debugging.package."*"] +debug = true + +# Build scripts and the proc-macro copies rustc loads during macro expansion are +# governed by build-override, not by the package overrides above. +[profile.debugging.build-override] +debug = true