This review is from Crev, a distributed system for code reviews. To add your review, set up cargo-crev.

The current version of fastnbt is 2.5.0.

2.4.4 (older version) Rating: Neutral Thoroughness: Low Understanding: Low

by kpreid on 2023-06-03

Contains some straightforward unsafe code:

  • [i8][u8] and Vec<u8>Vec<i8> reinterpretations.
  • Converting UTF-8 Strings to bytes and then relying on the bytes being UTF-8.

Contains no IO operations (std::fs etc.) except in the examples.

I have not reviewed the correctness of the algorithms. I have examined the code to check that it is not obviously malicious or obfuscated, and that it looks like the kind of code that does what it is supposed to (that is: implement a de/serializer).


Lib.rs has been able to verify that all files in the crate's tarball, except Cargo.lock, are in the crate's repository with a git tag matching the version. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.

Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.

To review the actual code of the crate, it's best to use cargo crev open fastnbt. Alternatively, you can download the tarball of fastnbt v2.5.0 or view the source online.