Repository navigation
perf(cargo): centralize default feature ownership - #2259
Merged
Merged
Conversation
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.
概要
本 PR 将 Cargo default feature 的责任集中到正确 owner,避免在大量 workspace member 上重复声明
default-features = false,同时继续保持 capability feature 由真实 consumer 显式选择。default = []的仓内 crate 建立统一 guarded registry:target 必须显式保持空默认,consumer 不再重复关闭。client + server兼容默认;Desktop/CLI 继续显式关闭并分别选择真实角色。[workspace.dependencies];成员仅增加实际使用的 slice。依赖与编译图
default-features = falseCargo.lockpackages三平台
normal,build版本化 package 去重:product-fullmacOS 数字表示 resolved package closure。BitFun 的 Objective-C direct edges 按实际 imports 选择 feature,但 Tauri/wry/notification/updater 仍会按 Cargo additive union 合并自身需求。
验证
通过:
node --test scripts/check-core-boundaries.test.mjs(118/118)node scripts/check-core-boundaries.mjscargo metadata --locked --offline --format-version 1git diff --check未改
.github/**:现有 workspace/platform CI 会覆盖产品组合和真实平台构建,本 PR 不追加重复检查。本机限制:Windows workspace check 到 Desktop build script 后因缺少
src/mobile-web/dist停止;macOS cross-check 因 Windows 主机没有 Apple C compiler 在objc2-exception-helperbuild script 停止。两者均未出现 Rust feature 错误,真实 macOS/产品构建以现有 CI 为最终证据。