lighty-launch
Minecraft launch logic for LightyLauncher.
Note
This is an internal crate for the LightyLauncher ecosystem. Most users should use the main lighty-launcher crate instead.
Features
- Game Launching: Launch Minecraft with proper arguments
- Asset Installation: Download and install game assets and libraries
- JVM Arguments: Generate optimized JVM arguments
- Process Management: Manage Minecraft process lifecycle
Usage
[]
= "0.6.3"
use Launch;
use JavaDistribution;
async
Structure
lighty-launch/
└── src/
├── lib.rs # Module declarations
├── launch.rs # Launch trait and implementation
├── installer/ # Assets and libraries installation
│ ├── mod.rs # Installer trait
│ ├── assets.rs # Assets installation
│ └── libraries.rs # Libraries installation
├── arguments.rs # JVM and game arguments generation
└── errors.rs # Error types (InstallerError, InstallerResult)
Components
Launch Trait
The Launch trait defines the interface for launching Minecraft:
use async_trait;
use JavaDistribution;
use InstallerResult;
Installer Trait
Handles downloading and installing game files (assets, libraries):
use Installer;
Arguments
Generates optimized JVM and game arguments:
use Arguments;
let args = new;
let jvm_args = args.get_jvm_arguments;
let game_args = args.get_game_arguments;
Features:
- Memory optimization based on system RAM
- Platform-specific arguments
- Library path resolution
- Asset index handling
Error Handling
All operations return InstallerResult<T> with detailed error information:
use ;
match version.launch.await
License
MIT
Links
- Main Package: lighty-launcher
- Repository: GitHub
- Documentation: docs.rs/lighty-launch