ctl-input 0.8.0-rc.2

Declared input for CLIs: parse YAML, JSON or TOML, validate once, and report every problem on its file and line
Documentation
[package]
name = "ctl-input"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
description = "Declared input for CLIs: parse YAML, JSON or TOML, validate once, and report every problem on its file and line"
license.workspace = true
repository.workspace = true
keywords = ["cli", "config", "yaml", "json", "toml"]
categories = ["command-line-interface", "config"]
autotests = false

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cap-lints", "warn"]

[lints]
workspace = true

[features]
## Declared input from YAML: the `YAML` format reads a text into the located
## tree with serde-saphyr, and every problem is placed on its file and line
## from that tree. Adds the YAML-only `Limits` fields and the repository's
## `.ctl/input.yaml`. Needs no garde without `validate`.
yaml = ["dep:serde", "dep:serde-saphyr"]

## Declared input from TOML: the `TOML` format reads a text into the located
## tree with the `toml` crate, so `Input::open` reads `.toml` files and each
## problem is placed on its line and column. Needs no YAML crate, and no garde
## without `validate`.
toml = ["dep:serde", "dep:toml"]

## Declared input from JSON: the `JSON` format reads a text into the located
## tree with its own strict RFC 8259 reader, so `Input::open` reads `.json`
## files and each problem is placed on its line and column. Needs no JSON
## crate, no YAML crate, and no garde without `validate`.
json = ["dep:serde"]

## Validate with garde: `Input::check` and `Input::load`.
validate = ["dep:garde"]

[dependencies]
document-features.workspace = true
garde = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
serde-saphyr = { workspace = true, optional = true }
toml = { workspace = true, optional = true }

[dev-dependencies]
garde = { workspace = true, features = ["derive"] }
indoc.workspace = true
insta.workspace = true
serde.workspace = true
serde_json.workspace = true

# One integration binary, so the tests link once.
[[test]]
name = "it"
path = "tests/it/main.rs"
required-features = ["yaml", "json", "toml"]