Crates.io | warcraft-rs |
lib.rs | warcraft-rs |
version | 0.3.2 |
created_at | 2025-06-29 06:58:28.810778+00 |
updated_at | 2025-08-29 04:03:00.031946+00 |
description | Unified CLI for World of Warcraft file format parsing, conversion, and validation |
homepage | https://github.com/wowemulation-dev/warcraft-rs |
repository | https://github.com/wowemulation-dev/warcraft-rs |
max_upload_size | |
id | 1730465 |
size | 380,416 |
Unified command-line tool for working with World of Warcraft file formats.
# Install with all features
cargo install warcraft-rs --features full
# Or install with specific features only
cargo install warcraft-rs --features "mpq dbc"
# Clone the repository
git clone https://github.com/wowemulation-dev/warcraft-rs
cd warcraft-rs/warcraft-rs
# Build with all features
cargo build --release --features full
# Or build with specific features only
cargo build --release --features "mpq dbc"
# The binary will be at target/release/warcraft-rs
# Install with all formats
cargo install --path . --features full
# Or with specific formats only
cargo install --path . --features "mpq blp"
The warcraft-rs
CLI provides subcommands for each supported file format:
warcraft-rs <format> <command> [options]
mpq
- MPQ archive operations (implemented)dbc
- DBC database operations (implemented)blp
- BLP texture operations (planned)m2
- M2 model operations (planned)wmo
- WMO object operations (implemented)adt
- ADT terrain operations (implemented)wdt
- WDT map operations (implemented)wdl
- WDL world operations (implemented)# List files in an archive
warcraft-rs mpq list archive.mpq
warcraft-rs mpq list archive.mpq --long
warcraft-rs mpq list archive.mpq --filter "*.dbc"
# Extract files
warcraft-rs mpq extract archive.mpq
warcraft-rs mpq extract archive.mpq --output ./extracted
warcraft-rs mpq extract archive.mpq file1.txt file2.dat
# Create a new archive
warcraft-rs mpq create new.mpq --add file1.txt --add file2.dat
warcraft-rs mpq create new.mpq --add *.txt --version v2 --compression zlib
# Show archive information
warcraft-rs mpq info archive.mpq
warcraft-rs mpq info archive.mpq --show-hash-table
# Validate archive integrity
warcraft-rs mpq validate archive.mpq
-v, --verbose
- Increase verbosity (can be repeated)-q, --quiet
- Suppress all output except errors--help
- Show help for any commandGenerate shell completions for your shell:
# Bash
warcraft-rs completions bash > ~/.local/share/bash-completion/completions/warcraft-rs
# Zsh
warcraft-rs completions zsh > ~/.zfunc/_warcraft-rs
# Fish
warcraft-rs completions fish > ~/.config/fish/completions/warcraft-rs.fish
# PowerShell
warcraft-rs completions powershell > _warcraft-rs.ps1
The CLI can be built with different feature flags to include only the formats you need:
default
- Includes MPQ support onlyfull
- Includes all format supportmpq
- MPQ archive supportdbc
- DBC database supportblp
- BLP texture supportm2
- M2 model supportwmo
- WMO object supportadt
- ADT terrain supportwdt
- WDT map supportwdl
- WDL world support# Extract all DBC files from an MPQ
warcraft-rs mpq list patch.mpq --filter "*.dbc" | \
xargs warcraft-rs mpq extract patch.mpq --output ./dbc_files
# Create a new MPQ with compressed files
warcraft-rs mpq create my_mod.mpq \
--add data/*.txt \
--add scripts/*.lua \
--compression zlib \
--with-listfile
# Validate multiple archives
for mpq in *.mpq; do
echo "Checking $mpq..."
warcraft-rs mpq validate "$mpq"
done
Once implemented, other formats will follow similar patterns:
# Convert BLP textures to PNG
warcraft-rs blp convert texture.blp --to png
# Export DBC to JSON
warcraft-rs dbc export Items.dbc --format json --output items.json
# Get model information
warcraft-rs m2 info character.m2
See the main warcraft-rs repository for development information.