lighty-core 26.5.5

Core utilities for Lighty Launcher
Documentation

lighty-core

Core utilities and foundational components for the LightyLauncher ecosystem.

Overview

Version: 26.5.1 Part of: LightyLauncher

lighty-core provides essential building blocks used across all LightyLauncher crates:

  • Application State - Global app configuration and directory management
  • Download System - Async file downloads with SHA1 verification
  • Archive Extraction - ZIP, TAR, and TAR.GZ support with security
  • System Detection - Cross-platform OS and architecture detection
  • Hash Utilities - SHA1 verification for files and data
  • Logging Macros - Unified tracing interface
  • File Macros - Directory creation utilities

Quick Start

[dependencies]
lighty-core = "26.5.1"
use lighty_core::{AppState, system::{OS, ARCHITECTURE}};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Initialize application state
    AppState::init("MyLauncher")?;

    println!("Data directory: {}", AppState::data_dir().display());
    println!("Cache directory: {}", AppState::cache_dir().display());
    println!("Running on: {:?} {:?}", OS, ARCHITECTURE);

    Ok(())
}

Features

  • Thread-safe state - Global AppState with OnceCell
  • Secure extraction - Path traversal protection, file size limits
  • Smart downloads - Progress tracking and hash verification
  • Cross-platform - Windows, macOS, Linux support
  • Zero dependencies - Minimal external dependencies for core operations

Documentation

📚 Complete Documentation

Guide Description
How to Use Practical usage guide with examples
Overview Architecture and design philosophy
Exports Complete export reference
Events CoreEvent types
AppState Application state management
Download File download system
Extract Archive extraction
Hash SHA1 verification utilities
System Platform detection
Macros Logging and file macros

Related Crates

License

MIT