Technology Stack
LiquidLauncher uses a modern technology stack designed for performance and cross-platform compatibility:- Backend: Rust with Tauri framework
- Frontend: Svelte with Vite
- Communication: Tauri IPC (Inter-Process Communication)
- Build System: Cargo (Rust) and npm/bun (JavaScript)
Tauri Architecture
Tauri provides a hybrid architecture that separates concerns between system-level operations and user interface:Module Organization
The codebase is organized into clear, functional modules:Backend Modules (src-tauri/src/)
Core Modules
Core Modules
main.rs
Application entry point that initializes:- Logging system (file and console output)
- Application directories
- Tauri GUI framework
src-tauri/src/main.rs:64-110:app/
Handles GUI integration and application state:gui/- Tauri command handlers and window managementclient_api.rs- LiquidBounce API clientoptions.rs- User settings and configurationwebview.rs- WebView utilities
minecraft/
Core launcher functionality:launcher/- Launch process and game setupversion.rs- Version manifest parsingauth.rs- Minecraft authenticationprelauncher.rs- Pre-launch setup (mods, assets)java/- Java runtime management
auth/
Authentication systems for Minecraft accounts (Microsoft, offline)utils/
Shared utilities:download.rs- File downloading with progresschecksum.rs- SHA1 verificationextract.rs- Archive extractionmaven.rs- Maven artifact resolutionsys.rs- System information detection
Frontend Structure (src/)
Frontend Components
Frontend Components
App.svelte
Root component that bootstraps the applicationlib/Window.svelte
Main window component managing application state:- Options loading and storage
- API client setup
- System checks
- Update handling
- Screen routing (Login → Main)
lib/main/
Main launcher screens:MainScreen.svelte- Primary interfaceLaunchArea.svelte- Launch button and controlsVersionSelect.svelte- Version pickersettings/- Settings panelslog/- Client log viewernews/- News feedstatusbar/- Progress indicators
lib/login/
Authentication interface:LoginScreen.svelte- Login viewloginmodal/- Login modal components
lib/settings/
Reusable settings components (sliders, selectors, inputs)lib/common/
Shared UI components (buttons, tooltips, title bar)Communication Flow
The frontend and backend communicate through Tauri’s IPC system:#[tauri::command]
pub async fn get_options() -> Result<Options, String> {
// Handler implementation
}
Application Lifecycle
main.rs:64gui_main()Window.svelte mountsMainScreen displaysrun_client command invoked (src-tauri/src/app/gui/commands/client.rs:260)Directory Structure
Key Design Principles
Separation of Concerns: The Rust backend handles all system operations, file I/O, and network requests, while the Svelte frontend focuses purely on UI and user interaction.
Type Safety: Tauri’s command system ensures type-safe communication between frontend and backend through serialization/deserialization.
Async-First: Both frontend (JavaScript promises) and backend (Tokio async) are designed around asynchronous operations for responsive UI.
Error Handling: Rust’s
Result type propagates errors through the stack, converted to JavaScript exceptions at the boundary.Next Steps
Backend Architecture
Deep dive into Rust modules and Tauri commands
Frontend Architecture
Explore Svelte components and state management
Launcher Core
Understand the game launch process