rusty-pee 0.1.0

Fan stdin out to N concurrent shell-spawned children — a Rust port of moreutils `pee` with strict-compat mode, exit-code aggregation (Default max / Strict bitwise OR), backpressure-paced byte-perfect delivery, and a typed library API.
Documentation
[package]
name = "rusty-pee"
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
authors = ["James Han <jsh562@users.noreply.github.com>"]
license = "MIT OR Apache-2.0"
description = "Fan stdin out to N concurrent shell-spawned children — a Rust port of moreutils `pee` with strict-compat mode, exit-code aggregation (Default max / Strict bitwise OR), backpressure-paced byte-perfect delivery, and a typed library API."
repository = "https://github.com/jsh562/rusty-pee"
homepage = "https://github.com/jsh562/rusty-pee"
documentation = "https://docs.rs/rusty-pee"
readme = "README.md"
keywords = ["pee", "moreutils", "tee", "pipe", "cli"]
categories = ["command-line-utilities"]

[features]
default = ["cli"]
# `cli` gates the CLI-only dependencies (clap, clap_complete, anyhow, signal-hook)
# so library consumers can depend on rusty-pee with `default-features = false`
# without pulling in the binary's argument-parsing surface.
cli = ["dep:clap", "dep:clap_complete", "dep:anyhow", "dep:signal-hook"]
# `pee-alias` adds a second binary entry named `pee` alongside `rusty-pee`.
# Both binaries share the same source — they differ only in installed name.
# argv[0] auto-detect (FR-012) routes `pee` invocations into Strict mode.
pee-alias = ["cli"]
# `bench` enables criterion benches in `benches/`. Off by default to keep
# `cargo install` minimal.
bench = ["dep:criterion"]
# `dev-helpers` gates the `fake-pee-child` `[[bin]]` used by integration tests.
# NOT enabled by `cargo install rusty-pee`, so the fake-pee-child helper never
# ships to end users. Enable with `cargo test --features dev-helpers` (CI does
# this automatically).
dev-helpers = []

[dependencies]
thiserror = "2"
# CLI-only deps gated behind the `cli` feature.
clap = { version = "4", features = ["derive", "env"], optional = true }
clap_complete = { version = "4", optional = true }
anyhow = { version = "1", optional = true }
# Unix signal handler — declared as optional at top level so the `cli` feature
# can reference it via `dep:signal-hook`. Source code gates usage with #[cfg(unix)].
signal-hook = { version = "0.3", optional = true }
# Bench-only dep gated behind the `bench` feature.
criterion = { version = "0.5", optional = true }

[target.'cfg(unix)'.dependencies]
# Used by signal.rs for child-process control + libc::WEXITSTATUS-like helpers.
libc = "0.2"

[target.'cfg(windows)'.dependencies]
# Windows console-control handler + TerminateProcess via windows-sys.
windows-sys = { version = "0.59", features = [
    "Win32_Foundation",
    "Win32_System_Console",
    "Win32_System_Threading",
    "Win32_Security",
] }

[dev-dependencies]
insta = { version = "1", features = ["yaml"] }
assert_cmd = "2"
predicates = "3"
tempfile = "3"
static_assertions = "1"

# Linux-only dev dep for the signal-injection / no-TTY fault-injection tests in
# `tests/signal_cleanup.rs`. Tests are `#[ignore]`'d at v0.1.0 — opt-in via
# `cargo test --features dev-helpers -- --ignored`.
[target.'cfg(target_os = "linux")'.dev-dependencies]
libc = "0.2"

[[bin]]
name = "rusty-pee"
path = "src/main.rs"
required-features = ["cli"]

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

[[bin]]
name = "fake-pee-child"
path = "tests/bin/fake_pee_child.rs"
required-features = ["dev-helpers"]
# Don't ship to end users.
test = false
doctest = false
bench = false

[[bench]]
name = "throughput"
harness = false
required-features = ["bench"]

[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }{ archive-suffix }"
bin-dir = "{ name }-v{ version }-{ target }/{ bin }{ binary-ext }"
pkg-fmt = "tgz"

[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"

[profile.release]
lto = "thin"
codegen-units = 1
strip = "symbols"