Exports

Overview

This document provides a complete reference of all exports from lighty-core and their re-exports in lighty-launcher.

In lighty_core

App State

use lighty_core::AppState;
use lighty_core::app_state::AppState; // Full path

System Detection

use lighty_core::system::{
    // Constants
    OS,           // Current OS at compile-time
    ARCHITECTURE, // Current architecture at compile-time

    // Types
    OperatingSystem,
    Architecture,
};

Download System

Extract System

Hash Utilities

HTTP Client

Error Types

Or use direct paths:

Macros

All macros are automatically available when using lighty_core:

In lighty_launcher (Re-exports)

From Main Crate

Usage Patterns

Pattern 1: Direct Crate Import

Pattern 2: Via Main Launcher Crate

Pattern 3: Prelude (if available)

Error Handling

System Errors

Download Errors

Extract Errors

Hash Errors

AppState Errors

Feature-Gated Exports

Events Feature

When events feature is enabled:

  • Extract functions accept Option<&EventBus> parameter

  • CoreEvent types are used (from lighty-event)

Tracing Feature

When tracing feature is enabled:

  • trace_debug!, trace_info!, trace_warn!, trace_error! macros emit logs

  • time_it! macro emits performance metrics

When disabled:

  • All macros compile to no-ops

Module Structure

Last updated