Prerequisites
- Rust 1.92+ (pinned in
rust-toolchain.toml — the toolchain installs automatically)
- Docker (required for simulation containers and database tests)
- Protobuf compiler (
protoc) for gRPC codegen
Clone and Build
Enable the pre-commit hook that enforces formatting:
Build the full workspace:
Run Tests
Unit tests run without external services:
Database tests (roz-db, roz-server) require a Postgres instance:
Never run multiple integration test suites in parallel. Testcontainers spawns a new Postgres container per run, and stale containers accumulate fast.
Linting
Run all four checks before committing:
The .cargo/config.toml provides shortcuts:
| Alias | Command |
|---|
cargo c | cargo clippy |
cargo t | cargo test |
cargo b | cargo build |
cargo fmt-c | cargo fmt --check |
cargo dev | cargo build --profile fastdev |
Conventions
- Edition 2024 with Rust 1.92.0 minimum
unsafe is denied workspace-wide — this is a safety-critical robotics platform
- Clippy pedantic + nursery enabled as warnings, denied in CI (
-D warnings)
- Line width 120 chars (configured in
.rustfmt.toml)
- Error handling via
thiserror for library crates, anyhow sparingly for binaries
- All domain types live in
roz-core with Serialize/Deserialize derives
Build Profiles
Contributing Workflow
- Fork the repository and create a feature branch
- Make your changes following the conventions above
- Run
cargo fmt --check && cargo clippy --workspace -- -D warnings
- Run
cargo test --workspace
- Submit a pull request
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.