Skip to main content

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:
AliasCommand
cargo ccargo clippy
cargo tcargo test
cargo bcargo build
cargo fmt-ccargo fmt --check
cargo devcargo 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

  1. Fork the repository and create a feature branch
  2. Make your changes following the conventions above
  3. Run cargo fmt --check && cargo clippy --workspace -- -D warnings
  4. Run cargo test --workspace
  5. Submit a pull request
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.