copper-rs README

The project's README from github.com/copper-project/copper-rs. As one markdown file: README.md.

Copper logo
Copper Runtime & SDK

A Rust runtime for building, running, recording, and deterministically replaying static robot task graphs, from Linux to bare metal.

CI/CD status cu29 on crates.io Rust 1.96 or newer Read the Copper book Copper documentation Copper release notes Copper Discord

▶ Try Copper in your browser  ·  Build your first app

Why Copper

Built for robots Built to ship
Static by design: task graphs are declared in RON and wired at compile time. Runs anywhere: Linux, macOS, SBCs, and bare-metal microcontrollers.
Realtime first: zero-allocation, data-oriented execution on the hot path. Deterministic replay: record a run, reproduce it, and inspect it offline.
Rust-first: ergonomic task APIs with compile-time guarantees. Interoperable: connect to ROS 2 through Zenoh and migrate progressively.

Already flying, driving, swimming, spacefaring, and powering humanoids.

See It Run

These are the same Copper applications used on physical robots, recompiled for the browser. The simulator runs beside a live view of the Copper task graph and latency.

BalanceBot browser demo
BalanceBot
A self-balancing robot simulation using the application that runs on Raspberry Pi hardware.
Source code
Flight controller browser demo
Flight Controller
A quadcopter simulation using the control stack deployed on STM32H7 flight hardware.
Source code

Watch more robots built with Copper in the community showcase, or explore the cross-framework benchmarks.

Build Your First Copper App

Install the latest stable Rust toolchain, then:

cargo install cargo-cunew
cargo cunew hello_copper
cd hello_copper
cargo run

The generated app has a typed source → task → sink graph that prints its first messages and records logs/hello-copper.copper. Start with copperconfig.ron, src/main.rs, and src/tasks.rs; the generated justfile also provides helpers for logs, CopperLists, topology (just graph), the exact generated process schedule (just sched), post-execution timing from the default Copper log (just sched-log), and replay. Host projects also include just pgs-baseline, just pgs-optimize, just pgs-candidate, and just pgs-measure; the starter schedule.ron is a conservative placeholder to tune for the real workload. Project creation asks whether the target is bare metal/no_std and omits PGS scaffolding for that choice.

How Copper Fits Together

Stage What happens
Declare Define the static task graph in copperconfig.ron.
Generate #[copper_runtime] wires the graph at compile time.
Run Execute deterministically with a zero-allocation hot path.
Record Capture messages, timing, and state in a unified .copper log.
Inspect Replay a recorded run, export its data, and inspect its state.

The robot is a static thing: Copper turns its declared graph into a purpose-built runtime, then records messages, timing, and state into one replayable log. RobotClock makes time explicit across hardware, simulation, and replay.

What Sets Copper Apart

Explore Copper

Learn Book · Runtime overview · API docs
Build Project templates · RON reference · Component catalog
Go deeper Architecture notes · Examples · Logging and replay · Python support
Project Supported platforms · Release notes
Community Contributing · GitHub Discussions · Discord

copper-rs (copper-project/copper-rs)

drone
Searching Database…

What is this?Copper is a Rust runtime and SDK for building, running, recording, and deterministically replaying static robot task graphs, often described as an 'operating system for robots' that runs anywhere from Linux down to bare-metal microcontrollers.
Is this a full operating system kernel or a framework I compile into my robot's code?Despite the 'OS for robots' framing, it is a Rust framework/runtime: you declare your task graph in a RON config file and it gets wired into your binary at compile time, rather than booting as a standalone kernel.
How do I build my first Copper app?Install the latest stable Rust toolchain, then use the Copper project generator to scaffold an app around copperconfig.ron, src/main.rs, and src/tasks.rs, which comes with a justfile for logs, graph inspection, scheduling, and replay.
Any gotchas when targeting bare-metal hardware?If you choose a bare-metal/nostd target during project creation, the generator skips Profile-Guided Scheduling scaffolding, and the default schedule.ron it gives you is just a conservative placeholder you still need to tune for your real workload.
What hardware can Copper actually run on?It runs on Linux and macOS development machines, single-board computers like Raspberry Pi, and bare-metal microcontrollers such as the STM32H7 flight controllers used in the quadcopter demo.
Can I use Copper alongside an existing ROS 2 robot?Yes, Copper connects to ROS 2 through Zenoh so you can integrate it with a ROS-based stack and migrate progressively instead of rewriting everything at once.
What is Time Travel Debugging?You can seek through a recorded run, restore the task state at any point, and re-execute your code with the exact recorded inputs and robot clock, letting you debug what actually happened on the real robot.
What is Profile-Guided Scheduling (PGS)?PGS turns measured timings, sensor rates, and deadlines into candidate execution schedules you can benchmark and compile into the runtime, using helpers like just pgs-baseline and just pgs-measure.
Has Copper actually been used on real robots?The README says it is already flying, driving, swimming, going to space, and powering humanoids, and it ships browser-playable simulations of the exact apps running on a Raspberry Pi balancing robot and an STM32H7 quadcopter.
Size
1.3 GB
Stars
1.5K
Age
6y
Commits · 90 Days