#nbt #minecraft #serde #serialization

hematite-nbt

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

7 releases (4 breaking)

Uses old Rust 2015

new 0.5.1 Feb 22, 2021
0.5.0 Aug 18, 2020
0.4.1 Aug 20, 2019
0.4.0 Dec 9, 2018
0.1.0 Dec 1, 2015

#80 in Encoding

Download history 82/week @ 2020-11-07 61/week @ 2020-11-14 69/week @ 2020-11-21 64/week @ 2020-11-28 66/week @ 2020-12-05 30/week @ 2020-12-12 45/week @ 2020-12-19 40/week @ 2020-12-26 89/week @ 2021-01-02 119/week @ 2021-01-09 87/week @ 2021-01-16 102/week @ 2021-01-23 97/week @ 2021-01-30 86/week @ 2021-02-06 102/week @ 2021-02-13 112/week @ 2021-02-20

327 downloads per month
Used in less than 6 crates

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

~0.9–1.6MB
~36K SLoC