#minecraft #binary-format #nbt #serialization #file-format #serde #read-write

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

#1137 in Encoding

Download history 66/week @ 2024-10-05 123/week @ 2024-10-12 137/week @ 2024-10-19 188/week @ 2024-10-26 198/week @ 2024-11-02 52/week @ 2024-11-09 106/week @ 2024-11-16 185/week @ 2024-11-23 194/week @ 2024-11-30 277/week @ 2024-12-07 357/week @ 2024-12-14 192/week @ 2024-12-21 353/week @ 2024-12-28 290/week @ 2025-01-04 331/week @ 2025-01-11 246/week @ 2025-01-18

1,263 downloads per month
Used in 26 crates (24 directly)

MIT license

87KB
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.7–1.5MB
~31K SLoC