Skip to main content
roz is a workspace of 12 Rust crates. Each crate has a single responsibility, and the dependency graph is intentionally shallow to keep compile times fast and the safety boundary clear.

Crate Overview

CrateTypeDescription
roz-coreLibraryDomain types, channel manifests, error types. No IO. Everything else depends on this.
roz-agentLibraryAgent runtime: LLM abstraction, tool dispatch, OODA loop, safety guards, constitution.
roz-copperLibraryCopper-rs runtime integration. On-robot task graph execution at 100Hz.
roz-localLibraryLocal agent loop, WASM compilation, sim container management, MCP client.
roz-cliBinaryInteractive TUI and command-line interface. Entry point for roz commands.
roz-safetyBinarySafety daemon: heartbeat tracker, e-stop monitoring, watchdog process.
roz-natsLibraryNATS client wrappers, subject definitions, cloud messaging.
roz-zenohLibraryZenoh client for local peer-to-peer comms between robot processes.
roz-testLibraryShared test utilities, fixtures, and helpers used across crate tests.
roz-dbLibrarysqlx migrations, queries, row-level security (RLS) on every table.
roz-serverBinaryaxum API server. REST + gRPC multiplexed on a single port.
roz-workerBinaryEdge worker binary. Connects via NATS, runs the OODA loop on-robot.

Zenoh vs NATS

roz uses two messaging systems for different scopes:
  • Zenoh handles local, peer-to-peer communication between processes on the same robot or local network. It provides low-latency pub/sub for sensor data, control commands, and state synchronization without requiring a broker.
  • NATS handles cloud communication between the API server, edge workers, and the safety daemon. It provides reliable messaging with subject-based routing across network boundaries.
The split keeps latency-sensitive robot control traffic local (Zenoh) while using NATS for coordination that needs to cross network boundaries.

Data Flow

Dependency Graph

The crate dependency structure keeps roz-core at the root with no IO dependencies. All other crates depend on roz-core for shared types.
Key constraints enforced by the dependency graph:
  • roz-core has zero IO dependencies. It defines types only.
  • unsafe is denied workspace-wide. This is a safety-critical robotics platform.
  • roz-local depends on roz-agent and roz-zenoh but not on roz-server or roz-db — it runs entirely on the local machine.
  • roz-server depends on roz-db and roz-agent but not on roz-local — it runs in the cloud.

Source Code

The full crate structure is at github.com/BedrockDynamics/roz-oss.