[package]
name = "msy"
version = "0.4.9"
edition = "2024"
authors = ["Nick Russo <nijaru7@gmail.com>", "<github.com/pepa65>"]
description = "Modern musl rsync alternative - Fast, parallel file synchronization"
repository = "https://github.com/pepa65/msy"
license = "MIT"
keywords = ["rsync", "sync", "file-transfer", "backup", "cli"]
categories = ["command-line-utilities", "filesystem"]
exclude = [
    "tmp/",
    "ai/",
    "scripts/",
    "man/",
    "templates/",
    ".claude/",
    ".github/",
    "benches/",
    "AGENTS.md",
    "CLAUDE.md",
    "CONTRIBUTING.md",
    "deny.toml",
]

[features]
default = ["ssh"]
acl = ["exacl"]
s3 = ["object_store"]
gcs = ["object_store"]
ssh = ["dep:ssh2", "dep:whoami", "dep:regex"]
watch = ["dep:notify"]

[dependencies]
# CLI & Config
clap = { version = "4", features = ["derive", "env", "color"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
chrono = "0.4"

# Async runtime (Phase 2: used for transport abstraction)
tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "io-util", "io-std", "process", "time", "sync", "signal"] }
async-trait = "0.1"

# Filesystem
ignore = "0.4"
filetime = "0.2"
tempfile = "3"
glob = "0.3"
notify = { version = "6.0", optional = true }
libc = "0.2"
bincode = "1.3"
fs2 = "0.4"  # Cross-platform file locking

# Progress & Logging
indicatif = "0.17"
colored = "2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# Error handling
anyhow = "1"
thiserror = "1"

# Hash functions (for future phases, included now to avoid rebuild churn)
xxhash-rust = { version = "0.8", features = ["xxh3"] }
blake3 = "1"
hex = "0.4"
base64 = "0.22"

# Compression
zstd = "0.13"  # Level 3: 8.7 GB/s, best ratio
lz4_flex = "0.11"  # 23 GB/s, faster but lower ratio

# Parallel processing
rayon = "1.10"
num_cpus = "1.16"  # CPU count detection for parallel scanning

# Scale (Phase 11)
fastbloom = "0.7"  # Bloom filters for efficient deletion checks

# SSH (Phase 2) - Optional feature
ssh2 = { version = "0.9", optional = true, features = ["vendored-openssl"] }
whoami = { version = "1", optional = true }
dirs = "5"
regex = { version = "1", optional = true }
futures = "0.3.31"

# Database (Phase 5b)
fjall = "2.11.2"

# S3 / Cloud Storage (Phase 10) - Optional feature
object_store = { version = "0.12.4", features = ["aws", "gcp"], optional = true }
bytes = "1.11.1"
crossbeam-channel = "0.5.15"
memmap2 = "0.9.9"
bitflags = "2.10.0"

# Platform-specific dependencies
[target.'cfg(unix)'.dependencies]
xattr = "1.3"
exacl = { version = "0.12", optional = true }

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.52", features = ["Win32_Storage_FileSystem"] }

[dev-dependencies]
criterion = "0.5"
tempfile = "3"
proptest = "1"
serial_test = "3.0"

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

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

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

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

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

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

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

[[bin]]
name = "sy"
path = "src/main.rs"

[[bin]]
name = "sy-remote"
path = "src/bin/sy-remote.rs"

[[bin]]
name = "sy-bench-gen"
path = "src/bin/sy-bench-gen.rs"

[[bin]]
name = "sy-scan"
path = "src/bin/sy-scan.rs"

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