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

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_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.

FeatureDefaultWhat It Enables
macrosYesIncludes horus_macros proc-macro crate
telemetryYesTelemetry export subsystem
blackboxYesFlight recorder subsystem
mdnsNomDNS service discovery (mdns-sd v0.11)
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.1", 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
mdnsNomDNS discovery for horus CLI commands
schemaNoJSON Schema generation for manifest types (schemars)

Summary Table

CrateFeatureDefaultDependency
horusmacrosYeshorus_macros
horustelemetryYes— (marker)
horusblackboxYes— (marker)
horusmdnsNomdns-sd
horus_librarywaitNo— (condvar)
horus_libraryasync-waitNotokio
horus_coretest-utilsNo— (marker)
horus_pyextension-moduleYespyo3
horus_managerschemaNoschemars

See Also