#hdf5 #native-bindings #version #time #direct #set

sys hdf5-metno-sys

Native bindings to the HDF5 library

2 releases

0.9.1 Aug 9, 2024
0.9.0 Aug 8, 2024

#487 in Filesystem

Download history 557/week @ 2024-08-05 440/week @ 2024-08-12 250/week @ 2024-08-19 580/week @ 2024-08-26 392/week @ 2024-09-02 358/week @ 2024-09-09 800/week @ 2024-09-16 648/week @ 2024-09-23 343/week @ 2024-09-30 576/week @ 2024-10-07 956/week @ 2024-10-14 1124/week @ 2024-10-21

3,021 downloads per month
Used in 12 crates (7 directly)

MIT/Apache

4.5MB
66K SLoC

C 55K SLoC // 0.4% comments Rust 7.5K SLoC // 0.0% comments M4 2K SLoC // 0.3% comments FORTRAN Modern 1.5K SLoC // 0.1% comments Automake 231 SLoC // 0.5% comments C++ 173 SLoC // 0.3% comments Happy 89 SLoC Lex 30 SLoC // 0.1% comments Shell 6 SLoC // 0.7% comments

hdf5-sys

This crate provides direct bindings to the HDF5 C library and allows to build the library from C sources if need be, so it can be linked in statically.

Static linking

This crate supports linking to a static build of HDF5. The HDF5 C library is built via the hdf5-src crate which is then linked in when the static feature is set. See below for a list of supported options for static builds.

As of the time of writing, the version of the HDF5 library that is built is 1.10.5, but it may be incremented later.

Crate features

Features propagated upwards will be detected based on features available for the chosen library. The library selected can always be overridden by specifying the environment variable HDF5_DIR.

General features:

  • mpio: enable MPI support (not supported in static mode)
  • static: build HDF5 C library from source (see below for a list of options)

These options are mutually exclusive. This combination could be supported in the future, see issue #101.

The following features affect the HDF5 build options when compiling it from source:

  • hl: enable high-level features (which we don't provide bindings for)
  • threadsafe: build a thread-safe version of the library
  • zlib: enable zlib filter support
  • deprecated: include deprecated symbols (which we don't provide bindings for)

Note: HDF5 library has a separate BSD-style license.

Dependencies

~0.4–5.5MB
~26K SLoC