horus.toml: Single Source of Truth
Every HORUS project has one config file: horus.toml. It replaces the need for separate Cargo.toml and pyproject.toml files. You declare your dependencies once, and HORUS generates everything else.
The Problem
Traditional robotics projects need different config files for each language:
| Language | Config Files |
|---|---|
| Rust | Cargo.toml + Cargo.lock |
| Python | pyproject.toml + requirements.txt |
| Mixed | All of the above |
A robot using Python for ML and Rust for control needs 3+ config files. Adding a dependency means knowing which file to edit.
The HORUS Solution
One file. All languages. All dependencies.
# horus.toml — the only config file you edit
[package]
name = "my-robot"
version = "0.1.0"
[dependencies]
# Rust (auto-detected as crates.io)
serde = { version = "1.0", source = "crates.io", features = ["derive"] }
# Python (auto-detected as PyPI)
numpy = { version = ">=1.24", source = "pypi" }
[scripts]
sim = "horus sim start --world warehouse"
deploy = "horus deploy pi@robot --release"
[hooks]
pre_run = ["fmt", "lint"] # Auto-format and lint before every run
When you run horus build, HORUS reads horus.toml and generates native build files:
- Rust deps →
.horus/Cargo.toml - Python deps →
.horus/pyproject.toml
You never see or edit these generated files.
The .horus/ Directory
Every HORUS project has a .horus/ directory containing generated files and build artifacts. It's gitignored and fully managed by horus.
my_project/
├── horus.toml ← You edit this
├── src/
│ ├── main.rs
│ └── main.py
└── .horus/ ← Generated (don't touch)
├── Cargo.toml ← From horus.toml Rust deps
├── pyproject.toml ← From horus.toml Python deps
├── target/ ← Rust build artifacts
└── packages/ ← Cached registry packages
Never edit files inside .horus/. They are regenerated from horus.toml every time you build. If you need to change a dependency, edit horus.toml and run horus build.
If .horus/ gets corrupted, just delete it:
horus clean --all # Remove everything, regenerated on next build
How It Works
| Command | What happens |
|---|---|
horus add serde | Detects crates.io → adds to horus.toml → regenerates .horus/Cargo.toml |
horus add numpy | Detects PyPI → adds to horus.toml → regenerates .horus/pyproject.toml |
horus build | Reads horus.toml → generates all build files → builds all languages |
horus test | Runs cargo test + pytest (all from horus.toml) |
horus remove X | Removes from horus.toml → regenerates affected build files |
Comparison
| Traditional | HORUS | |
|---|---|---|
| Config files | 3+ per language | 1 (horus.toml) |
| Add a dep | Edit the right file, know the syntax | horus add NAME |
| Build | cargo build + pip install + ... | horus build |
| Test | cargo test + pytest | horus test |
| Deploy | Manual cross-compile scripts | horus deploy pi@robot |
| Onboarding | Learn 3 build systems | Learn 1 CLI |
Next Steps
- Configuration Reference — Full field reference for horus.toml
- Quick Start — Build your first project
- CLI Reference — All horus commands