[package]
name = "chronara"
version = "0.1.0"
description = "A meeting transcription and summarisation tool using local AI models"
authors = ["Naomi Carrigan <nhcarrigan@gmail.com>"]
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
# The `_lib` suffix may seem redundant but it is necessary
# to make the lib name unique and wouldn't conflict with the bin name.
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
name = "chronara_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

[build-dependencies]
tauri-build = { version = "2", features = [] }

[dependencies]
tauri = { version = "2", features = ["custom-protocol"] }
tauri-plugin-opener = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"

# ML libraries for transcription and summarization
whisper-rs = "0.14"
llama-cpp-2 = "0.1"

# Audio capture and processing
cpal = "0.15"
hound = "3.5"  # WAV file handling

# Voice activity detection
voice_activity_detector = "0.2"

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

# Utilities
parking_lot = "0.12"  # Better mutexes
thiserror = "2"  # Error handling
tracing = "0.1"  # Logging
tracing-subscriber = "0.3"

# HTTP client for model downloads
reqwest = { version = "0.12", features = ["stream", "rustls-tls"], default-features = false }
futures-util = "0.3"  # For StreamExt

[target.'cfg(windows)'.dependencies]
windows = { version = "0.62", features = [
    "Win32_System_Com",
    "Win32_Foundation",
    "Win32_Media_Audio",
    "Win32_Devices_Properties",
    "Win32_Media_KernelStreaming",
    "Win32_System_Com_StructuredStorage",
    "Win32_System_Threading",
    "Win32_Security",
    "Win32_System_SystemServices",
    "Win32_System_Variant",
    "Win32_Media_Multimedia",
    "Win32_UI_Shell_PropertiesSystem",
] }

[patch.crates-io]
# Fix cross-compilation: use CARGO_CFG_TARGET_OS instead of cfg!(windows)
llama-cpp-sys-2 = { path = "../patches/llama-cpp-sys-2" }

