- Added support for HDF5 1.10.5 with bindings for new functions.
File::access_plist()orFile::fapl()to get file access plist.File::create_plist()orFile::fcpl()to get file creation plist.- Added high-level wrappers for dataset access H5P API (
plist::DatasetAccess). - Added
hdf5::is_library_threadsafe()function.
- Changed
Fileconstructors, getting rid of string access modes:File::open(path, "r")is nowFile::open(path)File::open(path, "r+")is nowFile::open_rw(path)File::open(path, "w")is nowFile::create(path)File::open(path, "x" | "w-")is nowFile::create_excl(path)File::open(path, "a")is nowFile::append(path)
- Also added
File::open_as(path, mode)which accepts the mode enum. - Rewritten
FileBuilder: it no longer accepts userblock, driver etc; all of these parameters can be set in the corresponding FAPL / FCPL:FileBuilder::set_access_plist()orFileBuilder::set_fapl()to set the active file access plist to a given one.FileBuilder::access_plist()orFileBuilder::fapl()to get a mutable reference to the FAPL builder - any parameter of it can then be tweaked as desired.FileBuilder::with_access_plist()orFileBuilder::with_fapl()to get access to the FAPL builder in an inline way via a closure.- Same as the three above for
create_plist/fcpl.
- As a result, all of the newly added FAPL / FCPL functionality is
fully accessible in the new
FileBuilder. Also, driver strings are gone, everything is strongly typed now. - It's no longer prohibited to set FCPL options when opening a file and not creating it -- it will simply be silently ignored (this simplifies the behavior and allows using a single file builder).
- Added an explicit
hdf5_types::string::StringErrorerror type, as a resulterror-chaindependency has been dropped. hdf5::Erroris now convertible fromndarray::ShapeError;hdf5::ResultExttrait has been removed.- Renamed
hdf5::hdf5_version()tohdf5::library_version().
- Replaced deprecated
std::mem::uninitializedwithstd::mem::MaybeUninit.
- Allow chunk dimensions to exceed dataset dimensions for resizable datasets.
- Default HDF5 location should now be detected automatically on Fedora Linux.
- Added
Group::link_exists(). - Re-export
silence_errors()at the crate root. - Added
from_id()unsafe method at the crate root.
- Using
#[derive(H5Type)]no longer requires addinghdf5-typesas a dependency.
- Added support for HDF5 1.10.
- Added Rust equivalents of HDF5 primitives: arrays, Unicode strings and ASCII strings – all of
them available in both fixed-size or variable-length flavours (
hdf5-typescrate). - Added
H5Typetrait that unifies the types that can be handled by the HDF5 library. This trait is implemented by default for all scalar types, tuples, fixed-size arrays and all types inhdf5-typesand can be used to createDatatypeobjects. - Implemented
#[derive(H5Type)]proc macro that allows for seamless mapping of user-defined structs and enums to their HDF5 counterparts. - Added high-level wrappers for file-creation H5P API (
plist::FileCreate) and file-access H5P API (plist::FileAccess), covering almost the entirety of FCPL and FAPL property list functionality. - Various improvements and additions to
PropertyListtype. - Added support for various file drivers (sec2/stdio/core/family/multi/split/log).
- Added support for MPIO driver (HDF5 has to be built with H5_HAVE_PARALLEL and the crate has to be built with "mpio" feature enabled).
- Added support for direct VFD driver (HDF5 has to be built with H5_HAVE_DIRECT).
- Added some missing bindings to
hdf5-sys: driver-related FAPL bindings in h5p/h5fd (including MPIO and direct VFD drivers), MPIO bindings in h5p/h5f/h5fd. - Added core reading/writing API in
Container, with support for reading/writing scalars, 1-d, 2-d, and dynamic-dimensional arrays, and raw slices. As a side effect, the main crate now depends onndarray.Datasetnow dereferences toContainer. - Added basic support for reading and writing dataset slices.
- When creating datasets, in-memory type layouts are normalized (converted to C repr).
- Added
packedoption toDatasetBuilder(for creating packed HDF5 datasets). - All high-level objects now implement
Clone(shallow copy, increases refcount).
- Renamed
hdf5-rscrate (importable ash5) tohdf5(importable simply ashdf5). - Renamed
libhdf5-syscrate tohdf5-sys(importable ashdf5_sys). - Renamed GitHub repository to
aldanor/hdf5-rust. - Updated the bindings and tests to the latest HDF5 versions (1.10.4 and 1.8.21).
- The build system has been reworked from the ground up:
hdf5-libcrate has been removed; all of the build-time logic now resides in the build script ofhdf5-sys.- The environment variables the build script reacts to are now
HDF5_DIRandHDF5_VERSION. pkg-configis now only launched on Linux.- On macOS, the build scripts detects Homebrew installations, for both 1.8 and 1.10 versions.
- On Windows, we now scan the registry to detect official system-wide installations.
- Dynamic linking now works with conda envs;
HDF5_DIRcan be now pointed to a conda env. - A few definitions from
H5pubconf.hare now exposed as cfg definitions, likeh5_have_parallel,h5_have_threadsafeandh5_have_direct(this requires us to locate the include folder and parse the header at build time).
- Various clean ups in
hdf5-sys: implementedDefaultandClonewhere applicable, moved a few types and methods to matching parent modules. - Major refactor: trait-based type hierarchy has been replaced with a
Deref-based hierarchy instead (53eff4f).IDandFromIDtraits have been removed. Traits likeLocation,Objectand a few other have been replaced with real types (wrappers around HDF5 handles, same as the concrete types likeFile). Subtypes then dereference into parent types, so the user can user methods of the parent type without having to import any traits into scope (for instance,Filedereferences intoGroup, which dereferences intoLocation, which dereferences intoObject). - Dataspaces and property lists can now be copied via
.copy()method (instead of.clone()).
hbool_tis now mapped to unsigned integer of proper size (either 1 byte or 4 bytes), depending on how the HDF5 library was built and on which platform.- Added missing bindings for previous versions (mostly in
h5pandh5fdmodules). - Querying the HDF5 error stack is now thread-safe.
- Error silencing (
silence_errors()) is now thread-safe. - Fixed wrong bindings for
H5AC_cache_config_t.
- Removed
hdf5-libcrate (merged it intohdf5-sys, see above). - Removed
remutexcrate, using locking primitives fromparking_lotcrate instead. Containertrait has been removed, all of its functionality merged intoGrouptype.
- The version number jump is due to renaming crates
hdf5-rsandlibhdf5-systohdf5andhdf5-sys, respectively. Since there were already published crates with those names and the crates registry is meant to be immutable even if the crates are yanked, we had to bump the version so that it shadows all of the older versions.
- Full support of
msvctarget on Windows. CI tests on AppVeyor now use official reeases of HDF5 binaries (1.8.16, VS2015, x86_x64). Thegnutarget are still unofficially supported but won't be tested. - If
HDF5_LIBDIRis not specified when building on Windows andPATHcontains what looks like thebinfolder of HDF5 installation, the library directory will be inferred automatically. The official HDF5 installers add thebinfolder to user path, so the official MSVC releases should just work out of the box without having to set any environment variables. - The library is now split into three crates:
hdf5-lib(requests linkage to HDF5),hdf5-sys(contains bindings, requireshdf5-libat build time in order to conditionally enable or disable certain HDF5 functionality), andhdf5(the user-facing crate, requires both lower-level crates at build time). - Added
hdf5::hdf5_versionfunction. - The minimum required version of the HDF5 library is now 1.8.4.
- Both
hdf5-sysandhdf5crates can now use version attributes at compile time to enable/disable/change functionality. All functions and definitions that appeared in HDF5 versions past 1.8.4 are now conditionally enabled inhdf5-sys. - Added bindings for HDF5 functions that were added in releases 1.8.15 and 1.8.16.
- Static global variables in HDF5 (H5E, H5P, H5T) are now linked based on HDF5 version and not
the target platform (
_ID_gvariables were introduced in 1.8.14). Whenmsvctarget is used, the dllimport stub prefixes are also accounted for. The constants exposed byhdf5-sysare now of reference type and need to be dereferenced upon use (formsvc, they have to be dereferenced twice).
- API simplification: many methods previously expecting
Into<String>inputs now just take&str. util::to_cstringnow takesBorrow<str>instead ofInto<String>so as to avoid unnecessary allocations, and the return value is now wrapped inResultso that interior null bytes in input strings trigger an error.
- Fixed dangling pointer problems when strings were being passed as pointers to the C API.
- Fixed target path not being passed correctly in
Container::link_soft.
Initial public version.