LightyLauncher
ACTIVE DEVELOPMENT - API may change between versions. Use with caution in production.
A modern, modular Minecraft launcher library for Rust with full async support, real-time event system, and automatic Java management.

Features
- Modular Architecture: Organized into logical namespaces (
auth,event,java,launch,loaders,version,core) - Multi-Loader Support: Vanilla, Fabric, Quilt, NeoForge, Forge, OptiFine, LightyUpdater
- Event System: Real-time progress tracking for all operations (downloads, installations, authentication)
- Authentication: Offline, Microsoft OAuth 2.0, Azuriom CMS + trait-based extensibility for custom providers
- Automatic Java Management: Download and manage JRE distributions (Temurin, GraalVM, Zulu, Liberica)
- Async/Await: Built on Tokio for maximum performance
- Smart Caching: Dual cache (raw + query) with configurable TTL
- Type-Safe: Strongly typed API with comprehensive error handling
- Cross-Platform: Windows, Linux, and macOS support
- Performance Optimized: Parallel downloads, async I/O, minimal dependencies
Installation
Add to your Cargo.toml:
[]
= { = "0.6", = ["vanilla", "events"] }
= { = "1", = ["full"] }
= "6.0"
= "1.21"
= "0.3"
= "1.0"
Quick Start
Basic Example - Vanilla Minecraft
use ;
use ProjectDirs;
use Lazy;
static LAUNCHER_DIR: = new;
async
Using the Prelude
For convenience, import commonly used types:
use *;
use ProjectDirs;
async
Modules
LightyLauncher is organized into logical modules, each with its own namespace:
lighty_launcher::auth - Authentication
Multiple authentication methods with a unified, extensible interface:
use ;
// Offline (no network required)
let mut auth = new;
let profile = auth.authenticate.await?;
// Microsoft OAuth 2.0
let mut auth = new;
let profile = auth.authenticate.await?;
// Azuriom CMS
let mut auth = new;
let profile = auth.authenticate.await?;
Custom Authentication:
Implement the Authenticator trait to create your own provider:
use ;
Key Types:
OfflineAuth- Offline authentication (UUID v5 generation)MicrosoftAuth- Microsoft/Xbox Live OAuth 2.0AzuriomAuth- Azuriom CMS integrationAuthenticator- Trait for creating custom authentication providersUserProfile- User data (username, UUID, access token)generate_offline_uuid()- Helper to create deterministic UUIDs
lighty_launcher::event - Event System
Real-time progress tracking for all launcher operations:
use ;
// Create event bus
let event_bus = new;
let mut receiver = event_bus.subscribe;
// Listen to events
spawn;
// Use with authentication
let profile = auth.authenticate.await?;
// Use with launch
version.launch
.with_event_bus
.run
.await?;
Event Types:
AuthEvent- Authentication progressJavaEvent- JRE download/extractionLaunchEvent- Installation/launch progressLoaderEvent- Loader metadata fetchingCoreEvent- Archive extraction
See crates/event/README.md for complete documentation.
lighty_launcher::java - Java Management
Automatic Java runtime download and installation:
use ;
// Distributions are automatically managed
Temurin // Recommended, supports all Java versions
GraalVM // High performance, Java 17+ only
Zulu // Enterprise support available
Liberica // Lightweight alternative
Supported Distributions:
| Distribution | Java Versions | Type | Size (Java 21) | Best For |
|---|---|---|---|---|
| Temurin | 8, 11, 17, 21+ | JRE | ~42 MB | General use, best compatibility |
| GraalVM | 17+ only | JDK | ~303 MB | Maximum performance |
| Zulu | 8, 11, 17, 21+ | JRE | ~82 MB | Enterprise support |
| Liberica | 8, 11, 17, 21+ | JRE | ~50 MB | Lightweight |
lighty_launcher::launch - Game Launching
Complete launch orchestration with customization options:
use ;
use *;
// Configure downloader (optional)
init_downloader_config;
// Launch with custom JVM options and arguments
version.launch
.with_jvm_options
.set
.set
.done
.with_arguments
.set
.set
.set
.done
.run
.await?;
Key Features:
- JVM options customization (memory, GC, system properties)
- Game arguments customization (resolution, launcher name)
- Automatic file verification
- Parallel downloads with retry logic
- Asset, library, and native management
lighty_launcher::loaders - Mod Loaders
Support for multiple Minecraft mod loaders:
use ;
// Available loaders
Vanilla // Vanilla Minecraft
Fabric // Fabric mod loader
Quilt // Quilt mod loader
NeoForge // NeoForge (modern Forge fork)
Forge // Forge
LightyUpdater // Custom updater system
Optifine // OptiFine (experimental)
Loader Status:
| Loader | Status | Example Version | Minecraft Version |
|---|---|---|---|
| Vanilla | ✅ Stable | - | 1.21.1 |
| Fabric | ✅ Stable | 0.17.2 | 1.21.8 |
| Quilt | ✅ Stable | 0.17.10 | 1.18.2 |
| NeoForge | ⚠️ Testing | 20.2.93 | 1.20.2 |
| Forge | ⚠️ Testing | - | - |
| LightyUpdater | ✅ Stable | - | Custom |
| OptiFine | 🧪 Experimental | - | - |
lighty_launcher::version - Version Builders
Build game instances with different loaders:
use ;
// Standard Minecraft with loader
let mut version = new;
// LightyUpdater custom version
let mut version = new;
lighty_launcher::core - Core Utilities
Low-level utilities for system operations:
use ;
// SHA1 verification
verify_file_sha1.await?;
// Archive extraction
zip_extract.await?;
// System detection
let = get_os_arch;
Examples
Fabric with Events
use ;
async
Microsoft Authentication
use ;
let mut auth = new;
// Interactive OAuth flow
let profile = auth.authenticate.await?;
println!;
println!;
Custom Downloader Configuration
use ;
// Configure before launching
init_downloader_config;
// Launches will use this configuration
version.launch.run.await?;
Cargo Features
Control which functionality is compiled:
# Minimal - Vanilla only
= { = "0.6", = ["vanilla"] }
# With events
= { = "0.6", = ["vanilla", "events"] }
# Multiple loaders
= { = "0.6", = ["vanilla", "fabric", "quilt", "events"] }
# All loaders
= { = "0.6", = ["all-loaders", "events"] }
# With Tauri integration
= { = "0.6", = ["all-loaders", "events", "tauri-commands"] }
Available Features:
vanilla- Vanilla Minecraft support (required base)fabric- Fabric loaderquilt- Quilt loaderneoforge- NeoForge loaderforge- Forge loaderforge_legacy- Legacy Forge (1.7.10 - 1.12.2)lighty_updater- Custom updater systemall-loaders- All mod loadersevents- Event systemtauri-commands- Tauri desktop integration
Running Examples
# Vanilla
# Vanilla with events (detailed progress)
# Fabric
# Quilt
# LightyUpdater
Architecture
lighty-launcher/
├── src/
│ └── lib.rs # Module organization and re-exports
│
├── crates/
│ ├── auth/ # Authentication
│ │ ├── offline.rs # Offline auth
│ │ ├── microsoft.rs # Microsoft OAuth
│ │ ├── azuriom.rs # Azuriom CMS
│ │ └── custom.rs # Custom endpoints
│ │
│ ├── event/ # Event system
│ │ ├── lib.rs # EventBus, EventReceiver
│ │ ├── errors.rs # Custom errors
│ │ └── module/ # Event definitions
│ │ ├── auth.rs # AuthEvent
│ │ ├── java.rs # JavaEvent
│ │ ├── launch.rs # LaunchEvent
│ │ ├── loader.rs # LoaderEvent
│ │ └── core.rs # CoreEvent
│ │
│ ├── java/ # Java runtime management
│ │ ├── distribution.rs # Distribution providers
│ │ ├── jre_downloader.rs # Download & install
│ │ └── runtime.rs # Version detection
│ │
│ ├── launch/ # Game launching
│ │ ├── arguments/ # Argument building
│ │ │ └── arguments.rs # Arguments trait
│ │ ├── installer/ # Installation logic
│ │ │ ├── installer.rs # Installer trait
│ │ │ ├── config.rs # Downloader config
│ │ │ ├── assets.rs # Asset management
│ │ │ ├── libraries.rs # Library management
│ │ │ ├── natives.rs # Native libraries
│ │ │ └── client.rs # Client JAR
│ │ └── launch/ # Launch orchestration
│ │ ├── runner.rs # Launch logic
│ │ ├── builder.rs # LaunchBuilder
│ │ └── config.rs # LaunchConfig
│ │
│ ├── loaders/ # Mod loaders
│ │ ├── vanilla/ # Vanilla Minecraft
│ │ ├── fabric/ # Fabric
│ │ ├── quilt/ # Quilt
│ │ ├── neoforge/ # NeoForge
│ │ ├── forge/ # Forge
│ │ ├── lighty_updater/ # Custom updater
│ │ └── utils/ # Caching & utilities
│ │
│ ├── version/ # Version builders
│ │ ├── version_builder.rs # Standard builder
│ │ └── lighty_builder.rs # LightyUpdater builder
│ │
│ └── core/ # Core utilities
│ ├── system.rs # OS/Arch detection
│ ├── hosts.rs # HTTP client
│ ├── download.rs # Download utilities
│ ├── extract.rs # Archive extraction
│ └── hash.rs # SHA1 verification
│
└── examples/ # Usage examples
├── vanilla.rs
├── vanilla_with_events.rs
├── fabric.rs
├── quilt.rs
├── neoforge.rs
└── lighty_updater.rs
Performance
- Async I/O: All filesystem and network operations are async
- Parallel Downloads: Configurable concurrency (default: 50 concurrent)
- Smart Caching: Dual cache system with TTL
- Event System: Zero-cost when disabled via feature flags
- Minimal Dependencies: Only essential crates
- Optimized Profiles:
dev: Fast compilation with opt-level=2 for dependenciesrelease: LTO thin, optimized for performancerelease-small: Size-optimized binary
Platform Support
| Platform | Status | Architectures |
|---|---|---|
| Windows | ✅ Tested | x64, ARM64 |
| Linux | ✅ Tested | x64, ARM64 |
| macOS | ✅ Tested | x64 (Intel), ARM64 (Apple Silicon) |
Requirements
- Rust 1.75+
- Tokio async runtime
- Internet connection for downloads
Crate Ecosystem
LightyLauncher is composed of multiple focused crates:
lighty-auth- Authentication providerslighty-event- Event systemlighty-java- Java runtime managementlighty-launch- Game launchinglighty-loaders- Mod loader implementationslighty-version- Version builderslighty-core- Core utilities
Each crate can be used independently or together through the main lighty-launcher crate.
License
This project is licensed under the MIT License - See LICENSE for details.
Clean Room Implementation: All components were implemented from scratch using only publicly documented APIs. No GPL-licensed code was used or referenced.
Disclaimer
- Minecraft is a trademark of Mojang Studios
- This project is not affiliated with Mojang Studios or Microsoft
- For educational and personal use
- Please respect the Minecraft EULA
Links
- Documentation: docs.rs/lighty-launcher
- Crates.io: crates.io/crates/lighty-launcher
- Repository: GitHub
- Issues: GitHub Issues
Made by Hamadi
Built with Rust: Tokio, Reqwest, Serde, Thiserror, and more.