48ac9d2922
Phase B.1 of the native-livekit migration. Ships the command surface and event bridge behind a cargo feature so the default build stays unaffected while the JS-SDK path keeps running in production. Rust side - livekit 0.7 (default tokio runtime, rustls-tls-native-roots) pulled as an optional dependency; tokio also optional under the same feature - Feature `rust-livekit` gates everything — off by default; on via `cargo build --features rust-livekit` - src-tauri/src/livekit_bridge.rs: LivekitState mutex, connect / disconnect / send_data commands, event pump for room_state, participant_joined, participant_left, data_received - Mic / camera / screen share commands stubbed with explicit "not implemented" errors so JS callers fail loudly rather than silently no-op JS side - src/lib/nativeLiveKit.ts exposes a NativeRoom class with the same event / method shape the CallContext will need, plus a VITE_USE_RUST_LIVEKIT flag so the adapter can be swapped once the bridge reaches parity - isRustLivekitAvailable() gates access at both env + runtime layers Build impact - Baseline build unchanged (1s incremental, no new deps pulled) - Feature build initial: ~10min (libwebrtc download + link) - Feature build incremental: ~1s - Binary size with feature: +12-20MB vs baseline Open questions (documented for the next phase) - Video-frame rendering bridge remains an upstream gap; livekit-rust exposes NativeVideoFrame but no stable path to expose that as a MediaStreamTrack inside the WebView - Audio-only rust path is realistic near-term; full-rust needs either upstream video-bridge or a native-overlay render window
@chat-app/desktop
Tauri v2 + React + Vite + Tailwind desktop client (macOS / Windows / Linux).
Prerequisites
- Node 22+, pnpm 9+
- Rust + Cargo (install via https://rustup.rs)
- Platform build deps:
- macOS: Xcode Command Line Tools
- Linux:
libwebkit2gtk-4.1-dev,build-essential,libssl-dev(Debian/Ubuntu) - Windows: Microsoft C++ Build Tools + WebView2
Dev
# from repo root
pnpm install
pnpm desktop:dev # tauri dev — launches Vite + native window
pnpm desktop:build # production bundle per platform
Layout
src/— React app (Vite bundles intodist/).src-tauri/— Rust backend.main.rswires Tauri plugins.vite.config.ts— port1420, HMR on1421, aliases to shared packages.
Secure Storage
Session tokens + user private keys live in Stronghold (tauri-plugin-stronghold).
Local message history lives in SQLite (tauri-plugin-sql), DB file encrypted at rest.