wow-cdbc
Parser for World of Warcraft DBC (client database) files.
Features
- 🔍 Parse DBC files with runtime schema definition
- 📊 Type-safe field access with proper value types
- 🔤 Efficient string block handling with caching support
- 🗂️ Indexed lookups by key field for fast access
- 🔬 Schema discovery for unknown DBC formats
- 📝 DBD (Database Definition) file support for WoWDBDefs compatibility
- 🚀 Lazy loading support for large files
- 🛠️ Export to common formats (CSV, JSON, YAML)
Installation
Add to your Cargo.toml:
[]
= "0.3.0"
Or use cargo add:
Usage
use ;
// Define a schema for the Map.dbc file
let mut schema = new;
schema.add_field;
schema.add_field;
schema.add_field;
schema.add_field;
schema.add_field;
schema.add_field;
schema.set_key_field;
// Parse the DBC file
let data = read?;
let parser = parse_bytes?
.with_schema?;
let records = parser.parse_records?;
// Access records by index
if let Some = records.get_record
// Or lookup by key
if let Some = records.get_record_by_key
Supported Versions
- ✅ Classic (1.12.1) - WDBC format
- ✅ The Burning Crusade (2.4.3) - WDBC format
- ✅ Wrath of the Lich King (3.3.5a) - WDBC format
- ✅ Cataclysm (4.3.4) - WDBC format
- ✅ Mists of Pandaria (5.4.8) - WDB2/WDB5 formats
DBD Support
This crate supports WoWDBDefs Database Definition files for automatic schema generation. DBD files provide community-maintained schema definitions for various WoW versions.
use parse_dbd_file;
// Parse a DBD file
let dbd = parse_dbd_file?;
// Convert to schemas for different versions
let schemas = convert_to_yaml_schemas;
Tools
The crate includes several command-line tools:
dbc_tool- Info, list, export, and validate DBC filesdbc_schema_discovery_tool- Analyze DBC files to discover their schemadbd_to_yaml- Convert DBD definition files to YAML schemas
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.