| Crates.io | nrbf-parser |
| lib.rs | nrbf-parser |
| version | 0.1.1 |
| created_at | 2026-01-01 19:28:56.031937+00 |
| updated_at | 2026-01-03 09:41:36.225012+00 |
| description | A high-performance MS-NRBF binary parser and encoder for Rust |
| homepage | |
| repository | https://github.com/driedpampas/nrbf-parser |
| max_upload_size | |
| id | 2017353 |
| size | 117,686 |
A high-performance Rust library for parsing and encoding MS-NRBF (Microsoft .NET Remoting Binary Format) streams.
This format is commonly used by .NET applications and Unity games for binary serialization.
serde..meta files (not included for privacy reasons)).cargo add nrbf-parser
use nrbf_parser::Decoder;
use std::fs::File;
use std::io::BufReader;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let file = File::open("data.meta")?;
let mut decoder = Decoder::new(BufReader::new(file));
let mut records = Vec::new();
while let Some(record) = decoder.decode_next()? {
records.push(record);
}
println!("{}", serde_json::to_string_pretty(&records)?);
Ok(())
}
use nrbf_parser::Encoder;
use std::fs::File;
use std::io::BufWriter;
fn encode_records(records: &[Record]) -> Result<(), Box<dyn std::error::Error>> {
let file = File::create("output.meta")?;
let mut encoder = Encoder::new(BufWriter::new(file));
for record in records {
encoder.encode(record)?;
}
Ok(())
}
The library includes implementation examples for testing and verification:
cargo run --example parse_meta -- <file>: Simple parser example.cargo run --example round_trip -- <file>: Verifies that parsing and re-encoding returns identical binary data.This project is licensed under the GNU General Public License v3.0 (GPL-3.0 or later) by driedpampas [at] proton [dot] me.