Files
ChatApp/apps/desktop/src-tauri/Cargo.toml
T
2026-04-23 18:02:24 +02:00

96 lines
3.9 KiB
TOML

[package]
name = "chat-app-desktop"
version = "0.11.3"
description = "ChatApp desktop client"
authors = ["Dennis"]
edition = "2021"
rust-version = "1.77"
[lib]
name = "chat_app_desktop_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = ["devtools", "tray-icon"] }
tauri-plugin-notification = "2"
tauri-plugin-sql = { version = "2", features = ["sqlite"] }
tauri-plugin-stronghold = "2"
tauri-plugin-fs = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Pure-rust libsodium-compatible primitives. No C toolchain required so
# cross-compile for mobile stays clean. API output is bit-compatible with
# libsodium-wrappers-sumo for the ops we use (secretbox, box, pwhash).
dryoc = { version = "0.7", default-features = false, features = ["serde"] }
base64 = "0.22"
# PNG encoding for screen-source thumbnails returned by the
# `enumerate_screen_sources` command. `default-features = false` skips the
# image-format decoders we don't use (jpeg, gif, webp, …) — keeps the
# thumbnail command at ~200KB extra binary size.
image = { version = "0.25", default-features = false, features = ["png"] }
# Cross-platform screen + window enumeration and capture. Replaces direct
# Win32 GDI / macOS CoreGraphics / X11 calls with a small uniform API so
# the enumerate-sources command has one code path. The crate pulls in
# platform-specific backends automatically (~1.5MB binary growth on
# Windows). Marked optional so non-desktop targets don't compile it.
xcap = "0.0.14"
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-global-shortcut = "2"
tauri-plugin-updater = "2"
tauri-plugin-window-state = "2"
# Windows-only screen-source enumeration + thumbnail capture. Pulled in
# only on Windows so macOS + Linux builds stay slim. The enumerate command
# returns stub-empty on non-Windows until we add native equivalents.
[target."cfg(target_os = \"windows\")".dependencies]
windows = { version = "0.58", features = [
"Win32_Foundation",
"Win32_Graphics_Gdi",
"Win32_UI_HiDpi",
"Win32_UI_WindowsAndMessaging",
] }
# WASAPI loopback capture for system-audio screen-share. Lets the custom
# picker hand LiveKit a real audio track without falling back to the OS
# screen picker (which is the only way getDisplayMedia can grab system
# sound). Windows-only for v1; macOS needs ScreenCaptureKit-audio and
# Linux needs a PulseAudio / PipeWire path.
wasapi = "0.15"
# LiveKit client SDK — lives behind the `rust-livekit` feature flag so the
# baseline build stays unaffected while the JS-SDK path is still the
# default. Pulls libwebrtc-rs which adds ~20MB to the binary and ~5-10min
# to the first build. Tokio runtime is required; the rest of the crate
# stays idle when the feature is off.
livekit = { version = "0.7", default-features = false, features = ["tokio", "rustls-tls-native-roots"], optional = true }
tokio = { version = "1", features = ["rt-multi-thread", "sync", "macros"], optional = true }
[features]
# This feature is used for production builds or when `devPath` points to the filesystem
# and disables specific features relevant to the dev build.
custom-protocol = ["tauri/custom-protocol"]
# Enable the Rust LiveKit client. Off by default so CI + users stay on the
# JS-SDK path until the rust bridge reaches feature parity. Turn on via:
# cargo build --features rust-livekit
rust-livekit = ["dep:livekit", "dep:tokio"]
# Release-profile tuned for ChatApp: whole-program LTO + single codegen unit
# cuts binary size by ~20-30% and trims startup overhead. `strip = "symbols"`
# removes debug + symbol tables (the updater already signs separately so
# symbol-backed crash reports aren't the recovery path). `panic = "abort"`
# skips unwinding metadata since the app doesn't use catch_unwind anywhere.
[profile.release]
lto = true
codegen-units = 1
strip = "symbols"
panic = "abort"
opt-level = "s"