[package]
name = "ttl"
version = "0.19.0"
edition = "2024"
rust-version = "1.88"
description = "Modern traceroute/mtr-style TUI with hop stats and optional ASN/geo enrichment"
license = "MIT OR Apache-2.0"
repository = "https://github.com/lance0/ttl"
keywords = ["traceroute", "mtr", "network", "tui", "diagnostics"]
categories = ["command-line-utilities", "network-programming"]

[dependencies]
# Async runtime
tokio = { version = "1", features = ["full"] }
tokio-util = "0.7"  # CancellationToken
futures = "0.3"     # join_all for parallel DNS

# TUI
ratatui = "0.30"
crossterm = "0.29"

# CLI
clap = { version = "4", features = ["derive"] }
clap_complete = "4.5"

# Networking
socket2 = { version = "0.6", features = ["all"] }
pnet = "0.35"
libc = "0.2"

# DNS (note: trust-dns-resolver is now hickory-resolver)
hickory-resolver = "0.25"

# HTTP client for PeeringDB API
reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] }

# ASN/Geo databases
maxminddb = "0.27"
ipnetwork = "0.21"

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.9"
csv = "1.3"
chrono = { version = "0.4", features = ["serde"] }

# Error handling
anyhow = "1"

# Better locks
parking_lot = "0.12"

# Cleanup guards
scopeguard = "1"

# Config directories
dirs = "6.0"

# Update notifications
update-informer = { version = "1", default-features = false, features = ["github", "ureq", "rustls-tls"] }

# TTY detection
is-terminal = "0.4"

# Gateway detection - Linux (netlink) and macOS (sysctl) only
# FreeBSD excluded: getifs uses macOS-specific APIs (NET_RT_IFLIST2, rt_msghdr)
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
getifs = "0.4"

[dev-dependencies]
tokio-test = "0.4"
proptest = "1.4"

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