Cargo Features

[dependencies]
ockam_node = { version = "0.135.0", default-features = false, features = ["std", "no_std", "alloc", "dump_internals", "metrics", "debugger", "watchdog", "storage"] }
default = std

The std feature is set by default whenever ockam_node is added without default-features = false somewhere in the dependency tree.

std default storage? = alloc, fs2, opentelemetry, storage, tokio, tracing-error, tracing-opentelemetry, tracing-subscriber

Feature (enabled by default): "std" enables functionality expected to be available on a standard platform.

Enables std of futures, minicbor, ockam_core, ockam_transport_core, and once_cell

Affects compat::asynchronous, ockam_node::runtime, ockam_node::spawn, storage::database, debugger::generate_graphs

no_std = heapless

Feature: "no_std" enables functionality required for platforms without the standard library.

Enables no_std of ockam_core and ockam_transport_core

alloc std

Feature: "alloc" enables support for heap allocation (implied by feature = "std")

Enables alloc of futures, minicbor, ockam_core, and ockam_executor

dump_internals

Feature: "dump_internals" when set, will dump the internal state of workers at startup via the trace! macro.

metrics

TODO should these features be combined?

debugger

Feature: "debugger" enables functionality to trace addresses and message flows within Ockam apps.

Enables debugger of ockam_core

Affects debugger::display_log, debugger::generate_graphs

watchdog = nix

Feature: "watchdog" reports blocking task that compromise the runtime neeeds to be compiled with RUSTFLAGS="--cfg tokio_unstable"

storage std = regex, serde_json, sqlx, sqlx-core, sqlx-postgres, sqlx-sqlite, std, tempfile, time, tokio-retry

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

fs2 std
heapless no_std?
nix watchdog?
ockam_executor alloc?
ockam_transport_core no_std? std
once_cell std
opentelemetry std

Enables opentelemetry ^0.26.0

regex storage?
serde_json storage?
sqlx storage?
sqlx-core storage?
sqlx-postgres storage?
sqlx-sqlite storage?
tempfile storage?
time storage?
tokio std
tokio-retry storage?
tracing-error std
tracing-opentelemetry std

Enables tracing-opentelemetry ^0.27.0

tracing-subscriber std