noya-cli 0.0.13

Command-line tools for noyalib (noyafmt, noyavalidate)
Documentation
[package]
name = "noya-cli"
version = "0.0.13"
edition = "2024"
# clap 4.5 transitively pulls clap_builder 4.6 (edition 2024),
# which requires rustc 1.85+. Library users still build the
# noyalib core on 1.75; only the CLI binaries need the bump.
rust-version = "1.85.0"
license = "MIT OR Apache-2.0"
description = "Command-line tools for noyalib (noyafmt, noyavalidate)"
repository = "https://github.com/sebastienrousseau/noya-cli"
homepage = "https://github.com/sebastienrousseau/noya-cli"
documentation = "https://docs.rs/noya-cli"
readme = "README.md"
keywords = ["yaml", "cli", "formatter", "validator", "schema"]
categories = ["command-line-utilities", "encoding"]
authors = ["Sebastien Rousseau <sebastian.rousseau@gmail.com>"]
# Published to crates.io so end users can run
# `cargo install noya-cli` to get the `noyafmt` and `noyavalidate`
# binaries without cloning the repo. The `noyalib` library crate
# is published independently — keeping the binary crate distinct
# from the lib lets users embed `noyalib` without pulling clap +
# miette + the `validate-schema` chain into their own dep graph.
publish = true

[lib]
name = "noya_cli"
path = "src/lib.rs"

[[bin]]
name = "noyafmt"
path = "src/bin/noyafmt.rs"
required-features = ["noyafmt"]

[[bin]]
name = "noyavalidate"
path = "src/bin/noyavalidate.rs"
required-features = ["noyavalidate"]

[dependencies]
noyalib = { version = "=0.0.13", default-features = false }
clap    = { version = "4.5", features = ["derive", "wrap_help"] }
miette  = { version = "7", optional = true, features = ["fancy"] }

[build-dependencies]
clap          = { version = "4.5", features = ["derive"] }
clap_complete = "4.6"
clap_mangen   = "0.3"

[dev-dependencies]
criterion = "0.8"

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

[features]
# `noyavalidate` is the default so `cargo build` produces both
# binaries out of the box. Users who only want `noyafmt` opt in
# via `--no-default-features --features noyafmt`.
default = ["noyavalidate"]
noyafmt = ["noyalib/std"]
noyavalidate = ["noyafmt", "noyalib/noyavalidate", "dep:miette"]

# Package layout for `cargo generate-rpm` (release-binaries.yml).
# Binary sources use `target/release/...`; the workflow stages the
# stripped binaries there before packaging, and `--target` rewrites
# the path for cross builds.
[package.metadata.generate-rpm]
assets = [
    { source = "target/release/noyafmt", dest = "/usr/bin/noyafmt", mode = "0755" },
    { source = "target/release/noyavalidate", dest = "/usr/bin/noyavalidate", mode = "0755" },
    { source = "doc/noyafmt.1", dest = "/usr/share/man/man1/noyafmt.1", mode = "0644", doc = true },
    { source = "doc/noyavalidate.1", dest = "/usr/share/man/man1/noyavalidate.1", mode = "0644", doc = true },
    { source = "LICENSE-MIT", dest = "/usr/share/licenses/noya-cli/LICENSE-MIT", mode = "0644", doc = true },
    { source = "LICENSE-APACHE", dest = "/usr/share/licenses/noya-cli/LICENSE-APACHE", mode = "0644", doc = true },
]