diff options
| author | tv <tv@krebsco.de> | 2026-11-29 01:24:49 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-29 01:24:49 +0000 |
| commit | f568d97b7ad41bdeeb4d07c61fad468bc83ad3f6 (patch) | |
| tree | 4176b4be5bb27fcc6108a0c32c2da4376576a15f /crates/config/Cargo.toml | |
| parent | f10ee79ddc2b0a541f1011aa395990df21e456b5 (diff) | |
config: clap, serde, toml and tracing are features, none default
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.
Diffstat (limited to 'crates/config/Cargo.toml')
| -rw-r--r-- | crates/config/Cargo.toml | 20 |
1 files changed, 16 insertions, 4 deletions
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 } |
