-
Notifications
You must be signed in to change notification settings - Fork 932
Expand file tree
/
Copy pathCargo.toml
More file actions
98 lines (90 loc) Β· 5.21 KB
/
Copy pathCargo.toml
File metadata and controls
98 lines (90 loc) Β· 5.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Workspace root for the robot daemon.
#
# One crate per service or tool, matching the service split in
# docs/design/architecture.md Β§1. `robotd`, `btd` and `mediad` are all siblings now.
[workspace]
resolver = "3"
members = ["btd", "configd", "duck-control", "duck-detect", "duck-ether", "duck-ipc-proto", "duckctl", "kinematics", "mediad", "odometry", "padd", "pet-detect", "sounds", "tof", "updater", "robotctl", "robotd", "robotd-params", "test-support", "xtask"]
# Everything except `duckctl`, and that exception is the whole reason this key exists.
#
# `cargo board --bins` β in `dev-push.sh` and in the release workflow β builds every default
# member for aarch64, which is right for a robot's daemons and wrong for the client a developer
# runs on their own machine: it would cross-compile a Bluetooth stack for a board that must never
# see one, on the release path, for nothing.
#
# The alternative was naming the binaries explicitly at each `--bins` call site. There are two of
# them and they would have to be kept in step by hand, which is the failure this repo keeps
# writing down. One list here, and a new daemon is picked up by both without anybody remembering.
#
# `--workspace` is unaffected, so CI still lints and tests `duckctl` exactly as before.
default-members = ["btd", "configd", "duck-control", "duck-detect", "duck-ipc-proto", "kinematics", "mediad", "odometry", "padd", "pet-detect", "sounds", "tof", "updater", "robotctl", "robotd", "robotd-params", "test-support", "xtask"]
# ONNX Runtime, which robotd dlopens to run a policy. One source of truth: `xtask package`
# bakes these into the release's preinstall hook, and a test asserts scripts/setup-board.sh
# agrees with them. Two copies drifting apart is exactly how a board ended up with 1.20.1
# against an `ort` that panics below 1.23.
#
# `floor` is the minimum `ort` accepts β raise it in step with the `ort` dependency.
# `target` is what we install when a board is below the floor.
[workspace.metadata.onnxruntime]
floor = "1.23"
target = "1.28.0"
# Rockchip's NPU runtime, which `duck-detect` dlopens to run the duck detector. Same shape as the
# ONNX Runtime pin above and for the same reason β `scripts/setup-npu.sh` is fetched standalone with
# curl and cannot read this file, so it carries a literal and a test asserts the two agree.
#
# The version is a tag in Rockchip's `rknn-toolkit2` repository, which is where the .so lives; it has
# to be at least as new as the model the converter produces, because a runtime older than its model
# fails at `rknn_init` with a number.
[workspace.metadata.rknpu]
runtime = "v2.3.2"
# The official policy set, which `robotd` runs and which lives on the Hugging Face Hub rather
# than in this repository β a gait retrain should not need a daemon release, and a daemon fix
# should not re-ship six megabytes of unchanged weights.
#
# Same shape as the three pins above and for the same reason: `scripts/seed-policies.sh` runs from
# inside a release and cannot read this file, so it carries the literals and a test asserts the
# two agree.
#
# `version` is a tag in the Hub repo, and it is a *floor*: it decides what a freshly provisioned
# board installs, not what every board runs. Moving past it is `robotctl policy update`, which
# needs no daemon release β bumping this does, since it ships inside one.
[workspace.metadata.policies]
repo = "pollen-robotics/microduck-policies"
version = "v1"
# The prebuilt GStreamer plugins `mediad` needs, built in CI from pinned upstream sources at
# https://github.com/pollen-robotics/microduck-gst-plugins β `mpph264enc` (hardware H.264 through
# Rockchip MPP) and `webrtcsink`/`webrtcsrc`, neither of which exists in any Debian suite.
#
# One source of truth, for the same reason `[workspace.metadata.onnxruntime]` above is one:
# `scripts/setup-gstreamer.sh` is fetched standalone with curl and cannot read this file, so it
# carries a literal, and a test asserts the two agree. Two copies of a version drifting apart is
# how a board ended up with an ONNX Runtime its `ort` panics on.
[workspace.metadata.gst-plugins]
repo = "pollen-robotics/microduck-gst-plugins"
version = "v3"
[workspace.package]
version = "0.11.0"
edition = "2024"
# 1.89 for `std::fs::File::try_lock`, which is how the single-flight update lock works
# without a dependency (updater/src/journal.rs). Edition 2024 needs 1.85, so this covers
# both. Declared so a teammate on an older toolchain gets "requires rustc 1.89" instead of
# an error about a method that does not exist.
rust-version = "1.89"
license = "Apache-2.0"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
semver = { version = "1", features = ["serde"] }
thiserror = "2"
tokio = "1"
clap = { version = "4", features = ["derive"] }
hound = "3.5"
tracing = "0.1"
tracing-subscriber = "0.3"
tokio-util = "0.7"
async-trait = "0.1"
# No custom [profile.release]. Binary size is not worth optimising for: model artifacts
# will dwarf a few MB of binary, and the tuning cost more than it bought β
# `strip = true` in particular removes the symbol table, turning a panic backtrace in
# journald into bare addresses, which is exactly what you need when diagnosing a robot
# you cannot attach a debugger to. `lto`/`codegen-units` only lengthened builds.