build: Rust 构建与测试效率优化(P0/P2) - #1
Merged
Merged
Conversation
…g guidelines - Revised instructions in AGENTS.md and CLAUDE.md to clarify the Rust build process, emphasizing the use of incremental compilation and when to run `cargo clean`. - Updated README.md to reflect changes in Rust testing practices, including targeted tests and full suite execution before commits. - Enhanced documentation on Rust hygiene practices to prevent unnecessary clean operations, directing users to consult the optimization guide for troubleshooting scenarios. - Adjusted PHASE_3_REMAINING_TODO.md and DEVELOPMENT_STATUS.md to reflect the current project status and testing recommendations.
Add src-tauri/.cargo/config.toml and nextest profiles, switch CI to cargo nextest, and update dev docs. Fix .gitignore so project .cargo config is tracked.
Ensure generated Tauri context can validate app icons in CI by storing PNG assets with alpha channels.
Run nextest compilation serially and omit test debug info so Linux CI avoids GNU ld crashes while linking large Tauri test binaries.
extract_project_name used std::path::Path::file_name(), which only recognizes the host OS separator. On the Ubuntu CI runner a Windows-style path like `D:\code\Misaka-Tauri` is treated as one component, so project_name came back as the full path instead of `Misaka-Tauri`, failing full_workspace_binding_flow. Split on both `/` and `\` so the result is the same on any host. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/guides/rust-build-test-optimization.md,系统说明 Rust/Tauri 编译与测试变慢的原因,并按 P0→P3 给出可执行优化步骤与验收标准AGENTS.md、CLAUDE.md、README.md、DEVELOPMENT_STATUS.md):停止日常cargo clean,推广增量编译、cargo check优先与精准--test工作流src-tauri/.cargo/config.toml(dev 依赖opt-level = 1)、src-tauri/.config/nextest.toml,CI 改用cargo nextest run --all-features --profile ci,并修正.gitignore以保留src-tauri/.cargo/配置Test plan
cd src-tauri && cargo check第二次运行应明显快于首次(增量编译生效)cargo nextest run --test minimal可正常运行