[package]
name = "voxtype"
version = "0.4.2"
edition = "2021"
authors = ["Peter Jackson", "Jean-Paul van Tillo", "Máté Rémiás"]
description = "Push-to-talk voice-to-text for Wayland"
license = "MIT"
readme = "README.md"
keywords = ["voice", "speech", "whisper", "wayland", "linux"]
categories = ["multimedia::audio", "accessibility"]

[dependencies]
# Async runtime
tokio = { version = "1", features = ["full", "signal", "sync", "time", "process", "io-util"] }

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

# Configuration
serde = { version = "1", features = ["derive"] }
toml = "0.8"
directories = "5"

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

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

# Text processing
regex = "1"

# Async traits
async-trait = "0.1"

# Input handling (evdev for kernel-level key events)
evdev = "0.12"
libc = "0.2"
inotify = "0.10"  # Watch /dev/input for device hotplug
nix = { version = "0.29", features = ["signal", "process"] }  # Unix signals for IPC

# Audio capture
cpal = "0.15"
hound = "3"  # WAV file reading/writing

# Audio playback (for feedback sounds)
rodio = { version = "0.19", default-features = false, features = ["wav"] }

# Whisper speech-to-text
whisper-rs = "0.15.1"


# CPU count for thread detection
num_cpus = "1.16"

# File watching for status --follow
notify = "6"

[features]
default = []
gpu-vulkan = ["whisper-rs/vulkan"]
gpu-cuda = ["whisper-rs/cuda"]
gpu-metal = ["whisper-rs/metal"]
gpu-hipblas = ["whisper-rs/hipblas"]

[dev-dependencies]
tempfile = "3"

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

[profile.dev]
opt-level = 1  # Faster dev builds, whisper still usable

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