[package]
name = "linthis"
version = "0.6.0"
edition = "2021"
authors = ["zhlinh"]
description = "A fast, cross-platform multi-language linter and formatter"
license = "MIT"
repository = "https://github.com/zhlinh/linthis"
homepage = "https://github.com/zhlinh/linthis"
documentation = "https://docs.rs/linthis"
keywords = ["lint", "format", "cli", "code-quality"]
categories = ["command-line-utilities", "development-tools"]
readme = "README.md"

[dependencies]
# CLI
clap = { version = "4.3", features = ["derive"] }

# Error handling
anyhow = "1.0"
thiserror = "1.0"

# Serialization & Config
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
toml = "0.5"
toml_edit = "0.22"  # For preserving TOML format when editing config files

# File system
walkdir = "2.3"

# Parallel processing
rayon = "1.7"

# Output
colored = "2.0"

# Regex
regex = "1.8"

# HTTP client (for AI API calls)
# Use rustls-tls to avoid OpenSSL dependency on Linux
reqwest = { version = "0.11", default-features = false, features = ["blocking", "json", "rustls-tls"] }

# Glob pattern matching
globset = "0.4"

# Diff algorithm
similar = "2.4"

# Lazy initialization
lazy_static = "1.4"

# Fast hashing (for file cache)
xxhash-rust = { version = "0.8", features = ["xxh64"] }

# Logging
log = "0.4"
env_logger = "0.10"

# Platform directories (for plugin cache)
directories = "5.0"

# Date/time (for plugin metadata)
chrono = { version = "0.4", features = ["serde"] }

# File locking (for cache operations)
fs2 = "0.4"

# LSP Server
tower-lsp = "0.20"
# Only include tokio features actually used (not "full")
tokio = { version = "1", features = ["rt-multi-thread", "sync", "io-std", "io-util", "net", "macros"] }
async-trait = "0.1"

# Watch mode - file system watching
notify = "6.1"

# TUI framework
ratatui = "0.28"
crossterm = "0.28"

# Desktop notifications (optional)
notify-rust = { version = "4.10", optional = true }

[features]
default = []
notifications = ["dep:notify-rust"]

[dev-dependencies]
tempfile = "3"

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

[profile.release]
lto = true
codegen-units = 1
strip = true

# Fast release build for development (use with: cargo build --profile dev-release)
[profile.dev-release]
inherits = "release"
lto = false           # Skip LTO for faster builds
codegen-units = 16    # Parallel codegen
