π οΈ League Toolkit
Rust library for parsing, editing, and writing League of Legends file formats
Documentation β’ Crates.io β’ Changelog
β¨ Features
- π¦ WAD Archives β Read and write
.wad.clientasset containers - π¨ Textures β Decode/encode
.texand.ddsformats - π§ Meshes β Parse skinned (
.skn) and static (.scb/.sco) meshes - 𦴠Animation β Load skeletons (
.skl) and animations (.anm) - π Property Bins β Read/write
.binconfiguration files - πΊοΈ Map Geometry β Parse
.mapgeoenvironment assets - π§ Modular β Use individual crates or the umbrella crate
π¦ Installation
Add the umbrella crate to your project:
[]
= { = "0.2", = ["wad", "mesh", "texture"] }
Or use individual crates for a smaller dependency footprint:
[]
= "0.2"
= "0.4"
= "0.3"
π Quick Start
Reading a WAD Archive
use File;
use Wad;
Decoding a Texture
use Tex;
use Cursor;
let tex = from_reader?;
let surface = tex.decode_mipmap?;
let image = surface.into_rgba_image?;
image.save?;
Parsing a Skinned Mesh
use SkinnedMesh;
use File;
let mesh = from_reader?;
println!;
println!;
Working with Property Bins
use ;
// Read
let tree = from_reader?;
for in &tree.objects
// Create
let tree = builder
.dependency
.object
.build;
π Crates
| Crate | Description | Formats |
|---|---|---|
league-toolkit |
Umbrella crate (feature-gated re-exports) | β |
ltk_wad |
WAD archive reading/writing | .wad.client |
ltk_texture |
Texture decoding/encoding | .tex, .dds |
ltk_mesh |
Skinned & static mesh parsing | .skn, .scb, .sco |
ltk_anim |
Skeleton & animation formats | .skl, .anm |
ltk_meta |
Property bin files | .bin |
ltk_ritobin |
Human-readable bin format | ritobin text |
ltk_mapgeo |
Map environment geometry | .mapgeo |
ltk_file |
File type detection | β |
ltk_hash |
Hash functions (FNV-1a, ELF) | β |
ltk_shader |
Shader path utilities | β |
ltk_primitives |
Geometric primitives | β |
ltk_io_ext |
I/O extensions (internal) | β |
Each crate lives under crates/<name>.
βοΈ Feature Flags
The league-toolkit umbrella crate uses feature flags to control which subsystems are included:
| Feature | Enables | Default |
|---|---|---|
anim |
ltk_anim |
β |
file |
ltk_file |
β |
mesh |
ltk_mesh |
β |
meta |
ltk_meta |
β |
primitives |
ltk_primitives |
β |
texture |
ltk_texture |
β |
wad |
ltk_wad |
β |
hash |
ltk_hash |
β |
serde |
Serde support (where available) | β |
For a minimal build, disable defaults and opt-in selectively:
[]
= { = "0.2", = false, = ["wad"] }
Texture Encoding with intel-tex
BC1/BC3 texture encoding requires the optional intel-tex feature on ltk_texture:
[]
= { = "0.2", = ["texture"] }
= { = "0.4", = ["intel-tex"] }
π Documentation
- API Documentation β Full rustdoc reference
- LTK Guide β Comprehensive usage guide with examples
π οΈ Development
Prerequisites: Rust stable toolchain
# Build all crates
# Run tests
# Build documentation
AI-Assisted Development with Speckit
This repository uses the Speckit workflow for developing new features and fixing bugs with AI agents (e.g., Claude Code). Speckit enforces a structured specification-plan-task pipeline so that all AI-generated work is auditable and reviewable before it lands in a PR.
Why? AI agents can produce large, hard-to-review changesets. Speckit breaks work into discrete, reviewable artifacts β a spec, a design plan, and an ordered task list β so maintainers can catch issues early and PRs stay focused.
The workflow:
/speckit.specifyβ Create or update a feature specification from a natural language description/speckit.clarifyβ Identify underspecified areas and resolve ambiguities/speckit.planβ Generate a design plan with architectural decisions/speckit.tasksβ Produce a dependency-ordered task list/speckit.analyzeβ Cross-check consistency across spec, plan, and tasks/speckit.implementβ Execute the task list/speckit.taskstoissuesβ Convert tasks into GitHub issues for tracking
All artifacts live in a .specify/ directory scoped to the feature. The project's design principles are codified in .specify/memory/constitution.md.
Contributors using AI agents SHOULD follow this workflow to ensure that proposed changes are well-specified and easy to review. PRs generated without a spec/plan trail may require additional review cycles.
Project Structure
league-toolkit/
βββ crates/
β βββ league-toolkit/ # Umbrella crate
β βββ ltk_wad/ # WAD archives
β βββ ltk_texture/ # Textures
β βββ ltk_mesh/ # Meshes
β βββ ltk_anim/ # Animation
β βββ ltk_meta/ # Property bins
β βββ ltk_ritobin/ # Ritobin text format
β βββ ltk_mapgeo/ # Map geometry
β βββ ltk_file/ # File detection
β βββ ltk_hash/ # Hashing
β βββ ltk_shader/ # Shader utilities
β βββ ltk_primitives/ # Primitives
β βββ ltk_io_ext/ # I/O extensions
βββ docs/
βββ LTK_GUIDE.md # Usage guide
π Releasing
This repository uses Release-plz for automated versioning and publishing:
- Pushes to
maintrigger Release-plz to open a release PR - Merging the release PR publishes updated crates to crates.io
π License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Made with β€οΈ by the LeagueToolkit community