cli-forge 1.0.0

Unified CLI framework: runtime command registration with styled output through one API.
Documentation
# =============================================================================
#  R E P S   ยท   cli-forge
# =============================================================================
[package]
name    = "cli-forge"
version = "1.0.0"

# Minimum Supported Rust Version (MSRV)
rust-version = "1.85"
edition = "2024"

# License
license = "Apache-2.0 OR MIT"

# Readme
readme = "README.md"

# Description
description = "Unified CLI framework: runtime command registration with styled output through one API."

# Keywords (5 max)
keywords = ["cli", "command-line", "terminal", "framework"]

# Categories
categories = ["command-line-interface", "development-tools"]

# Links
homepage      = "https://github.com/jamesgober/cli-forge"
repository    = "https://github.com/jamesgober/cli-forge"
documentation = "https://docs.rs/cli-forge"

# Authors
authors = ["James Gober <me@jamesgober.com>"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

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


# FEATURE FLAGS
# #################################
[features]
default = ["std", "color"]
# Standard library: terminal detection and the stdout/stderr write paths.
std = []
# ANSI / styled output. Disable for plain output (the API stays complete; every
# styled value renders as its plain text). Implies `std`: rendering needs it.
color = ["std", "dep:enable-ansi-support"]
# Enforcement of the `requires_auth` command flag via the auth hook seam. Adds
# `App::auth` and `AuthRequest`. Implies `std` (part of the command layer).
auth = ["std"]


# DEPENDENCIES
# #################################
[dependencies]

# Windows-only. Enables the console's virtual-terminal (ANSI) processing so the
# same escape-sequence backend drives Linux, macOS, and the Windows console.
# Delegated to a crate because the crate root is `#![forbid(unsafe_code)]` and
# the enable call (SetConsoleMode) requires FFI. Pulled in only by the `color`
# feature on Windows targets.
[target.'cfg(windows)'.dependencies]
enable-ansi-support = { version = "0.2", optional = true }


# DEV DEPENDENCIES
# #################################
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
proptest  = "1"

[target.'cfg(loom)'.dev-dependencies]
loom = "0.7"


# BENCHMARKS
# #################################
[[bench]]
name             = "bench"
harness          = false
required-features = ["std"]


# EXAMPLES
# #################################
# Examples exercise the public output API, which is gated on `std`; declaring the
# requirement skips them cleanly under `--no-default-features`.
[[example]]
name             = "quick_start"
required-features = ["std"]

[[example]]
name             = "three_paths"
required-features = ["std"]

[[example]]
name             = "colors"
required-features = ["std"]

[[example]]
name             = "status_report"
required-features = ["std"]

[[example]]
name             = "commands"
required-features = ["std"]

[[example]]
name             = "arguments"
required-features = ["std"]

[[example]]
name             = "auth"
required-features = ["auth"]


# RELEASE PROFILE
# #################################
[profile.release]
opt-level     = 3
lto           = "fat"
codegen-units = 1
panic         = "abort"
strip         = "symbols"