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.
- Modular Architecture: Organized into logical crates (
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
- Authentication: Offline, Microsoft OAuth 2.0, Azuriom CMS + extensibility for custom providers
- Automatic Java Management: Download and manage JRE distributions (Temurin, GraalVM, Zulu, Liberica)
- Cross-Platform: Windows, Linux, and macOS support
[dependencies]
lighty-launcher = "0.8.6"
tokio = { version = "1", features = ["full"] }
anyhow = "1.0"use lighty_launcher::prelude::*;
const QUALIFIER: &str = "com";
const ORGANIZATION: &str = "MyLauncher";
const APPLICATION: &str = "";
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Initialize AppState
let _app = AppState::new(
QUALIFIER.to_string(),
ORGANIZATION.to_string(),
APPLICATION.to_string(),
)?;
let launcher_dir = AppState::get_project_dirs();
// Create instance
let mut instance = VersionBuilder::new(
"my-instance",
Loader::Vanilla,
"",
"1.21.1",
launcher_dir
);
// Authenticate
let mut auth = OfflineAuth::new("Player123");
let profile = auth.authenticate().await?;
// Launch
instance.launch(&profile, JavaDistribution::Temurin)
.run()
.await?;
Ok(())
}Comprehensive documentation in the docs/ directory:
| Guide | Description |
|---|---|
| Sequence Diagrams | Visual diagrams of all workflows (launch, authentication, installation) |
| Re-exports Reference | Complete list of all re-exported types and their sources |
| Architecture | System architecture, design patterns, and module dependencies |
| Examples | Detailed walkthrough of all examples with code explanations |
Complete documentation for each crate:
| Crate | Description | Documentation |
|---|---|---|
| lighty-core | Core utilities and AppState management | π Docs |
| lighty-launcher | Main package with re-exports | π Docs |
| Crate | Description | Documentation |
|---|---|---|
| lighty-auth | Authentication (Offline, Microsoft, Azuriom) | π Docs |
| lighty-java | Java runtime management | π Docs |
| lighty-launch | Game launching and process management | π Docs |
| lighty-loaders | Mod loader implementations | π Docs |
| lighty-version | Version builders | π Docs |
| lighty-event | Event system for progress tracking | π Docs |
| Guide | Description |
|---|---|
| Launch Process | Complete launch workflow (5 phases) |
| Arguments System | Placeholders, JVM options, game arguments |
| Installation | Asset/library installation details |
| Instance Control | Process management and PID tracking |
| Events | Event types reference |
| How to Use | Practical examples |
| Exports | Module exports reference |
| Guide | Description |
|---|---|
| How to Use | Practical usage guide |
| Overview | Architecture and design |
| Exports | Module exports reference |
| VersionBuilder | Standard builder details |
| LightyVersionBuilder | Custom server builder |
The examples/ directory contains ready-to-use examples for all loaders and features:
| Example | Description | Features Required |
|---|---|---|
| vanilla.rs | Basic Vanilla Minecraft launcher | vanilla |
| fabric.rs | Fabric mod loader | fabric |
| quilt.rs | Quilt mod loader | quilt |
| neoforge.rs | NeoForge mod loader | neoforge |
| forge.rs | Forge mod loader | forge |
| forge_legacy.rs | Legacy Forge (1.7.10-1.12.2) | forge_legacy |
| optifine.rs | OptiFine launcher | optifine |
| lighty_updater.rs | Custom modpack server | lighty_updater |
| with_events.rs | Complete event system & instance management | vanilla, events |
# Vanilla Minecraft
cargo run --example vanilla --features vanilla
# Fabric with events
cargo run --example fabric --features fabric,events
# Complete demo with events and instance management
cargo run --example with_events --features vanilla,events
# LightyUpdater
cargo run --example lighty_updater --features lighty_updaterwith_events.rs demonstrates:
- Real-time event tracking for all operations
- Instance lifecycle management (create, launch, monitor, close, delete)
- Console output streaming
- Instance size calculation
- PID tracking and control
See docs/examples.md for detailed example documentation.
# Minimal - Vanilla only
lighty-launcher = { version = "0.8.6", features = ["vanilla"] }
# With events
lighty-launcher = { version = "0.8.6", features = ["vanilla", "events"] }
# Multiple loaders
lighty-launcher = { version = "0.8.6", features = ["vanilla", "fabric", "quilt", "events"] }
# All loaders
lighty-launcher = { version = "0.8.6", features = ["all-loaders", "events"] }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 system
lighty-launcher/
βββ crates/
β βββ core/ # Core utilities and AppState
β βββ auth/ # Authentication providers
β βββ event/ # Event system
β βββ java/ # Java runtime management
β βββ launch/ # Launch orchestration
β βββ loaders/ # Mod loader implementations
β βββ version/ # Version builders
β βββ launcher/ # Main package with re-exports
βββ examples/ # Usage examples
βββ docs/ # Additional documentation
Contributions are welcome! Please read the Contributing Guide before submitting a PR.
MIT License - see LICENSE file for details.
- LightyUpdater - Custom modpack server for LightyLauncher
