usage-lib 6.3.0

Library for working with usage specs
Documentation
[package]
name = "usage-lib"
edition = "2021"
version = "6.3.0"
rust-version = "1.95"
include = [
    "/Cargo.toml",
    "/Cargo.lock",
    "/README.md",
    "/NOTICE.md",
    "/src/**/*.rs",
    "/src/**/*.tera",
    "/third-party/**/*",
]
description = "Library for working with usage specs"
homepage = { workspace = true }
documentation = { workspace = true }
repository = { workspace = true }
authors = { workspace = true }
license = { workspace = true }

[lib]
name = "usage"

[dependencies]
clap = { version = "4", features = ["derive", "env", "string"], optional = true }
heck = "0.5"
indexmap = { version = "2", features = ["serde"] }
itertools = "0.15"
log = "0.4"
miette = { version = "7", default-features = false, optional = true }
num-traits = "0.2"
regex = "1"
roff = { version = "1.0", optional = true }
semver = "1"
serde = { version = "1", features = ["derive"] }
shell-words = "1"
strum = { version = "0.28", features = ["derive"] }
tera = { version = "2", optional = true }
thiserror = "2"
unicode-width = "0.1"
# `unstable-recover` is explicitly semver-exempt, so pin the parser version we test.
winnow = { version = "=0.7.15", features = ["alloc", "unstable-recover"] }
# No `xx`: three helpers (a lazy-regex macro, `file::read_to_string`, `check_status`) were
# worth 21 crates in every dependent's tree — duct, homedir, nix, rand and their libc
# subtrees — including one that ran in an adopter's build script.
# `LazyLock` and `std::fs` cover all three, so nothing here needs a process library.
usage-validation = { workspace = true, optional = true }

[features]
default = ["docs"]
# CLI help is useful to lightweight consumers that do not generate Markdown or manpages.
cli-help = ["tera"]
docs = ["cli-help", "roff"]
# Let applications that already use miette pass usage errors directly to their reporter.
miette = ["dep:miette"]
validation = ["dep:usage-validation"]
unstable_choices_env = []

[dev-dependencies]
criterion = "0.8"
ctor = "1"
insta = "1"
pretty_assertions = "1"
serde_json = "1"
shell-words = "1"
tempfile = "3"

[[bench]]
name = "parse"
harness = false

[package.metadata.release]
shared-version = true
release = true