[package]
name = "owncord-client"
version = "1.1.0-alpha.2"
edition = "2021"
# Effective minimum: tauri 2.11 declares rust-version = "1.77.2", so the crate
# cannot build below it. Declaring it here enables Cargo's MSRV-aware resolver
# warning instead of silently following whatever toolchain is installed.
rust-version = "1.77.2"
description = "OwnCord Desktop Client"

# Crate-level lint policy so hardening ships with every build, not only the CI
# `cargo clippy -- -D warnings` gate (which downstream/local builds don't run).
# Enables the allow-by-default rustc lints governing the Win32 FFI unsafe path.
[lints.rust]
unsafe_op_in_unsafe_fn = "deny"
unused_unsafe = "warn"

[lib]
name = "owncord_client_lib"
crate-type = ["lib", "cdylib", "staticlib"]

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

[features]
default = []
devtools = ["tauri/devtools"]

[dependencies]
tauri = { version = "2", features = ["tray-icon"] }
tauri-plugin-store = "2"
tauri-plugin-notification = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Self-signed server certificates are handled by the Rust TOFU proxies
# (ws_proxy, livekit_proxy, http_proxy), NOT by the plugin's dangerous-settings
# feature — REST traffic is tunneled through http_proxy which pins the cert to
# the trust-on-first-use fingerprint. The plugin therefore does default TLS
# validation (used only for external hosts: image CDNs, OG previews, YouTube).
tauri-plugin-http = { version = "2.5.7", features = ["rustls-tls"] }
tauri-plugin-opener = "2"
tauri-plugin-dialog = "2"
tauri-plugin-fs = "2"
# Minor-pinned per the plugin's own guidance: configure_client hands it a
# preconfigured rustls ClientConfig, and a 2.x minor bump can change the
# plugin's bundled reqwest/rustls and break that seam at runtime.
tauri-plugin-updater = "2.10"
tauri-plugin-process = "2"
url = "2"
tokio-tungstenite = { version = "0.28.0", features = ["rustls-tls-webpki-roots"] }
futures-util = "0.3.32"
tokio = { version = "1", features = ["sync", "net", "io-util", "rt", "macros"] }
tokio-rustls = { version = "0.26", default-features = false }
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
# Mozilla root bundle for the updater's HostScopedVerifier: non-pinned hosts
# (the GitHub installer download) get web-PKI validation. Already in the
# dependency tree via tokio-tungstenite's rustls-tls-webpki-roots feature.
webpki-roots = "1"
ring = "0.17"
log = "0.4"
# Writes Rust logs to a rotating file under the OS app-log dir (alongside the
# TS client-logs) so a shipped user can retrieve them — a release build detaches
# the console, so stdout/stderr logging is otherwise unreachable.
tauri-plugin-log = "2"
keyring = "3"
rfd = { version = "0.16", default-features = false }

# Desktop-only plugins (no mobile bundle target). single-instance carries the
# "deep-link" feature so an owncord:// link fired at a running app is forwarded
# to it instead of spawning a duplicate window.
[target.'cfg(any(target_os = "macos", windows, target_os = "linux"))'.dependencies]
tauri-plugin-single-instance = { version = "2", features = ["deep-link"] }
tauri-plugin-window-state = "2"
tauri-plugin-autostart = "2"
tauri-plugin-deep-link = "2"

[target.'cfg(windows)'.dependencies]
windows = { version = "0.58", features = ["Win32_UI_Input_KeyboardAndMouse"] }

[target.'cfg(target_os = "linux")'.dependencies]
device_query = "2"
