Workspace Structure
The Jarvis Rust workspace atjarvis-rs/Cargo.toml defines 10 crates with clear separation of concerns:
All crates share a common version (0.1.0) and are published under the MIT license.
Crate Overview
jarvis-common
Foundation crate with shared types, errors, actions, and event bus
jarvis-config
TOML configuration loading, validation, themes, live reload
jarvis-platform
OS abstractions: clipboard, paths, crypto, keybinds
jarvis-tiling
Binary split tree layout engine and pane management
jarvis-renderer
GPU rendering: wgpu, shaders, UI chrome, effects
jarvis-ai
AI client implementations: Claude, Gemini, Whisper
jarvis-social
Social features: presence, chat, channels, identity
jarvis-webview
WebView management: wry wrapper, IPC, content provider
jarvis-app
Application shell: window, event loop, IPC dispatch
jarvis-relay
Standalone WebSocket relay for mobile-desktop bridging
jarvis-common
Type: LibraryDependencies: None (foundation crate)
Path:
jarvis-rs/crates/jarvis-common/src/lib.rs
The foundation crate with zero internal-crate dependencies. Defines the shared vocabulary used across all other crates.
Key Modules
jarvis-config
Type: LibraryDependencies:
jarvis-commonPath:
jarvis-rs/crates/jarvis-config/src/lib.rs
Manages the entire configuration lifecycle with TOML parsing, theme support, plugin discovery, validation, and live reload.
Key Features
- 25+ config sections as strongly-typed structs with serde defaults
- Built-in themes with selective field overrides
- Plugin discovery from
{config_dir}/jarvis/plugins/ - File system watcher for live config reload
- Validation of colors, ranges, constraints
- TOML round-trip (read and write)
Main Entry Point
load_config() function:
- Loads TOML from platform config directory
- Applies selected theme
- Discovers local plugins
- Validates all fields
- Returns
JarvisConfig
Config Sections
jarvis-platform
Type: LibraryDependencies:
jarvis-common, jarvis-configPath:
jarvis-rs/crates/jarvis-platform/src/lib.rs
OS-level abstractions and platform services.
Key Modules
jarvis-tiling
Type: LibraryDependencies:
jarvis-commonPath:
jarvis-rs/crates/jarvis-tiling/src/lib.rs
A pure-logic tiling window manager with no platform dependencies. See Tiling System for complete documentation.
Core Types
Operations
split()- Split focused pane horizontally or verticallyclose_focused()- Remove focused pane and collapse treefocus_next()/focus_prev()- Cycle focus through panesfocus_direction()- Move focus in a directionzoom_toggle()- Toggle fullscreen mode for focused paneresize()- Adjust split ratio by keyboardswap()- Swap focused pane with neighborcompute_layout()- Convert tree to pixel rectangles
jarvis-renderer
Type: LibraryDependencies:
jarvis-common, jarvis-config, jarvis-platformPath:
jarvis-rs/crates/jarvis-renderer/src/lib.rs
GPU rendering via wgpu (cross-platform Vulkan/Metal/DX12). See Renderer for complete documentation.
Key Components
jarvis-ai
Type: LibraryDependencies:
jarvis-commonPath:
jarvis-rs/crates/jarvis-ai/src/lib.rs
AI provider clients with a unified interface.
Trait
Providers
Claude
ClaudeClient - Claude API with SSE streamingGemini
GeminiClient - Google Gemini APIWhisper
WhisperClient - OpenAI Whisper transcriptionFeatures
- Streaming - SSE stream parsing for real-time responses
- Tool calling - Function definitions and execution
- Session management - Multi-turn conversations with tool-call loops
- Token tracking - Cumulative usage across providers
- Skill routing - Route user intents to appropriate provider
jarvis-social
Type: LibraryDependencies:
jarvis-commonPath:
jarvis-rs/crates/jarvis-social/src/lib.rs
Social features: presence, chat, identity, and experimental collaboration.
Core Features
Experimental Features
pair- Pair programming sessions withPairManager,PairSession,PairRolevoice- Voice chat rooms withVoiceManager,VoiceRoom,VoiceConfigscreen_share- Screen sharing withScreenShareManager,ShareQuality
jarvis-webview
Type: LibraryDependencies:
jarvis-commonPath:
jarvis-rs/crates/jarvis-webview/src/lib.rs
WebView lifecycle management and IPC bridge via wry.
Key Components
jarvis-relay
Type: Binary (jarvis-relay)Dependencies: None (standalone)
Path:
jarvis-rs/crates/jarvis-relay/src/main.rs
A standalone WebSocket relay server for mobile-to-desktop bridging.
Architecture
Features
- Session pairing - Desktop and mobile clients pair by session ID
- Message relay - Forwards messages between paired clients
- Rate limiting - Per-IP connection limiting and total session caps
- Stale session reaping - Removes inactive sessions
- E2E encryption - Never inspects message payloads (encrypted by
CryptoService)
Modules
connection- WebSocket connection handlingprotocol- Wire protocol for relay messagessession::SessionStore- Active session managementrate_limit::RateLimiter- Connection throttling
Usage
jarvis-app
Type: Binary (jarvis)Dependencies: All other crates (except
jarvis-relay)Path:
jarvis-rs/crates/jarvis-app/src/main.rs
The main application binary. Wires everything together.