Crate lighty_launcher

Crate lighty_launcher 

Source
Expand description

LightyLauncher - A modern Minecraft launcher library

This library provides everything needed to build a custom Minecraft launcher:

  • Authentication (Offline, Microsoft, Azuriom) + trait-based extensibility
  • Java runtime management
  • Version metadata handling (Vanilla, Fabric, Quilt, Forge, NeoForge, LightyUpdater)
  • Game installation and launching
  • Event system for progress tracking

§Quick Start

use lighty_launcher::prelude::*;
use directories::ProjectDirs;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let launcher_dir = ProjectDirs::from("com", "MyCompany", "MyLauncher")
        .expect("Failed to get project directories");

    // Authenticate
    let mut auth = auth::OfflineAuth::new("Player");
    let profile = auth.authenticate().await?;

    // Build and launch
    let mut version = version::VersionBuilder::new(
        "my-instance",
        Loader::Vanilla,
        "",
        "1.21.1",
        &launcher_dir
    );

    version.launch(&profile, JavaDistribution::Temurin)
        .run()
        .await?;

    Ok(())
}

Modules§

auth
Authentication providers and utilities
core
Core utilities and system operations
java
Java runtime management
launch
Game launching and installation
loaders
Minecraft mod loaders and version metadata
macros
Utility macros
prelude
Convenient re-exports of most commonly used types
version
Version builders for game instances

Structs§

LightyVersionBuilder
Builder pour LightyUpdater avec une sémantique claire
UserProfile
User profile returned after successful authentication
VersionBuilder
Structure principale pour configurer une version Minecraft avec un loader

Enums§

JavaDistribution
Available Java distributions
Loader

Traits§

Authenticator
Core authentication trait
Launch