[package]
name = "corky"
version = "0.13.0"
edition = "2024"
description = "Sync email threads from IMAP to Markdown, draft replies, manage collaborators"
license = "Apache-2.0"
repository = "https://github.com/btakita/corky"
readme = "README.md"

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

[dependencies]
clap = { version = "4", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
toml_edit = "0.22"
anyhow = "1"
thiserror = "2"
imap = "2"
native-tls = "0.2"
mailparse = "0.15"
lettre = "0.11"
chrono = { version = "0.4", features = ["serde"] }
directories = "6"
regex = "1"
once_cell = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal", "sync", "time"] }
glob = "0.3"
libc = "0.2"
openssl = { version = "0.10", features = ["vendored"], optional = true }
tempfile = "3"
zip = "2"
filetime = "0.2.27"
ureq = { version = "2", features = ["json"] }
tiny_http = "0.12"
open = "5"
serde_yaml = "0.9"
mime_guess = "2"
instruction-files = { path = "../instruction-files", version = "0.1" }
whisper-rs = { version = "0.15", optional = true }
symphonia = { version = "0.5", optional = true, features = ["mp3", "isomp4", "aac", "alac", "pcm", "wav", "flac", "ogg", "vorbis"] }
rubato = { version = "0.16", optional = true }
hound = { version = "3.5", optional = true }
pyannote-rs = { version = "0.3", optional = true }
ort = { version = "=2.0.0-rc.10", optional = true, features = ["ndarray"] }

[features]
default = []
vendored-openssl = ["openssl"]
transcribe = ["whisper-rs", "symphonia", "rubato", "hound"]
transcribe-cuda = ["transcribe", "whisper-rs/cuda"]
diarize = ["transcribe", "pyannote-rs", "ort"]

[dev-dependencies]
assert_cmd = "2"
predicates = "3"
tempfile = "3"
pretty_assertions = "1"
mockito = "1"

[lints.rust]
warnings = "deny"

[lints.clippy]
# Allowed during Rust 2024 migration: clippy now suggests `if let` chains
# (a Rust 2024 feature) for nested if/if-let blocks. Fix incrementally.
collapsible_if = "allow"

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