# Cargo config for the AFT workspace.
#
# Lowers debug info from full DWARF to line tables only, which:
#   - Preserves panic backtraces with file:line + function names
#   - Preserves `dbg!()`, `tracing`/`log` file:line, profiler symbols
#   - Drops variable inspection in step-through debuggers (lldb/gdb)
#
# Disk impact: ~50-70% smaller rlib/binary sizes in target/debug.
# Compile impact: slightly faster link time, no codegen slowdown.
#
# If you need full variable inspection in lldb for a tricky issue, run with
# RUSTFLAGS="-C debuginfo=2" cargo test ... for that session.

# Incremental compilation OFF (repo-wide).
#
# Why: a long-lived dev session accumulated 84G of stale `target/debug/
# incremental` fingerprints, and each parallel git-worktree worker cloned the
# whole `target/` (~255G each). Turning incremental off eliminates that dir
# everywhere — main checkout, every worktree, contributors, and CI — with no
# tooling requirement. It also pairs with sccache (below): the two are mutually
# exclusive, and incremental-off is what lets sccache cache effectively.
#
# sccache (shared compiled-artifact cache across the main checkout AND every
# worktree) is opt-in via the `RUSTC_WRAPPER=sccache` env var rather than a
# committed `[build] rustc-wrapper`, because a committed wrapper propagates into
# the Docker-based `cross` release builds (where sccache isn't installed) and
# would break CI. Install + enable it for local dev — see README (Development).
[build]
incremental = false

[profile.dev]
debug = "line-tables-only"

[profile.test]
debug = "line-tables-only"
