[package]
name = "kelora"
version = "0.11.0"
edition = "2021"
authors = ["Dirk Loss <mail@dirk-loss.de>"]
description = "A command-line log analysis tool with embedded Rhai scripting"
license = "MIT"
repository = "https://github.com/dloss/kelora"
keywords = ["logging", "parser", "cli", "logfmt", "json"]
categories = ["command-line-utilities", "parsing"]

[dependencies]
# CLI and configuration
clap = { version = "4.0", features = ["derive"] }  # Command-line argument parsing and help generation

# Core functionality
rhai = { version = "1.23", features = ["sync", "debugging", "internals"] }  # Embedded scripting engine for log filtering and transformation
anyhow = "1.0"  # Error handling and propagation

# Serialization and parsing
serde = { version = "1.0", features = ["derive"] }  # Serialization framework foundation
serde_json = { version = "1.0", features = ["preserve_order"] }  # JSON log format parsing and output (preserve_order for deterministic field order)
nom = "8"  # Parser combinator library for logfmt and other text formats
csv = "1.3"  # CSV format parsing and output
regex = "1.10"  # Pattern matching for filters and field extraction

# Time handling
chrono = { version = "0.4", features = ["serde"] }  # Timestamp parsing, manipulation, and formatting
chrono-tz = "0.10"  # Timezone database for timestamp conversion
humantime = "2.1"  # Human-readable duration parsing (e.g., "5m", "1h30s")

# Multi-threading and concurrency
crossbeam-channel = "0.5"  # Lock-free channels for streaming pipeline communication between threads
num_cpus = "1.16"  # Auto-detection of CPU count for parallel processing

# Terminal and I/O
is-terminal = "0.4"  # Detect terminal vs pipe for intelligent output formatting
terminal_size = "0.4.3"  # Get terminal dimensions for formatted output
signal-hook = { version = "0.3", features = ["iterator"] }  # Graceful shutdown on SIGINT/SIGTERM

# Compression
flate2 = "1.0"  # Gzip/deflate decompression for reading compressed log files
zstd = "0.13"  # Zstandard decompression for reading .zst log files

# Data structures and utilities
indexmap = "2.0"  # Order-preserving hash maps for JSON objects and logfmt key-value pairs
shell-words = "1.1"  # Parsing shell-like command strings in config files
once_cell = "1.19"  # Lazy static initialization for global resources
lazy_static = "1.4"  # Static initialization for compiled regexes and constants
lru = "0.16"  # LRU cache for optimizing repeated operations
fastrand = "2.0"  # Fast random number generation for sampling

# Rhai built-in functions - encoding/decoding
base64 = "0.22"  # Base64 encoding/decoding exposed to Rhai scripts
hex = "0.4"  # Hex encoding/decoding exposed to Rhai scripts
urlencoding = "2.1"  # URL encoding/decoding exposed to Rhai scripts
html-escape = "0.2"  # HTML escaping exposed to Rhai scripts
unicode-normalization = "0.1"  # Unicode normalization (NFC, NFD, NFKC, NFKD) exposed to Rhai scripts

# Rhai built-in functions - cryptography and hashing
xxhash-rust = { version = "0.8", features = ["xxh3"] }  # Fast non-cryptographic hashing (XXH3) exposed to Rhai scripts
blake3 = "1.5"  # BLAKE3 cryptographic hashing exposed to Rhai scripts
sha2 = "0.10"  # SHA-256/SHA-512 hashing exposed to Rhai scripts
sha1 = "0.10"  # SHA-1 hashing exposed to Rhai scripts
md-5 = "0.10"  # MD5 hashing exposed to Rhai scripts
argon2 = "0.5"  # Argon2 password hashing exposed to Rhai scripts
hkdf = "0.12"  # HKDF key derivation exposed to Rhai scripts
hmac = "0.12"  # HMAC message authentication exposed to Rhai scripts

# Rhai built-in functions - networking
url = "2.5"  # URL parsing and manipulation exposed to Rhai scripts
ipnet = "2.9"  # IP address and network parsing/matching exposed to Rhai scripts

[dev-dependencies]
criterion = { version = "0.7", features = ["html_reports"] }  # Benchmarking framework with statistical analysis
tempfile = "3.8"  # Temporary file/directory creation for integration tests
proptest = "1.5"  # Property-based testing for fuzzing parser edge cases

[[bench]]
name = "micro_search"
path = "benchmarks/bench_micro_search.rs"
harness = false
