[package] name = "cli-batteries" description = "Batteries included opinionated command line interfaces" authors = ["Remco Bloemen "] version = "0.5.0" edition = "2021" homepage = "https://github.com/recmo/cli-batteries" repository = "https://github.com/recmo/cli-batteries" keywords = ["logging", "cli"] categories = ["command-line-interface"] readme = "Readme.md" license = "MIT" [features] default = [ ] signals = [ "tokio/signal" ] mock-shutdown = [] metered-allocator = [ "prometheus" ] tokio-console = [ "dep:console-subscriber" ] mimalloc = [ "dep:mimalloc" ] rand = [ "dep:rand", "dep:rand_chacha" ] rayon = [ "dep:rayon", "dep:num_cpus" ] prometheus = [ "dep:prometheus", "dep:hyper", "dep:url" ] otlp = [ "dep:url", "dep:http", "dep:serde", "dep:serde_json", "dep:tracing-opentelemetry", "dep:opentelemetry", "dep:opentelemetry-otlp", "dep:opentelemetry-http", "dep:opentelemetry-semantic-conventions", "dep:heck", ] [dependencies] ansi_term = "0.12.1" chrono = "0.4" clap = { version = "4.0", features = [ "derive", "env", "unicode", "wrap_help" ] } color-eyre = { version = "0.6", features = [ "issue-url" ] } criterion = { version = "0.4", optional = true, features = [ "async_tokio" ] } eyre = "0.6" futures = "0.3" hex = "0.4.3" hex-literal = "0.4" itertools = "0.10" once_cell = "1.12" proptest = { version = "1.0", optional = true } thiserror = "1.0" tokio = { version = "1.17", features = [ "rt-multi-thread", "sync", "macros", "tracing", "time" ] } tracing = "0.1" tracing-serde = "0.1" tracing-log = { version = "0.1.3", features = [ "interest-cache" ] } tracing-error = "0.2" tracing-futures = "0.2" tracing-subscriber = { version = "0.3.15", features = [ "env-filter", "json", "tracing-log", "smallvec", "parking_lot" ] } tracing-flame = "0.2.0" users = "0.11" # Optional dependencies url = { version = "2.2", optional = true } # tokio-console console-subscriber = { version = "0.1", optional = true } # Mimalloc feature mimalloc = { version = "0.1", optional = true } # Rand feature rand = { version = "0.8.5", optional = true } rand_chacha = { version = "0.3.1", optional = true } # Rayon feature rayon = { version = "1.5.3", optional = true } num_cpus = { version = "1.13.1", optional = true } # Prometheus feature prometheus = { version = "0.13", features = [ "process" ], optional = true } hyper = { version = "^0.14.17", features = [ "server", "tcp", "http1", "http2" ], optional = true } # OpenTelemetry # Using an older version because `tracing-opentelemetry` does not support 0.19. serde = { version = "1.0", optional = true } serde_json = { version = "1.0", optional = true } tracing-opentelemetry = { version = "0.18", optional = true } opentelemetry = { version = "0.18", features = ["rt-tokio"], optional = true } opentelemetry-otlp = { version = "0.11", optional = true } opentelemetry-semantic-conventions = { version = "0.10", optional = true } opentelemetry-http = { version = "0.7", optional = true } heck = { version = "0.4", optional = true } http = { version = "0.2.8", optional = true } # TODO: Do we need this? time = { version = "0.3.5", features = [ "formatting", "parsing" ] } [dev-dependencies] proptest = { version = "1.0" } tracing-test = "0.2" tokio = { version = "1.17", features = [ "fs", "io-util" ] } [profile.release] codegen-units = 1 lto = true panic = "abort" overflow-checks = true strip = true # Compilation profile for any non-workspace member. # Dependencies are optimized, even in a dev build. This improves dev performance # while having neglible impact on incremental build times. [profile.dev.package."*"] opt-level = 3