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 crate you add to Cargo.toml. Re-exports horus_core and horus_library.
[dependencies]
horus = "0.1"
| 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) |
mdns | No | Zero-config peer discovery via mDNS/DNS-SD |
Disabling defaults
To build a minimal binary without macros, telemetry, or blackbox:
[dependencies]
horus = { version = "0.1", default-features = false }
To selectively re-enable:
[dependencies]
horus = { version = "0.1", default-features = false, features = ["macros"] }
Enabling mDNS discovery
[dependencies]
horus = { version = "0.1", features = ["mdns"] }
This pulls in the mdns-sd crate and enables automatic peer discovery on the local network.
horus_library (Message & Transform 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_library = { version = "0.1", features = ["wait"] }
// Only available with "wait" feature
let tf = tf_tree.wait_for_transform("lidar", "world", Duration::from_secs(1))?;
[dependencies]
horus_library = { version = "0.1", features = ["async-wait"] }
// 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 |
mdns | No | mDNS service discovery (mdns-sd v0.11) |
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.1", 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 |
|---|---|---|
mdns | No | mDNS discovery for horus CLI commands |
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 | mdns | No | mdns-sd |
horus_library | wait | No | — (condvar) |
horus_library | 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