Peppi is a Rust parser for .slp game replay files for Super Smash Brothers Melee for the Nintendo GameCube. These replays are generated by Jas Laferriere's Slippi recording code, which runs on a Wii or the Dolphin emulator.
Peppi is fairly full-featured already, but still under active development. APIs are still subject to breaking change until version 1.0 is released.
In your Cargo.toml
:
toml
[dependencies]
peppi = "1.0-alpha"
```rust use std::{fs, io};
fn main() { let mut buf = io::BufReader::new( fs::File::open("game.slp").unwrap()); let game = peppi::game(&mut buf, None).unwrap(); println!("{:#?}", game); } ```
```rust use std::{fs, io};
use peppi::frame; use peppi::parse::{Handlers, FrameEvent, PortId};
struct FramePrinter {}
impl Handlers for FramePrinter {
fn frame_post(&mut self, post: FrameEvent
fn main() { let f = fs::File::open("game.slp").unwrap(); let mut r = io::BufReader::new(f); let mut handlers = FramePrinter {};
peppi::parse(&mut r, &mut handlers, None).unwrap();
} ```
⚠ The slp
tool has moved to the peppi-slp crate.