Events

Overview

lighty-core emits CoreEvent types through the event bus system provided by lighty-event. These events track extraction operations progress.

Feature: Requires events feature flag

Export:

  • Event types: lighty_event::CoreEvent

  • Re-export: lighty_launcher::event::CoreEvent

CoreEvent Types

ExtractionStarted

Emitted when archive extraction begins.

Fields:

  • archive_type: String - Archive format ("ZIP", "TAR", "TAR.GZ")

  • file_count: usize - Total number of files to extract

  • destination: String - Output directory path

When emitted: At the start of zip_extract, tar_extract, or tar_gz_extract

Example:

FileExtracted

Emitted after each file is successfully extracted from the archive.

Fields:

  • file_name: String - Name of the extracted file

  • index: usize - Current file index (0-based)

  • total: usize - Total number of files

When emitted: After each file write operation completes

Example:

ExtractionComplete

Emitted when all files have been successfully extracted.

Fields:

  • file_count: usize - Total number of files extracted

When emitted: After the last file is extracted and all operations complete

Example:

Complete Event Flow

Output:

Event Timing

Extraction Flow

Integration with Other Crates

lighty-java

Uses CoreEvent for tracking Java runtime extraction:

lighty-loaders

May use extraction for mod archives:

Exports

Event types:

Core extraction functions (from lighty-core):

Last updated