mcnbt
Read and write NBT files.
Installation
cargo add mcnbt
Examples
Reading NBT data.
use ;
let tag = from_bytes;
println!;
Writing NBT data.
use ;
let tag = nbt!;
println!;
Using the CLI
cargo install mcnbt
Usage: nbt [OPTIONS] <path>
Arguments:
<path> The path to the NBT file
Options:
-L, --little-endian Use little endian byte order
-h, --help Print help
-V, --version Print version
Using the Web
The web directory conatains a web interface which uses mcnbt in the back-end.
See it in action here.

Using serde
cargo add -F serde mcnbt
use Tag;
use Value;
let data = Compound;
assert_eq!;
Resources
Here are some websites explaining the NBT file format that have been used for the development of this library.
- https://wiki.vg/NBT
- https://minecraft.wiki/w/NBT_format#Binary_format
- https://wiki.bedrock.dev/nbt/nbt-in-depth.html
Contributing
Running Tests
cargo test --all-features
# ^^^^^^^^^^^^^^ important