You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document tracks design decisions, hardware interactions, crate evaluations, and system resource budgets for the Cross-Platform CursorFX application.
1. Architectural History
Version
Shell
Frontend
Graphics
RAM
Startup
Notes
V1 (Legacy)
Tauri V1
SolidJS + Bun
GDI+, D3D11
~150–250 MB
~1.2–2.0s
Windows-only, Windhawk DLLs
V2 (Pure Rust)
winit 0.29
egui 0.26
wgpu 0.19
<30 MB
~0.1–0.2s
Cross-platform, no webview
V3 (Current)
Tauri V2
React 19 + TW4
wgpu 24
~80–120 MB
~0.5–1.0s
Best DX, polished UI, cross-platform
Why V3 (Tauri V2 + React)?
Developer Experience: Hot Module Replacement, TypeScript, React DevTools, browser-based debugging make iteration dramatically faster than egui.
UI Polish: TailwindCSS 4 enables pixel-perfect design with dark theme, responsive layout, and animated transitions that egui cannot match.
Tauri V2 Maturity: V2 features native tray, multi-window, IPC streaming, plugin system, and reduced webview overhead compared to V1.
Ecosystem: Access to the full npm/Bun ecosystem for utilities, state management, and testing. The React component model maps naturally to settings panels.
WebGPU Integration: wgpu 24 brings improved DX12, Vulkan 1.3, and Metal 3 support. The Rust backend keeps the same WGSL shaders unchanged.
2. Resource & Performance Budgets (V3)
Metric
Target
Notes
RAM (total process)
<120 MB
Webview ~60MB + GPU resources ~30MB + Rust ~10MB
CPU (idle)
<1%
Vite dev server excluded (dev only)
CPU (active rendering)
<2%
Frame pacing at display refresh rate
GPU (active)
<3%
Instanced rendering, adaptive LOD
Binary size (release)
~15–20 MB
LTO + strip + panic=abort
Startup time
<1.0s
Tauri V2 cold start
Frame pacing
VSync-aligned
PresentMode::Fifo
3. Crate Evaluation & Risk Matrix
A. Window Management (Tauri V2)
Chosen: Tauri V2 (tauri = "2")
Rationale: Built on tao (successor to winit). Multi-window support. Native window handle access for wgpu. System tray, global shortcuts, and menu APIs built-in.
Risk: Webview adds ~60MB overhead. Tauri 2.x is less battle-tested than winit. Some platform-specific transparency quirks (Wayland).
Rationale: Industry standard. Tailwind v4 uses CSS-based configuration (@theme) eliminating tailwind.config.ts. The @tailwindcss/vite plugin provides zero-config integration.
Risk: Webview rendering overhead. IPC latency for config updates (mitigated by optimistic UI updates).
D. Global Input (device_query 2)
Chosen: device_query = "2"
Rationale: Same proven approach as V2. Polls global mouse position without hooking OS events. Works on all platforms (Wayland requires compositor cooperation).
Risk: Linux Wayland blocks global mouse polling. Fallback: overlay window mouse events (but click-through prevents this).