Skip to content

Repository files navigation

broodrep

A pure Rust library for reading StarCraft 1 replay files. Supports all versions.

Components

This project is organized as a Cargo workspace containing:

  • broodrep - The core library for parsing StarCraft replay files
  • broodrep-cli - A command-line interface for the library
  • broodrep-wasm - WebAssembly bindings for browser and Node.js usage

WebAssembly Support

Use broodrep in web browsers and Node.js with the WebAssembly bindings:

import init, { parseReplay } from '@shieldbattery/broodrep';

await init(); // Initialize WASM module

const replayData = new Uint8Array(/* your replay file bytes */);
const replayInfo = parseReplay(replayData);

console.log('Game:', replayInfo.gameTitle);
console.log('Map:', replayInfo.mapName);
console.log('Players:', replayInfo.activePlayers);

See broodrep-wasm for complete documentation and examples.

Development

Test data is stored in Git LFS. If you haven't used Git LFS before, run:

git lfs install

Performance benchmarks cover header indexing from memory and files, section decompression, command collection/visitation, and dense command streams:

cargo bench -p broodrep --bench replay_parsing
cd broodrep-wasm && pnpm bench

See also

  • broodmap - a pure Rust implementation of StarCraft 1 map parsing

License

Licensed under either of

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.

About

A pure Rust library for reading StarCraft 1 replay files

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages