Small serialization library for Rust

deltanedas d39aa94e06 add Io::size, optional usize -> u64 io 3 년 전
orio-derive d39aa94e06 add Io::size, optional usize -> u64 io 3 년 전
src d39aa94e06 add Io::size, optional usize -> u64 io 3 년 전
.gitignore 574f41d36b first commit 3 년 전
Cargo.toml d39aa94e06 add Io::size, optional usize -> u64 io 3 년 전
LICENSE a0ef58e420 ready for publish 3 년 전
README.md ed52e62c84 some doc 3 년 전

README.md

Orio

Lightweight and clean alternative to serde, focusing on writing to and from Vec<u8>s.

#[derive(Io)]
struct Thingy {
	name: String,
	kind: ThingyKind,
	#[io(ignore)]
	debug: String
}

#[derive(Io)]
enum ThingyKind {
	Normal,
	Special(String)
}

let thingy = Thingy {
	name: "thing".to_owned(),
	kind: ThingyKind::Normal,	
	debug: "not written".to_owned()
}
let mut bytes = vec![];
thingy.write(&mut bytes);

Under the hood its a generic wrapper over little-endian byteorder with a derive macro for structs and enums to use.

Named after the cookie :)

License

MIT license