[package]
name = "s3m"
version = "0.16.0"
authors = ["Nicolas Embriz <nbari@tequila.io>"]
description = "CLI for streams of data in S3 buckets"
documentation = "https://github.com/s3m/s3m/blob/master/README.md"
homepage = "https://s3m.stream"
repository = "https://github.com/s3m/s3m"
readme = "README.md"
keywords = ["s3", "stream", "upload", "resume", "bucket"]
categories = ["command-line-utilities", "command-line-interface"]
license = "BSD-3-Clause"
edition = "2024"

[lints.rust]
warnings = "deny"

[lints.clippy]
# Allow unstable/opinionated lints (lower priority so individual lints can override)
nursery = { level = "allow", priority = -1 }

# Enforce pedantic lints
pedantic = "deny"

# Core lint groups
all = "deny"
correctness = "deny"
suspicious = "deny"
perf = "deny"
complexity = "deny"

# Safety-critical lints
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
indexing_slicing = "deny"
await_holding_lock = "deny"

# Performance + memory reliability
needless_borrow = "deny"
needless_collect = "deny"
large_stack_arrays = "deny"

[dependencies]
anyhow = "1"
base64ct = { version = "1.8", features = ["alloc"] }
rkyv = { version = "0.8", features = ["bytecheck"] }
blake3 = "1"
bytes = "1"
bytesize = "2"
chacha20poly1305 = { version = "0.10.1", features = ["stream"] }
chrono = "0.4"
clap = { version = "4", features = ["env", "string"] }
colored = "3"
crc32c = "0.6"
crc32fast = "1.5"
dirs = "6"
env_logger = "0.11"
futures = "0.3"
http = "1"
indicatif = "0.18"
log = "0.4"
md5 = "0.8"
num_cpus = "1.17"
percent-encoding = "2.3"
quick-xml = { version = "0.39", features = ["serialize"] }
rand = "0.10.0"
regex = "1.12"
reqwest = { version = "0.13", default-features = false, features = ["stream", "rustls"] }
ring = "0.17"
secrecy = { version = "0.10.3", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml_ng = "0.10"
sled = "0.34"
temp-env = "0.3.6"
tempfile = "3"
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1.18"
tokio-util = { version = "0.7", features = ["codec"] }
url = "2.5"
zstd = "0.13"

[package.metadata.generate-rpm]
assets = [
    { source = "target/release/s3m", dest = "/usr/bin/s3m", mode = "0755" },
]

[package.metadata.deb]
assets = [
  ["target/release/s3m", "/usr/bin/s3m", "755"],
]
depends = ""

[dev-dependencies]
criterion = { version = "0.8", features = ["async_futures"] }
mockito = "1.7.2"
testcontainers = "0.27"

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

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

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

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"
