feat(ostool): 添加 Cargo 二进制目标选择#97
Open
MRNIU wants to merge 2 commits intodrivercraft:mainfrom
Open
Conversation
0922e26 to
35bc562
Compare
OSTool 需要在同一个 Cargo package 暴露多个二进制时,能够明确选择本次构建和运行使用的目标,而不是复制多份配置或依赖 artifact 猜测。 - 为 `system.Cargo` 增加可选的 `bin` 字段,并在 `build`、`run qemu`、`run uboot`、`board run` 中支持 `--package` / `--bin` 临时覆盖。 - Cargo 构建器按 package 和 bin 精确匹配 executable artifact;多二进制未指定时返回明确的歧义错误。 - 更新中文和英文 README,说明配置项、命令行参数和多二进制项目的用法。 - 补充 SimpleKernel 迁移计划中的 PR-02 实现取舍,明确 command selector、语义检查和多 binary 配置的边界。
35bc562 to
504bdc0
Compare
--package/--bin 覆盖原本只更新局部 build config,导致后续加载 .board.toml 时,${package} 仍可能按旧 Tool context 解析。
- 将 selector 应用后的 build config 写回 Tool 上下文。
- 更新 SimpleKernel 迁移计划,记录 board run 对 package-local 路径的要求。
验证:git diff --check
8dfff51 to
f29bdb7
Compare
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.
概要
system.Cargo.bin配置,让 OSTool 在同一个 package 暴露多个二进制时可以明确选择目标 artifact。ostool build、ostool run qemu、ostool run uboot和ostool board run增加--package/--bin临时覆盖参数。验证
cargo fmt --all -- --checkcargo check -p ostoolgit diff --staged --check兼容性
main修改。