From f568d97b7ad41bdeeb4d07c61fad468bc83ad3f6 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 29 Nov 2026 01:24:49 +0000 Subject: config: clap, serde, toml and tracing are features, none default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A program names what it uses of the crate: * clap: the command line (arguments); * serde: what the values set are read into (layer::read), and durations and sizes as fields (units::duration_option, …); * toml: configuration files in TOML; without it a .toml file is refused, saying so, and files are JSON; * tracing: what a source replaces of an earlier one's, logged. continuum names all four. --- crates/config/Cargo.toml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'crates/config/Cargo.toml') diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index d8e75de..e46c8ef 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -9,10 +9,22 @@ edition = "2024" [lib] doctest = false +# None of them default: a program names what it uses. +[features] +# The command line (`arguments`): the options as arguments, `--config`, `--unset`. +clap = ["dep:clap"] +# What the values set are read into (`layer::read`), and durations and sizes as fields +# (`units::duration_option`, …). +serde = ["dep:serde"] +# Configuration files in TOML; without, in JSON alone. +toml = ["dep:toml"] +# What a source replaces of an earlier one's, logged. +tracing = ["dep:tracing"] + [dependencies] anyhow = "1.0" +clap = { version = "4.6", optional = true } +serde = { version = "1.0", optional = true } serde_json = "1.0" -clap = "4.6" -serde = { version = "1.0", features = ["derive"] } -toml = "1.1" -tracing = "0.1" +toml = { version = "1.1", optional = true } +tracing = { version = "0.1", optional = true } -- cgit v1.3.1