[workspace] members = ["apps/desktop", "crates/*", "tools/*"] default-members = ["apps/desktop"] resolver = "3" [workspace.package] version = "0.1.0" edition = "2024" rust-version = "1.99" license = "MIT OR Apache-2.0" [workspace.dependencies] diagnostics = { path = "crates/diagnostics" } extensions = { path = "crates/extensions" } discord-voice = { path = "crates/discord-voice" } deepfilternet = { path = "crates/deepfilternet" } model = { path = "crates/model" } client-core = { path = "crates/client-core" } discord-protocol = { path = "crates/discord-protocol" } discord-api = { path = "crates/discord-api" } discord-gateway = { path = "crates/discord-gateway" } session-cache = { path = "crates/session-cache" } ui = { path = "crates/ui" } test-support = { path = "crates/test-support" } eframe = { git = "https://github.com/emilk/egui", rev = "c61b45f6570465f6445d6fc4251d1395db440223", default-features = false, features = ["wgpu", "default_fonts", "system_fonts", "accesskit", "wayland", "x11", "links", "clipboard"] } egui = { git = "https://github.com/emilk/egui", rev = "c61b45f6570465f6445d6fc4251d1395db440223", default-features = false, features = ["default_fonts"] } egui-winit = { git = "https://github.com/emilk/egui", rev = "c61b45f6570465f6445d6fc4251d1395db440223", default-features = false } tokio = { version = "1.50", features = ["rt-multi-thread", "macros", "sync", "time", "net", "io-util", "fs"] } serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["raw_value"] } # Browser TLS/HTTP2 fingerprint matching the advertised client identity on every transport. # The Chromium 150+ profiles and the TLS options they need are only on upstream branches, # pinned here and in [patch.crates-io]; no release has them yet (2026-11-19). wreq = { version = "0.16.1", features = ["json", "stream", "gzip", "deflate", "brotli", "zstd", "ws", "cookies"] } wreq-util = { git = "https://github.com/0x676e67/wreq-util", rev = "917d2581d6761a94db66466caa6c2eb4d4cdbd43", default-features = false, features = ["emulation"] } # The BoringSSL wreq already links, used directly for the QR sign-in key. Same revision as wreq's. btls = "=0.5.6" # QR sign-in code rendering; no dependencies of its own. qrcodegen = "=1.8.0" rasterlottie = { version = "=0.2.2", default-features = false } # Same release as wreq's `ws`, so one tungstenite is built; TLS comes from wreq. tokio-tungstenite = { version = "=0.29.0", default-features = false, features = ["connect"] } futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] } flate2 = "1" zeroize = "1.8" thiserror = "2" url = "2" platform = { path = "crates/platform" } local-store = { path = "crates/local-store" } rusqlite = { version = "=0.41.1", default-features = false, features = ["bundled", "cache"] } dirs = "=7.0.0" getrandom = "0.4" time = { version = "0.3", features = ["parsing"] } wry = { version = "=0.57.0", default-features = false, features = ["os-webview"] } keyring = "=4.2.0" keyring-core = "=1.0.0" winit = { version = "0.30", default-features = false, features = ["rwh_06"] } global-hotkey = "=0.8.0" [workspace.lints.rust] unsafe_code = "forbid" [profile.release] # Fat LTO inlines across the bundled C libraries (libopus, sqlite, sonora) and drops their # unused code; stripping the symbol table removes the 7-8 MB `__LINKEDIT`/`.symtab` from the # shipped binary. Line tables still land in the split debug file for symbolicating crashes. lto = "fat" codegen-units = 1 strip = "symbols" debug = "line-tables-only" # Real-time echo processing must also keep up in otherwise unoptimized dev builds. [profile.dev.package.sonora] opt-level = 3 [profile.dev.package.sonora-aec3] opt-level = 3 [profile.dev.package.sonora-common-audio] opt-level = 3 [profile.dev.package.sonora-fft] opt-level = 3 [profile.dev.package.sonora-simd] opt-level = 3 # RNNoise suppression, its FFT chain and libopus run per 10-20 ms frame; unoptimized # they cost ~40% of a core in debug builds. [profile.dev.package.nnnoiseless] opt-level = 3 # DeepFilterNet runs its network per 10 ms frame. [profile.dev.package.deepfilternet] opt-level = 3 [profile.dev.package.easyfft] opt-level = 3 [profile.dev.package.realfft] opt-level = 3 [profile.dev.package.rustfft] opt-level = 3 [profile.dev.package.num-complex] opt-level = 3 # Picker and timeline GIF/WebP decoding runs every frame through these codecs and the # resize filter; unoptimized, one animated preview takes seconds instead of milliseconds. [profile.dev.package.image] opt-level = 3 [profile.dev.package.image-webp] opt-level = 3 [profile.dev.package.gif] opt-level = 3 [profile.dev.package.weezl] opt-level = 3 [profile.dev.package.png] opt-level = 3 [profile.dev.package.fdeflate] opt-level = 3 [profile.dev.package.zune-jpeg] opt-level = 3 [profile.dev.package.generic_singleton] opt-level = 3 [profile.dev.package.libopus_sys] opt-level = 3 [profile.dev.package.opus2] opt-level = 3 # Per-packet media crypto: DAVE frame decryption (AES-GCM) and transport XChaCha20-Poly1305. # Software H.264 must keep up with real-time screen share and camera video in dev builds too. [profile.dev.package.openh264-sys2] opt-level = 3 # Media packetizing, decryption and pixel handling run per frame; keep them optimized in dev. [profile.dev.package.discord-voice] opt-level = 3 [profile.dev.package.openh264] opt-level = 3 [profile.dev.package.davey] opt-level = 3 [profile.dev.package.chacha20] opt-level = 3 [profile.dev.package.chacha20poly1305] opt-level = 3 [profile.dev.package.poly1305] opt-level = 3 [profile.dev.package.aes] opt-level = 3 [profile.dev.package.aes-gcm] opt-level = 3 [profile.dev.package.ghash] opt-level = 3 [profile.dev.package.polyval] opt-level = 3 [profile.dev.package.universal-hash] opt-level = 3 [profile.dev.package.cipher] opt-level = 3 [profile.dev.package.aead] opt-level = 3 # Inline video must keep up with its audio clock under `cargo run` too. Optimize # native-frame copies, AAC/MDCT, and egui's pixel conversion; keep app logic debuggable. [profile.dev.package.platform] opt-level = 3 [profile.dev.package.symphonia-codec-aac] opt-level = 3 [profile.dev.package.symphonia-core] opt-level = 3 # Seeking replays attachment audio decoding from the start; unoptimized demuxers and # decoders make each seek in a development build take seconds. [profile.dev.package.symphonia-bundle-mp3] opt-level = 3 [profile.dev.package.symphonia-bundle-flac] opt-level = 3 [profile.dev.package.symphonia-codec-alac] opt-level = 3 [profile.dev.package.symphonia-codec-pcm] opt-level = 3 [profile.dev.package.symphonia-codec-vorbis] opt-level = 3 [profile.dev.package.symphonia-format-isomp4] opt-level = 3 [profile.dev.package.symphonia-format-ogg] opt-level = 3 [profile.dev.package.symphonia-format-riff] opt-level = 3 [profile.dev.package.epaint] opt-level = 3 [profile.dev.package.ecolor] opt-level = 3 [patch.crates-io] # Align Direct3D interfaces with wgpu-hal; see vendor/gpu-allocator/SEREIN-PATCH.md. gpu-allocator = { path = "vendor/gpu-allocator" } # Replace an affected SHAKE dependency while retaining the compatible HPKE API. hpke-rs = { path = "vendor/hpke-rs" } # Native DAVE does not need OpenMLS browser timers; see vendor/davey/SEREIN-PATCH.md. davey = { path = "vendor/davey" } # Linux login uses GTK4/WebKit6; exclude obsolete GTK3 declarations from the lockfile. wry = { path = "vendor/wry" } # Wayland image paste reads `image/png` through the focused surface; see vendor/smithay-clipboard/SEREIN-PATCH.md. smithay-clipboard = { path = "vendor/smithay-clipboard" } # The wreq revision wreq-util's Chromium profiles are built against (its main branch has since # renamed TLS and HTTP/2 options), with the BoringSSL that wreq-util pins: the TLS options # Chromium 152 sends and the ML-DSA signature algorithms it advertises. Same set as # UwUDev/discord-client-rs. wreq = { git = "https://github.com/0x676e67/wreq", rev = "cd76bcdf1307153de289d34e072528bdf0510a3b" } btls = { git = "https://github.com/0x676e67/btls", rev = "129887582a538b8f4dcf371d15c953335312ca37" } btls-sys = { git = "https://github.com/0x676e67/btls", rev = "129887582a538b8f4dcf371d15c953335312ca37" } tokio-btls = { git = "https://github.com/0x676e67/btls", rev = "129887582a538b8f4dcf371d15c953335312ca37" } [patch."https://github.com/emilk/egui"] # Serein's egui fork: upstream PRs and local patches on the pinned rev; see vendor/egui/SEREIN-PATCH.md. eframe = { path = "vendor/egui/eframe" } egui = { path = "vendor/egui/egui" } egui-wgpu = { path = "vendor/egui/egui-wgpu" } egui-winit = { path = "vendor/egui/egui-winit" } egui_system_font_provider = { path = "vendor/egui/egui_system_font_provider" } epaint = { path = "vendor/egui/epaint" } [profile.dev.package.sonora-ns] opt-level = 3 [profile.dev.package.sonora-agc2] opt-level = 3