You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each example is self-contained and runs with a single cargo run
command. They're grouped by what you're trying to learn — start at the
top of whichever section matches your goal.
First time here? Read QUICKSTART.md first —
it's the 5-minute path to a working program.
Recommended starting point. Full TOML → pipeline → hot loop with latency reporting + recovery on transient faults. Drop-in replacement for the old edge_pipeline.rs.
Original synthetic FPV pipeline using ContextPool directly. Kept for reference; new code should use edge_pipeline_v2.rs.
rknn (optional)
# Validate a TOML config (no real hardware needed):
cargo run --release --example board_pipeline -- boards/rock4d.toml
# Run the full pipeline (build with the features your TOML asks for):
cargo run --release --features "rknn realtime" --example edge_pipeline_v2 -- boards/rock4d.toml 600
# CPU-only smoke test on macOS:
cargo run --release --example edge_pipeline_v2 -- boards/cpu-only.toml 10
Choosing a feature combination
The "Features" column above tells you which --features flag(s) the
example needs. Defaults:
cargo run --release --example <name># CPU only
cargo run --release --features gpu --example <name># + wgpu cross-platform GPU
cargo run --release --features metal-backend --example <name># + Metal-native (macOS)
cargo run --release --features rknn --example <name># + Rockchip NPU (Linux ARM)
cargo run --release --features "rknn metal-backend gpu realtime" --example <name># everything
For build performance, combine features in a single cargo build —
incremental compile shares the upstream artifacts.
Running on real hardware
Most examples accept a model.onnx / image / video as a CLI argument.
For inference benchmarks, point them at any opset-22 ONNX:
# Download a YOLO model (any export from ultralytics works)
wget https://github.com/ultralytics/assets/releases/download/v8.3.0/yolov8n.onnx
cargo run --release --example yolo_detect -- yolov8n.onnx photo.jpg
cargo run --release --features metal-backend --example bench_mpsgraph -- yolov8n.onnx 50
For the pipeline framework, see docs/pipeline-config.md
for the TOML schema and sample configs.