https://github.com/wowemulation-dev/warcraft-rs
A collection of Rust crates handling World of Warcraft file formats for WoW 1.x to 5.x.
https://github.com/wowemulation-dev/warcraft-rs
Last synced: 6 months ago
JSON representation
A collection of Rust crates handling World of Warcraft file formats for WoW 1.x to 5.x.
- Host: GitHub
- URL: https://github.com/wowemulation-dev/warcraft-rs
- Owner: wowemulation-dev
- License: apache-2.0
- Created: 2025-06-08T02:08:59.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-08T09:22:09.000Z (10 months ago)
- Last Synced: 2025-06-08T10:23:57.104Z (10 months ago)
- Language: Rust
- Homepage:
- Size: 419 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# warcraft-rs
A Rust library and CLI toolset for parsing, manipulating, and creating World of Warcraft file formats.
[](https://discord.gg/Q44pPMvGEd)
[](LICENSE-APACHE)
[](LICENSE-MIT)
[](https://github.com/wowemulation-dev/warcraft-rs/actions)
[](https://codecov.io/gh/wowemulation-dev/warcraft-rs)
[](https://crates.io/crates/warcraft-rs)
[](https://docs.rs/warcraft-rs)
[](https://github.com/arlyon/awesome-wow-rust)
Part of the [awesome-wow-rust](https://github.com/arlyon/awesome-wow-rust) community.
## WoW Version Support
Supports World of Warcraft versions **1.12.1 through 5.4.8**:
| Version | Expansion | Status |
|---------|-----------|--------|
| 1.12.1 | Vanilla | ✅ Full Support |
| 2.4.3 | Burning Crusade | ✅ Full Support |
| 3.3.5a | Wrath of the Lich King | ✅ Full Support |
| 4.3.4 | Cataclysm | ✅ Full Support |
| 5.4.8 | Mists of Pandaria | ✅ Full Support |
## Supported File Formats
- **MPQ Archives** - Game data archives with StormLib compatibility and
parallel processing
- **DBC** - Client database files containing game data
- **BLP Textures** - Compressed texture format with DXT and palette support
- **M2 Models** - Character, creature, and object 3D models
- **WMO Objects** - World map objects (buildings, structures)
- **ADT Terrain** - Terrain chunks with heightmaps and textures
- **WDT Maps** - World definitions and tile layouts
- **WDL Maps** - Low-resolution terrain heightmaps
## Quick Start
### Command-Line Usage
```bash
# Extract files from MPQ archives (uses parallel processing by default)
warcraft-rs mpq extract patch.mpq --output ./extracted
# Extract with custom thread count
warcraft-rs mpq extract patch.mpq --output ./extracted --threads 4
# Get information about any file format
warcraft-rs mpq info archive.mpq
warcraft-rs blp info texture.blp
warcraft-rs wdt info map.wdt
# Validate archive integrity (parallel by default)
warcraft-rs mpq validate archive.mpq --check-checksums
# Convert between formats and versions
warcraft-rs blp convert texture.blp texture.png
warcraft-rs wmo convert classic.wmo modern.wmo --to cataclysm
```
### Library Usage
```rust
use wow_mpq::Archive;
use wow_blp::parser::load_blp;
// Read files from MPQ archives
let mut archive = Archive::open("patch.mpq")?;
let file_data = archive.read_file("Interface\\Icons\\spell.blp")?;
// List files in archive (from listfile)
let files = archive.list()?;
for entry in files {
println!("{}: {} bytes", entry.name, entry.size);
}
// Parse BLP textures
let blp_image = load_blp("texture.blp")?;
println!("Texture: {}x{}", blp_image.header.width, blp_image.header.height);
```
Add to your `Cargo.toml`:
```toml
[dependencies]
wow-mpq = "0.4.0"
wow-blp = "0.4.0"
wow-adt = "0.4.0"
# ... other formats as needed
```
## Installation
### Binary Releases
Pre-built binaries are available for Linux, macOS, and Windows:
```bash
# Unix/Linux/macOS
curl -fsSL https://raw.githubusercontent.com/wowemulation-dev/warcraft-rs/main/install.sh | bash
# Windows PowerShell
irm https://raw.githubusercontent.com/wowemulation-dev/warcraft-rs/main/install.ps1 | iex
```
### From crates.io
```bash
# Install the CLI tool
cargo install warcraft-rs
# Add specific crates as dependencies
cargo add wow-mpq wow-blp wow-adt
```
### Build from source
```bash
git clone https://github.com/wowemulation-dev/warcraft-rs
cd warcraft-rs
cargo install --path warcraft-rs
```
## Documentation
- [Getting Started Guide](docs/getting-started/quick-start.md)
- [Format Documentation](docs/formats/)
- [API Reference](docs/api/)
- [Usage Examples](docs/guides/)
## Contributing
See the [Contributing Guide](CONTRIBUTING.md) for development setup and guidelines.
Thanks to all [contributors](CONTRIBUTORS.md).
## License
This project is dual-licensed under either:
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or )
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )
You may choose to use either license 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.
---
*This project represents the collective knowledge of the WoW modding community
and is based on reverse engineering efforts. Blizzard Entertainment has not
officially documented any formats handled by this project.*