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"
FeatureDefaultWhat It Enables
macrosYesProcedural macros: message!, service!, action!, node!, hlog!
telemetryYesLive monitoring export (HTTP, UDP, file)
blackboxYesPost-mortem flight recorder via .blackbox(size_mb)
netNoLAN 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.

FeatureDefaultWhat It Enables
waitNoBlocking wait_for_transform() using condvar — zero overhead when disabled
async-waitNoAsync 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.

FeatureDefaultWhat It Enables
macrosYesIncludes horus_macros proc-macro crate
telemetryYesTelemetry export subsystem
blackboxYesFlight recorder subsystem
test-utilsNoTest 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)

FeatureDefaultWhat It Enables
extension-moduleYesRequired 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)

FeatureDefaultWhat It Enables
schemaNoJSON Schema generation for manifest types (schemars)

Summary Table

CrateFeatureDefaultDependency
horusmacrosYeshorus_macros
horustelemetryYes— (marker)
horusblackboxYes— (marker)
horusnetNohorus_net
horus-tfwaitNo— (condvar)
horus-tfasync-waitNotokio
horus_coretest-utilsNo— (marker)
horus_pyextension-moduleYespyo3
horus_managerschemaNoschemars

See Also

Spotted an error on this page?