Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

Profiles: no debug info for dependencies in dev and test builds

aiongg6ed69874fde8
diff --git a/Cargo.toml b/Cargo.toml
index 1215d8457..bacd48500 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -72,13 +72,16 @@ unsafe_code = "forbid"
dbg_macro = "warn"
todo = "warn"
+# Dependencies carry no debug info: their frames in a backtrace lose file:line, and the target dir
+# and link times shrink. The test profile inherits both settings.
[profile.dev.package."*"]
opt-level = 2
+debug = false
[profile.dev]
opt-level = 1
# Line tables keep file:line in panic backtraces but drop variable info, which roughly halves link
-# time and PDB size for the ~260 test binaries (#2204). CI sets the same through
+# time and PDB size for the test binaries (#2204). CI sets the same through
# CARGO_PROFILE_DEV_DEBUG (and no debuginfo at all for the Windows tests). To inspect locals in a
# debugger, build with CARGO_PROFILE_DEV_DEBUG=true.
debug = "line-tables-only"