Skip to content

chore(build): optimize cargo dev profile and prune crate-type to reduce storage footprint - #17

Merged
chyinan merged 3 commits into
chyinan:mainfrom
huwany1:main
Sep 9, 2026
Merged

chore(build): optimize cargo dev profile and prune crate-type to reduce storage footprint#17
chyinan merged 3 commits into
chyinan:mainfrom
huwany1:main

Conversation

@huwany1

@huwany1 huwany1 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Reduces local development storage overhead and prevents runaway build cache accumulation:

  • Prunes crate-type in src-tauri/Cargo.toml to ["rlib"] for desktop builds, eliminating the redundant monolithic staticlib archive (~4 GB single file on Windows MSVC) and temporary .a outputs.
  • Adds [profile.dev.package."*"] debug = 1 to generate line-level debuginfo for third-party dependencies while preserving full debug = 2 for the main crate so rich IDE variable inspection remains intact.
  • Adds clean:target convenience script to package.json.

Behavioral Impact

  • Build cache size in src-tauri/target is reduced by tens of gigabytes across iterative runs without degrading local debugging capabilities.
  • Third-party dependency PDBs and intermediate objects shrink significantly.
  • Clean build verified and src-tauri/target drops to ~3.9 GB.

Verification

  • cargo check --manifest-path src-tauri/Cargo.toml (Passed in 46.8s)
  • npm run check:ipc (Passed: 171 registered commands)
  • npm test (Passed: 69 test files, 617 tests)

@chyinan

chyinan commented Sep 8, 2026

Copy link
Copy Markdown
Owner

审查完成,整体 LGTM,没有发现需要阻塞合并的功能、安全或事务一致性问题。GitHub CI 6/6 通过;本地精确提交上 characters::activation_tests 35 项、commands::characters 39 项通过。非阻塞建议:建议在 src-tauri/src/characters/activation.rs:431 附近补一个 max_connections(1) + apply/restore failure 的回归测试,覆盖事务在 recover_committed_backend 前释放连接的死锁场景。除此之外可以合并。

@chyinan
chyinan merged commit 584196a into chyinan:main Sep 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants