Cargo Feature Flags
HORUS uses Cargo feature flags to keep the default binary small while allowing opt-in to heavier capabilities. This page lists every feature flag across the workspace.
horus (Main Crate)
The user-facing umbrella crate you add to Cargo.toml. It re-exports the core runtime API and horus_types; robotics messages and transform frames live in horus-robotics and horus-tf.
[dependencies]
horus = "0.2"
| Feature | Default | What It Enables |
|---|---|---|
macros | Yes | Procedural macros: message!, service!, action!, node!, hlog! |
telemetry | Yes | Live monitoring export (HTTP, UDP, file) |
blackbox | Yes | Post-mortem flight recorder via .blackbox(size_mb) |
net | No | LAN topic replication through horus_net (opt-in) |
Disabling defaults
To build a minimal binary without macros, telemetry, or blackbox:
[dependencies]
horus = { version = "0.2", default-features = false }
To selectively re-enable:
[dependencies]
horus = { version = "0.2", default-features = false, features = ["macros"] }
horus-tf (Transform Frame Library)
These flags control optional blocking/async APIs in the transform frame system.
| Feature | Default | What It Enables |
|---|---|---|
wait | No | Blocking wait_for_transform() using condvar — zero overhead when disabled |
async-wait | No | Async wait_for_transform_async() using tokio::sync::Notify — pulls in tokio |
Usage
[dependencies]
horus-tf = { version = "0.2", features = ["wait"] }
// simplified
// Only available with "wait" feature
let tf = tf_tree.wait_for_transform("lidar", "world", Duration::from_secs(1))?;
[dependencies]
horus-tf = { version = "0.2", features = ["async-wait"] }
// simplified
// Only available with "async-wait" feature
let tf = tf_tree.wait_for_transform_async("lidar", "world", Duration::from_secs(1)).await?;
horus_core (Runtime)
These mirror the horus crate flags and are typically set transitively.
| Feature | Default | What It Enables |
|---|---|---|
macros | Yes | Includes horus_macros proc-macro crate |
telemetry | Yes | Telemetry export subsystem |
blackbox | Yes | Flight recorder subsystem |
test-utils | No | Test utilities like MockTopic for downstream crate testing |
Using test-utils
Enable test-utils in dev-dependencies for testing:
[dev-dependencies]
horus_core = { version = "0.2", features = ["test-utils"] }
horus_py (Python Bindings)
| Feature | Default | What It Enables |
|---|---|---|
extension-module | Yes | Required for building the .so Python extension |
Important: Disable when running Rust unit tests (test binary cannot link against libpython):
cargo test -p horus_py --no-default-features
horus_manager (CLI)
| Feature | Default | What It Enables |
|---|---|---|
schema | No | JSON Schema generation for manifest types (schemars) |
Summary Table
| Crate | Feature | Default | Dependency |
|---|---|---|---|
horus | macros | Yes | horus_macros |
horus | telemetry | Yes | — (marker) |
horus | blackbox | Yes | — (marker) |
horus | net | No | horus_net |
horus-tf | wait | No | — (condvar) |
horus-tf | async-wait | No | tokio |
horus_core | test-utils | No | — (marker) |
horus_py | extension-module | Yes | pyo3 |
horus_manager | schema | No | schemars |
See Also
- Configuration Reference —
horus.tomlproject config - Prelude Contents — What
use horus::prelude::*includes - Performance — Optimization guide