Accumath

Open source

hdf5-rust

Pure-Rust HDF5 reader and writer with no C library. Free and open source, built by the Accumath team for the community.

About

Pure-Rust HDF5 file reader and writer. No libhdf5, no C FFI, and no crate dependencies. Minimum Rust version 1.70.

Current version 1.0.4 · License MIT OR Apache-2.0

hdf5-rust on crates.io · Source on GitHub

Built and tested (1–15)

35 tests pass on version 1.0.4, including interop tests with Python h5py 3.16. The tests also pass on the stated minimum Rust version, 1.70. Two MATLAB interop tests are skipped because they need MATLAB. An item is listed here only when it is built, has tests, and those tests pass.

  1. 1Write and read 64-bit float datasets bit for bit
  2. 2Write and read 32-bit float datasets bit for bit
  3. 3Integer datasets (i8, i16, i32, i64, u8, u16, u32, u64)
  4. 4Opaque fixed-size record datasets
  5. 5Scalar through rank-5 datasets, including mixed ranks in one file
  6. 6Append rows along the first dimension, rejecting shape mismatches
  7. 7Read a slice of rows without loading the whole dataset
  8. 8Groups and nested paths, with listing of groups and datasets
  9. 9String attributes (write, read, list), including h5py variable-length strings
  10. 10Read files written by h5py (default format and libver="latest")
  11. 11Read uncompressed chunked datasets written by h5py
  12. 12Files it writes open correctly in h5py
  13. 13Typed errors instead of panics or guessed data (bad signature, missing dataset, wrong type, compressed or unsupported layouts)
  14. 14In-memory encode and decode, plus file save and open
  15. 15Jenkins lookup3 checksum used by newer HDF5 metadata

Still to build (16–20)

  1. 16no_std build (a missing import currently breaks it)
  2. 17Datasets above rank 5, up to rank 32
  3. 18Reading superblock version 1 files
  4. 19Verified interop with MATLAB, Julia HDF5.jl, and HDFView
  5. 20WebAssembly build

All open-source projects Buy a pre-release Accumath license — $25+