Cargo Features

[dependencies]
rustfoundry = { version = "4.2.0", default-features = false, features = ["platform-common-default", "server-client-common-default", "settings", "settings_deny_unknown_fields_by_default", "telemetry", "client-telemetry", "telemetry-server", "telemetry-otlp-grpc", "tokio-runtime-metrics", "logging", "tracing", "metrics", "memory-profiling", "security", "jemalloc", "cli", "testing", "panic_on_too_much_logger_nesting", "async-stream", "local-ip-address", "lock_api", "log", "parking_lot_core", "regex", "thiserror", "neli", "neli-proc-macros"] }
default = platform-common-default, security

Default set of features.

platform-common-default default = cli, jemalloc, panic_on_too_much_logger_nesting, settings, settings_deny…fields_by_default, telemetry, testing

All non platform-specific features

server-client-common-default = client-telemetry, settings, testing

A subset of features that can be used both on server and client sides. Useful for libraries that can be used either way.

settings cli? platform-common-default server-client-common-default?

Enables serializable documented settings functionality.

Enables indexmap, rustfoundry-macros, serde, serde_path_to_error, serde_yaml ^0.8.26, and yaml-merge-keys ^0.5

Affects rustfoundry::settings

settings_deny_unknown_fields_by_default platform-common-default

Whether settings structs annotated with #[settings] will, by default, error on unknown fields.

Enables settings_deny…fields_by_default of optional rustfoundry-macros

telemetry platform-common-default = client-telemetry, logging, memory-profiling, metrics, telemetry-otlp-grpc, telemetry-server, tracing

Enables all the telemetry-related features ("logging", "metrics", "tracing", "telemetry-server").

Enables futures-util

Affects rustfoundry::telemetry

client-telemetry server-client-common-default? telemetry? = logging, metrics, tracing

Enables a subset of telemetry features suitable for usage in clients.

Enables futures-util

telemetry-server telemetry?

Enables the telemetry server.

Enables hyper ^0.14, percent-encoding, and socket2

Affects telemetry::TelemetryConfig.custom_server_routes, settings::TelemetrySettings.server

telemetry-otlp-grpc telemetry?

Enables telemetry reporting over gRPC

Enables hyper ^0.14, tokio, and tonic ^0.11.0

tokio-runtime-metrics = metrics

Enables experimental tokio runtime metrics

Enables serde, slab, and tokio

Affects telemetry::tokio_runtime_metrics

logging client-telemetry? telemetry?

Enables logging functionality.

Enables futures-util, governor ^0.6, once_cell, parking_lot, serde, slog, slog-async, slog-json, slog-term, and thread_local

Affects telemetry::log, settings::TelemetrySettings.logging, rustfoundry::telemetry

tracing client-telemetry? telemetry?

Enables distributed tracing functionality.

Enables cf-rustracing, cf-rustracing-jaeger, futures-util, governor ^0.6, once_cell, opentelemetry-proto ^0.5.0, parking_lot, rand, rustfoundry-macros, serde, thread_local, and tokio

Affects telemetry::tracing, settings::TelemetrySettings.tracing, rustfoundry::telemetry

metrics client-telemetry? telemetry? tokio-runtime-metrics?

Enables metrics functionality.

Enables erased-serde ^0.3.28, futures-util, once_cell, parking_lot, prometheus, prometheus-client ^0.18.1, prometools, rustfoundry-macros, serde, and serde_with

Affects log::log_volume, telemetry::metrics, settings::TelemetrySettings.metrics, rustfoundry::telemetry

memory-profiling telemetry? = jemalloc

Enables memory profiling features (require jemalloc feature to be enabled)

Enables once_cell, tempfile, tikv-jemalloc-ctl ^0.5, and tokio

Affects settings::TelemetrySettings.memory_profiler

security default

Enables security-related features

Enables bindgen ^0.68.1, cc, and once_cell

Affects rustfoundry::security

jemalloc memory-profiling? platform-common-default

Enables jemalloc as a memory allocator

Enables tikv-jemallocator ^0.5

Affects rustfoundry::JEMALLOC_MEMORY_ALLOCATOR

cli platform-common-default = settings

Enables command line interface functionality.

Enables clap

Affects rustfoundry::cli

testing platform-common-default server-client-common-default?

Enables testing-related functionality.

Enables rustfoundry-macros

panic_on_too_much_logger_nesting platform-common-default

Enables panicking when too much nesting is reached on the logger

Features from optional dependencies

async-stream implicit feature

Enables async-stream

needed for minver purposes

local-ip-address implicit feature

Enables local-ip-address ^0.5.7

local-ip-address:

Retrieve system's local IP address and Network Interfaces/Adapters on Linux, macOS and Windows

lock_api implicit feature

Enables lock_api

lock_api:

Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std.

log implicit feature

Enables log

log:

A lightweight logging facade for Rust

parking_lot_core implicit feature

Enables parking_lot_core

parking_lot_core:

An advanced API for creating custom synchronization primitives

regex implicit feature
thiserror implicit feature

Enables thiserror ^1.0.56

thiserror:

derive(Error)

neli linux implicit feature

Enables neli

neli:

Type safe netlink library written in Rust

neli-proc-macros linux implicit feature

Enables neli-proc-macros

neli-proc-macros:

Procedural macros for neli