Cargo Features

cli-batteries has no features set by default.

[dependencies]
cli-batteries = { version = "0.5.0", features = ["signals", "mock-shutdown", "metered-allocator", "tokio-console", "mimalloc", "rand", "rayon", "prometheus", "otlp", "criterion", "proptest"] }
signals

Enables signal of tokio

Affects shutdown::watch_signals

mock-shutdown

Affects shutdown::reset_shutdown

metered-allocator = prometheus

Affects allocator::ALLOCATOR, allocator::ALLOCATOR

tokio-console

Enables console-subscriber ^0.1

Affects trace::Options.tokio_console, tokio_console::Options.tokio_console

mimalloc

Enables mimalloc

Mimalloc feature

Affects allocator::ALLOCATOR, allocator::ALLOCATOR

rand

Enables rand and rand_chacha

rand:

Rand feature

rayon

Enables num_cpus and rayon

rayon:

Rayon feature

prometheus metered-allocator?

Enables url

Optional dependencies

and hyper ^0.14.17 and prometheus

prometheus:

Prometheus feature

otlp

Enables heck ^0.4, http ^0.2.8, opentelemetry ^0.18, opentelemetry-http ^0.7, opentelemetry-otlp ^0.11, opentelemetry-semantic-conventions ^0.10, serde, serde_json, tracing-opentelemetry ^0.18, and url

serde:

OpenTelemetry Using an older version because tracing-opentelemetry does not support 0.19.

Features from optional dependencies

criterion implicit feature

Enables criterion ^0.4

criterion:

Statistics-driven micro-benchmarking library

proptest implicit feature

Enables proptest

proptest:

Hypothesis-like property-based testing and shrinking