The Two-Process Isolation Model
How Voktty combines the security of compiled Rust with the fluidity of React 19 and WebGL.
1. Rust Backend (src-tauri/)
Owns all OS access, process spawns, and filesystem mutations. Interactive PTY sessions (via portable-pty) communicate via zero-copy Tauri Channel<PtyEvent> streams.
- •
SPAWN_LOCK: Prevents ConPTY output pipe stalls during rapid tab creation. - •
Win32 ProcessJob: Terminates child subtrees on process exit. - •
keyring crate: Stores API keys safely in OS Keychain.
2. React 19 Frontend (src/)
Single-window coordinator maintaining persistent tab state without unmounting. Non-active tabs are hidden with invisible pointer-events-none so long-running tasks keep streaming.
- •
Renderer Pool: 9 pooled WebGL slots for 8 split panes. - •
DormantRing: 1 MiB ring buffer prevents Claude Code TUI wipe. - •
Vercel AI SDK v6: Multi-turn agent with hunk diff approvals.
PTY Shell Integration & Boundary Detection
Voktty injects zero-cost init scripts to track current working directories and command boundaries without re-parsing prompts:
cd command across bash, zsh, fish, and pwsh.