spyparty

Crates.iospyparty
lib.rsspyparty
version0.1.9
sourcesrc
created_at2019-03-21 22:33:09.925742
updated_at2020-05-04 13:11:03.39173
descriptionA library for parsing SpyParty replays.
homepagehttps://github.com/adamransom/spyparty-rs
repositoryhttps://github.com/adamransom/spyparty-rs
max_upload_size
id122990
size555,908
Adam Ransom (adamransom)

documentation

README

spyparty-rs

Latest version Documentation Minimum Rust version License

A Rust library for parsing SpyParty replays.

It parses everything that is currently documented about the header, but the rest of the replay is currently undocumented (and constantly changing) and therefore not parsed.

It currently supports versions 2 to 6 (the most current) of the replay.

Usage

Add this to your Cargo.toml:

[dependencies]
spyparty = "0.1"

and then try:

use std::fs::File;
use spyparty::{Replay, Map};

let mut file = File::open("tests/basicv6.replay").unwrap();
let replay = Replay::from_reader(&mut file).unwrap();

assert_eq!(replay.header.replay_version, 6);
assert_eq!(replay.header.result_data.map, Map::Teien);

Notes

A lot of the work reverse engineering the replay was done by LtHummus with his Python project, SpyPartyParse. This was also helped by checker (SpyParty's almighty creator), who has now documented the replay header for us over on the SpyParty beta forums (you need to own the game to see these).

Commit count: 31

cargo fmt