rusty-sponge 0.1.0

Soak up stdin and write it atomically to a file — a Rust port of moreutils `sponge` with strict-compat mode, configurable spill-to-tempfile, and a typed library API.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "rusty-sponge"
version = "0.1.0"
authors = ["James Han <jsh562@users.noreply.github.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Soak up stdin and write it atomically to a file — a Rust port of moreutils `sponge` with strict-compat mode, configurable spill-to-tempfile, and a typed library API."
homepage = "https://github.com/jsh562/rusty-sponge"
documentation = "https://docs.rs/rusty-sponge"
readme = "README.md"
keywords = [
    "sponge",
    "moreutils",
    "atomic",
    "rewrite",
    "cli",
]
categories = [
    "command-line-utilities",
    "filesystem",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/jsh562/rusty-sponge"

[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"

[features]
bench = ["dep:criterion"]
cli = [
    "dep:clap",
    "dep:clap_complete",
    "dep:anyhow",
    "dep:signal-hook",
]
default = ["cli"]
sponge-alias = ["cli"]

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

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

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

[[test]]
name = "append_mode"
path = "tests/append_mode.rs"

[[test]]
name = "atomic_safety"
path = "tests/atomic_safety.rs"

[[test]]
name = "cli_errors"
path = "tests/cli_errors.rs"

[[test]]
name = "compat_default"
path = "tests/compat_default.rs"

[[test]]
name = "compat_strict"
path = "tests/compat_strict.rs"

[[test]]
name = "completions_drift"
path = "tests/completions_drift.rs"

[[test]]
name = "lib_api"
path = "tests/lib_api.rs"

[[test]]
name = "symlink"
path = "tests/symlink.rs"

[[bench]]
name = "throughput"
path = "benches/throughput.rs"
harness = false
required-features = ["bench"]

[dependencies.anyhow]
version = "1"
optional = true

[dependencies.clap]
version = "4"
features = [
    "derive",
    "env",
]
optional = true

[dependencies.clap_complete]
version = "4"
optional = true

[dependencies.criterion]
version = "0.5"
optional = true

[dependencies.signal-hook]
version = "0.3"
optional = true

[dependencies.tempfile]
version = "3"

[dependencies.thiserror]
version = "2"

[dev-dependencies.assert_cmd]
version = "2"

[dev-dependencies.insta]
version = "1"
features = ["yaml"]

[dev-dependencies.predicates]
version = "3"

[dev-dependencies.static_assertions]
version = "1"

[dev-dependencies.tempfile]
version = "3"

[target.'cfg(target_os = "linux")'.dev-dependencies.libc]
version = "0.2"

[target."cfg(windows)".dependencies.windows-sys]
version = "0.59"
features = [
    "Win32_System_Console",
    "Win32_Foundation",
]

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