#nbt #minecraft #serde #serialization

hematite-nbt

A full-featured library for working with Minecraft's Named Binary Tag (NBT) file format, including Serde support

8 releases (4 breaking)

Uses old Rust 2015

0.5.2 May 15, 2021
0.5.1 Feb 22, 2021
0.5.0 Aug 18, 2020
0.4.1 Aug 20, 2019
0.1.0 Dec 1, 2015

#552 in Encoding

Download history 135/week @ 2023-02-07 223/week @ 2023-02-14 225/week @ 2023-02-21 151/week @ 2023-02-28 185/week @ 2023-03-07 218/week @ 2023-03-14 124/week @ 2023-03-21 163/week @ 2023-03-28 128/week @ 2023-04-04 108/week @ 2023-04-11 53/week @ 2023-04-18 237/week @ 2023-04-25 156/week @ 2023-05-02 83/week @ 2023-05-09 127/week @ 2023-05-16 126/week @ 2023-05-23

541 downloads per month
Used in 22 crates (20 directly)

MIT license

86KB
2K SLoC

hematite_nbt hematite_nbt at crates.io hematite_nbt at docs.rs Build Status

This repository contains the Hematite project's standalone nbt crate for working with Minecraft's Named Binary Tag (NBT) format.

This is not the only NBT-related crate available, but it has some notable features:

  • Full support for serializing and deserializing types via Serde. This means that you can read and write the NBT binary format of any struct annotated with the standard #[derive(Serialize, Deserialize)] traits (provided it actually has a valid NBT representation).

  • An API that attempts to differentiate between complete and partial NBT objects via nbt::Blob and nbt::Value. Only complete objects can be serialized.

  • Support for the TAG_Long_Array data introduced in Minecraft 1.12.

  • Support for the modified UTF-8 encoding used by the vanilla Minecraft client.

License

Licensed under the terms of the MIT license.

Dependencies

~1–1.7MB
~37K SLoC