https://github.com/wowemulation-dev/cascette-rs
A collection of Blizzard NGDP tools written for Rust.
https://github.com/wowemulation-dev/cascette-rs
blizzard casc ngdp reverse-engineering tact
Last synced: 6 months ago
JSON representation
A collection of Blizzard NGDP tools written for Rust.
- Host: GitHub
- URL: https://github.com/wowemulation-dev/cascette-rs
- Owner: wowemulation-dev
- License: apache-2.0
- Created: 2025-06-15T07:00:22.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-12T06:22:08.000Z (8 months ago)
- Last Synced: 2025-09-22T22:43:29.799Z (6 months ago)
- Topics: blizzard, casc, ngdp, reverse-engineering, tact
- Language: Rust
- Homepage:
- Size: 1.28 MB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# cascette-rs
Rust implementation of Blizzard's NGDP (Next Generation Distribution Pipeline)
for World of Warcraft emulation.
[](https://discord.gg/Q44pPMvGEd)
[](LICENSE-APACHE)
[](LICENSE-MIT)
[](https://github.com/wowemulation-dev/cascette-rs/actions)
[](https://crates.io/crates/ngdp-client)
[](https://docs.rs/ngdp-client)
## ๐ฏ Project Status
**Current Version**: 0.4.3
### Core Components
| Component | Version | Status | Description |
| --------------- | ------- | ----------- | -------------------------------------------------- |
| `ngdp-bpsv` | 0.4.3 | โ
Stable | BPSV parser/writer for NGDP formats |
| `ribbit-client` | 0.4.3 | โ
Stable | Ribbit protocol client with signature verification |
| `tact-client` | 0.4.3 | โ
Stable | TACT HTTP client with retry logic and batching |
| `tact-parser` | 0.4.3 | โ
Stable | TACT file format parser (encoding, install, etc.) |
| `ngdp-cdn` | 0.4.3 | โ
Stable | CDN client with fallback hosts and connection pooling |
| `ngdp-cache` | 0.4.3 | โ
Stable | Comprehensive caching layer with LRU eviction |
| `blte` | 0.4.3 | โ
Stable | BLTE decompression with memory pooling |
| `ngdp-crypto` | 0.4.3 | โ
Stable | Modern encryption with Salsa20 and key service |
| `ngdp-client` | 0.4.3 | โ
Stable | CLI tool for NGDP operations |
| `casc-storage` | 0.4.3 | ๐ง Beta | CASC storage implementation (in development) |
| `ngdp-patch` | 0.4.3 | ๐ง Beta | Patch file support (in development) |
### Implementation Progress
- โ
**Version Discovery**: HTTP-first approach with HTTPS endpoints, Ribbit fallback
for compatibility
- โ
**TACT Protocol**: HTTP/HTTPS clients for version and CDN queries with retry
logic
- โ
**BPSV Format**: Parser and builder with zero-copy optimizations
- โ
**TACT Parsers**: Support for encoding, install, download, size, build config,
TVFS
- โ
**BLTE Decompression**: Compression modes (ARC4/Frame deprecated in v0.4.0)
- โ
**Encryption**: Salsa20 cipher with key management (ARC4 deprecated)
- โ
**CDN Operations**: Parallel downloads, streaming, retry logic, rate limiting
- โ
**Caching**: HTTP-first caching with fallbacks and TTL support
- โ
**Install Command**: Client installation with .build.info generation for restoration
- โ
**Build Config**: Uncompressed handling and download order (encoding before manifests)
- ๐ง **CASC Storage**: Local storage implementation (in development)
- ๐ **TVFS**: Parser implemented, needs real-world data testing
## ๐ Quick Start
### Library Usage
Add to your `Cargo.toml`:
```toml
[dependencies]
ribbit-client = "0.4.3"
ngdp-bpsv = "0.4.3"
tact-parser = "0.4.3"
blte = "0.4.3"
ngdp-crypto = "0.4.3"
```
Basic example (HTTP-first approach):
```rust
use ngdp_cache::hybrid_version_client::HybridVersionClient;
use ribbit_client::Region;
#[tokio::main]
async fn main() -> Result<(), Box> {
// Create a hybrid client (HTTP primary, Ribbit fallback)
let client = HybridVersionClient::new(Region::US).await?;
// Request WoW versions with HTTPS endpoints
let versions = client.get_product_versions("wow").await?;
// Print version information
for entry in &versions.entries {
println!(
"{}: {} (build {})",
entry.region, entry.versions_name, entry.build_id
);
}
Ok(())
}
```
## ๐งช Testing with Real WoW Data
Many tests and examples can work with real WoW installation data for comprehensive
testing. This is optional - all tests will skip gracefully if no data is available.
### Setup Environment Variables
Set environment variables pointing to your WoW installation Data directories:
```bash
# Classic Era (1.15.x)
export WOW_CLASSIC_ERA_DATA="$HOME/Downloads/wow/1.15.2.55140.windows-win64/Data"
# Classic with expansions
export WOW_CLASSIC_DATA="$HOME/Downloads/wow/classic/Data"
# Retail (current)
export WOW_RETAIL_DATA="$HOME/Downloads/wow/retail/Data"
```
### Valid Data Directory Structure
The Data directory should contain CASC structure:
```
Data/
โโโ data/ # CASC archive files (required)
โโโ indices/ # CASC index files
โโโ config/ # CASC configuration files
โโโ ...
```
### Running Tests with Real Data
```bash
# Run all tests (will skip those requiring WoW data if not available)
cargo test
# Run specific integration tests
cargo test -p casc-storage --test real_data_integration
# Run examples that use real data
cargo run -p casc-storage --example list_casc_files
```
Tests and examples will automatically:
- Use environment variables when available
- Fall back to common installation paths
- Skip gracefully with helpful setup instructions if no data found
- Work in CI environments without WoW data
## ๐ฆ Installation
### CLI Tool
#### Install with Cargo
```bash
cargo install ngdp-client
```
#### Install with Script (Unix/Linux/macOS)
```bash
curl -fsSL https://raw.githubusercontent.com/wowemulation-dev/cascette-rs/main/install.sh | bash
```
#### Install with Script (Windows PowerShell)
```powershell
irm https://raw.githubusercontent.com/wowemulation-dev/cascette-rs/main/install.ps1 | iex
```
### Library Usage
```bash
cargo add ribbit-client ngdp-bpsv tact-client tact-parser ngdp-cdn ngdp-cache blte ngdp-crypto
```
### From source
```bash
git clone https://github.com/wowemulation-dev/cascette-rs
cd cascette-rs
cargo build --release
# CLI binary will be at target/release/ngdp
```
## ๐ฅ๏ธ CLI Usage
The `ngdp-client` provides a comprehensive command-line interface for NGDP operations:
### Install Game Clients
```bash
# Install WoW Classic Era (minimal installation)
ngdp install game wow_classic_era --install-type minimal --path ./wow-client
# Full installation with verification
ngdp install game wow --install-type full --verify --path ./wow-retail
# Dry-run to see what would be installed
ngdp install game wow_classic --install-type minimal --dry-run --path ./test
```
### Version and CDN Information
```bash
# Query product versions (uses HTTPS endpoints)
ngdp query versions wow
# Get CDN configuration
ngdp query cdns wow
# Inspect build configurations
ngdp inspect build-config
```
### BPSV and File Analysis
```bash
# Parse and display BPSV files
ngdp inspect bpsv ./file.bpsv
# Analyze BLTE files
ngdp inspect blte ./encrypted.blte
```
All commands support multiple output formats (`--format json|text|bpsv`) and the install command automatically creates `.build.info` files for client restoration.
## ๐ Documentation
- [BPSV Format Specification](docs/bpsv-format.md)
- [BPSV Examples](ngdp-bpsv/examples)
- [Ribbit Protocol](docs/ribbit-protocol.md)
- [Ribbit Examples](ribbit-client/examples)
- [TACT Protocol](docs/tact-protocol.md)
## ๐ Online References
- [TACT Reference](https://wowdev.wiki/TACT)
- [Ribbit Reference](https://wowdev.wiki/Ribbit)
- [CASC Reference](https://wowdev.wiki/CASC)
## ๐ง Features
### Complete
- **BPSV Parser/Writer** (`ngdp-bpsv`)
- โ
BPSV format support with zero-copy parsing
- โ
Type-safe field definitions (STRING, HEX, DEC)
- โ
Schema validation and sequence number handling
- โ
Builder pattern for document creation
- โ
Round-trip compatibility
- **Ribbit Protocol Client** (`ribbit-client`)
- โ
Blizzard regions (US, EU, CN, KR, TW, SG)
- โ
V1 (MIME) and V2 (raw) protocol support
- โ
Typed API for all endpoints
- โ
PKCS#7/CMS signature verification
- โ
Certificate and OCSP support
- โ
Retry with exponential backoff
- โ
DNS caching for performance
- **TACT HTTP Client** (`tact-client`)
- โ
Version and CDN configuration queries
- โ
Support for V1 (port 1119) and V2 (HTTPS) protocols
- โ
Typed response parsing
- โ
Retry handling
- โ
Blizzard regions supported
- **CDN Content Delivery** (`ngdp-cdn`)
- โ
Parallel downloads with progress tracking
- โ
Streaming operations for large files
- โ
Retry with rate limit handling
- โ
Content verification
- โ
Configurable connection pooling
- โ
Fallback to backup CDN servers
- โ
Support for community mirrors (arctium.tools, reliquaryhq.com)
- **Caching Layer** (`ngdp-cache`)
- โ
Transparent caching for all NGDP operations
- โ
TTL-based expiration policies
- โ
Streaming I/O for memory efficiency
- โ
CDN-compatible directory structure
- โ
Batch operations for performance
- **TACT File Parsers** (`tact-parser`)
- โ
Encoding files (CKey โ EKey mapping)
- โ
Install manifests with tag-based filtering
- โ
Download manifests with priority sorting
- โ
Size files for installation calculations
- โ
Build configurations (key-value format)
- โ
TVFS (TACT Virtual File System)
- โ
40-bit integer and varint support
- **BLTE Decompression** (`blte`)
- โ
Compression modes (None, ZLib, LZ4, Frame, Encrypted)
- โ
Multi-chunk file support
- โ
Checksum verification
- โ
Integration with ngdp-crypto for encrypted blocks
- โ
Memory processing
- **Encryption Support** (`ngdp-crypto`)
- โ
Salsa20 stream cipher (WoW encryption)
- โ
ARC4/RC4 cipher (legacy content)
- โ
Key management and loading
- โ
Multiple key file formats (CSV, TXT, TSV)
- โ
TACTKeys repository integration
- **CLI Tool** (`ngdp-client`)
- โ
Product queries and version information
- โ
Certificate operations
- โ
BPSV inspection and build config analysis
- โ
Encryption key management commands
- โ
Inspect commands with BLTE support
- โ
Multiple output formats (text, JSON, BPSV)
- โ
Terminal formatting
## ๐ค Contributing
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
Special thanks to the WoW emulation community and the documentation efforts at
[wowdev.wiki](https://wowdev.wiki).
## ๐ License
This project is dual-licensed under either:
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or )
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.
---
**Note**: This project is not affiliated with or endorsed by Blizzard Entertainment.
It is an independent implementation based on reverse engineering efforts by the
community for educational and preservation purposes.