From 002b5c1b9cc627e2bbc1b16b3b2b21311b120be1 Mon Sep 17 00:00:00 2001 From: fylorn <249551762+fylorn@users.noreply.github.com> Date: Thu, 24 Sep 2026 10:09:35 +0800 Subject: [PATCH] build: keep only line tables in dev and test builds Each test target links the whole crate into its own binary, and with full debug info target/ grows past 100 GB. Line tables keep file:line in backtraces at a fraction of the size. Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 6c91ea51..82066057 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -140,3 +140,8 @@ strip = "symbols" # 保持 unwind:catch_unwind 要靠它兜住单个请求的 panic。 # abort 会让那层防护失效,整个进程跟着死 —— 而 core 死了所有 AI 客户端一起瞎。 panic = "unwind" + +# 开发和测试构建只留行号表:报错和 panic 仍能指到文件和行,变量级调试信息不要。 +# 每个集成测试都是链接整个 crate 的独立二进制,带完整调试信息时 target/ 会涨到上百 GB。 +[profile.dev] +debug = "line-tables-only"