[package]
name = "record-daemon"
version = "0.1.0"
edition = "2021"
description = "High-performance League of Legends recording daemon using libobs"
authors = ["LeagueRecorder"]
license = "MIT"

[dependencies]
# Async runtime
tokio = { version = "1", features = ["full"] }

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "1.0"

# WebSocket for LQP (with TLS support)
tokio-tungstenite = { version = "0.21", features = ["rustls-tls-webpki-roots"] }
rustls = "0.22"
rustls-pki-types = "1"

# HTTP client for LQP REST API
reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls"] }

# Async utilities
futures = "0.3"
async-trait = "0.1"

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

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-appender = "0.2"

# UUID for recording IDs
uuid = { version = "1", features = ["v4", "serde"] }

# Date/time
chrono = { version = "0.4", features = ["serde"] }

# Locking primitives
parking_lot = "0.12"

# Crossbeam channels
crossbeam = "0.8"

# Unix socket IPC
tokio-util = { version = "0.7", features = ["codec"] }

# Configuration directories
directories = "6"

# CLI (for debugging and control)
clap = { version = "4", features = ["derive"] }

# Base64 for LQP authentication
base64 = "0.22"

# Regex for lockfile parsing
regex = "1"

# OBS recording library
libobs-simple = { version = "8.0.1" }
libobs-bootstrapper = { version = "0.4.0", features = ["install_dummy_dll"] }
libobs-wrapper = { version = "9.0.4" }

# Display info for monitor capture
display-info = "0.5"

# Signal handling for graceful shutdown (Unix only)
[target.'cfg(unix)'.dependencies]
signal-hook = "0.4"
signal-hook-tokio = { version = "0.4", features = ["futures-v0_3"] }

# Windows-specific dependencies
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["winuser", "winreg", "winnt"] }
winreg = "0.56"

[dev-dependencies]
# Testing utilities
tokio-test = "0.4"
tempfile = "3"

[[bin]]
name = "record-daemon"
path = "src/main.rs"

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