refactor: enforce layered crates and Rust audit gates

This commit is contained in:
Horldsence
2026-09-24 13:00:03 +08:00
parent af151525d1
commit 8a582fc102
67 changed files with 3918 additions and 581 deletions
+12 -1
View File
@@ -2,7 +2,17 @@
RoboMaster 哨兵机器人麦轮底盘:Linux ARM 主控、4 × GM3508/C620、SocketCAN 或 SLCAN、tokio 异步运行时。
架构规范见 [`ARCHITECTURE.md`](ARCHITECTURE.md)。workspace 由 21 个职责单一 crate 组成,不使用 `rm-` 前缀,crate 内源码保持扁平。
架构规范见 [`ARCHITECTURE.md`](ARCHITECTURE.md)。workspace 由 24 个职责单一 crate / 测试包组成,不使用 `rm-` 前缀,crate 内源码保持扁平。
安装本地规则 hook:
```sh
just install-hooks
just audit
```
依赖层级、外部库白名单和 trait 边界见 [`docs/dependencies.md`](docs/dependencies.md)。
规则审查器是基于 Nightly `cargo -Zscript` 的单文件 Rust 脚本。
## 结构
@@ -12,6 +22,7 @@ RoboMaster 哨兵机器人麦轮底盘:Linux ARM 主控、4 × GM3508/C620、S
- `motor` / `esc-bus`:设备契约与安全总线运行时。
- `pid` / `motor-control` / `mecanum`:纯控制算法。
- `motor-model` / `experiment` / `sim-harness` / `tuning`:仿真与自动整定。
- `dr16-protocol` / `dr16`:DJI DR16/D-BUS 协议和串口接收。
- `chassis-config` / `bench` / `chassisd` / `spin` / `chassis-tune`:配置、台架和应用入口。
`esc-bus` 不依赖控制算法。应用把 `motor-control::MotorPolicy` 作为