Files
linux_sentry_chassis/Cargo.toml
T
2026-09-22 20:05:16 +08:00

66 lines
1.9 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[workspace]
resolver = "3"
members = [
"crates/motor-core",
"crates/can-link",
"crates/dji-esc",
"crates/dji-esc-socketcan",
"crates/mecanum",
"crates/chassisd",
]
[workspace.package]
version = "0.1.0"
edition = "2024"
rust-version = "1.89"
license = "MIT"
# 部署二进制去符号表(armv7 3.2MB → ~1MB)
[profile.release]
strip = true
[workspace.dependencies]
# 异步运行时
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time", "signal"] }
# CAN 总线(仅 Linux,由 dji-esc-socketcan 按 target 引入)
socketcan = { version = "4", features = ["tokio"] }
# 错误定义与结构化日志
thiserror = "2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# 配置与命令行(chassisd)
serde = { version = "1", features = ["derive"] }
toml = "0.9"
clap = { version = "4", features = ["derive"] }
# 测试
proptest = "1"
approx = "0.5"
# workspace 内部 crate
motor-core = { path = "crates/motor-core" }
can-link = { path = "crates/can-link" }
dji-esc = { path = "crates/dji-esc" }
dji-esc-socketcan = { path = "crates/dji-esc-socketcan" }
mecanum = { path = "crates/mecanum" }
[workspace.lints.rust]
unsafe_code = "forbid"
[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
unwrap_used = "deny"
expect_used = "deny"
dbg_macro = "deny"
# 协议编解码与嵌入式数值转换中大量的 as 转换靠测试保证正确性
cast_possible_truncation = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
# 字节 ↔ 有符号整数的补码重解释是协议解码的本意
cast_possible_wrap = "allow"
# 中文文档中的品牌 / 型号词(RoboMaster、GM3508 等)不需要反引号
doc_markdown = "allow"
# 以下 pedantic 项对内部库收益低
module_name_repetitions = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "allow"