Expand description
§MacLarian
A pure-Rust library for working with Baldur’s Gate 3 and Larian Studios file formats.
§Supported Formats
- PAK archives - Extract, create, and list game asset packages
- LSF/LSX/LSJ - Binary, XML, and JSON document formats
- GR2 - Granny2 mesh files with
BitKnitdecompression - Virtual Textures - GTS/GTP streaming texture extraction
- LOCA - Localization files
- DDS/PNG - Texture conversion
§Quick Start
§Working with PAK Archives
use maclarian::pak::PakOperations;
// List contents of a PAK file
let files = PakOperations::list("Shared.pak")?;
println!("Found {} files", files.len());
// Extract a PAK file
PakOperations::extract("Shared.pak", "output/")?;
// Read a specific file without extracting
let data = PakOperations::read_file_bytes("Shared.pak", "Public/Shared/meta.lsx")?;§Converting Document Formats
use maclarian::converter::convert_lsf_to_lsx;
// Convert LSF (binary) to LSX (XML) file
convert_lsf_to_lsx("meta.lsf", "meta.lsx")?;§Using the Prelude
The prelude provides convenient access to commonly used types:
use maclarian::prelude::*;
// Now you have access to:
// - PakOperations, LsfDocument, LsxDocument, LsjDocument
// - VirtualTextureExtractor, GtsFile, GtpFile
// - Error, Result, and more§Feature Flags
cli- Enables themaclariancommand-line binary
Re-exports§
Modules§
- cli
MacLarianCLI - Command-line interface for Larian file format tools- compression
- Compression utilities
- converter
- Format conversion utilities
- error
- Error types for
MacLarian - formats
- File format handlers for Larian Studios formats
- gr2_
extraction - Smart GR2 extraction with automatic GLB conversion and texture bundling
- merged
- Merged LSX asset database
- mods
- Mod utilities - meta.lsx, info.json generation, and validation for BG3 mods
- pak
- PAK archive operations module
- prelude
- Prelude module for common imports
- utils
- Utility functions
- virtual_
texture - Virtual texture format handlers (GTS/GTP)
Constants§
- VERSION
- The version of the
maclariancrate.