1- # hdf5-rs
1+ # ` hdf5 `
22
3- [ ![ Build Status] ( https://img.shields.io/travis/aldanor/hdf5-rs .svg )] ( https://travis-ci.org/aldanor/hdf5-rs ) [ ![ Appveyor Build Status] ( https://img.shields.io/appveyor/ci/aldanor/hdf5-rs .svg )] ( https://ci.appveyor.com/project/aldanor/hdf5-rs )
3+ [ ![ Build Status] ( https://img.shields.io/travis/aldanor/hdf5-rust .svg )] ( https://travis-ci.org/aldanor/hdf5-rust ) [ ![ Appveyor Build Status] ( https://img.shields.io/appveyor/ci/aldanor/hdf5-rust .svg )] ( https://ci.appveyor.com/project/aldanor/hdf5-rust )
44
5- [ Documentation] ( https://docs.rs/crate/hdf5-rs )
6- [ Changelog] ( https://github.com/aldanor/hdf5-rs /blob/master/CHANGELOG.md )
5+ [ Documentation] ( https://docs.rs/crate/hdf5 )
6+ [ Changelog] ( https://github.com/aldanor/hdf5-rust /blob/master/CHANGELOG.md )
77
8- Thread-safe Rust bindings and high-level wrappers for the HDF5 library API.
8+ The ` hdf5 ` crate (previously known as ` hdf5-rs ` ) provides thread-safe Rust bindings and
9+ high-level wrappers for the HDF5 library API. Some of the features include:
10+
11+ - Thread-safety with non-threadsafe libhdf5 builds guaranteed via reentrant mutexes.
12+ - Native representation of most HDF5 types, including variable-length strings and arrays.
13+ - Derive-macro for automatic mapping of user structs and enums to HDF5 types.
14+ - Multi-dimensional array reading/writing interface via ` ndarray ` .
15+
16+ Direct low-level bindings are also available and are provided in the ` hdf5-sys ` crate.
917
1018Requires HDF5 library of version 1.8.4 or later.
1119
1220## Example
1321
1422``` rust
15- #[derive(h5 :: H5Type , Clone , PartialEq , Debug )]
23+ #[derive(hdf5 :: H5Type , Clone , PartialEq , Debug )]
1624#[repr(u8 )]
1725pub enum Color {
1826 RED = 1 ,
1927 GREEN = 2 ,
2028 BLUE = 3 ,
2129}
2230
23- #[derive(h5 :: H5Type , Clone , PartialEq , Debug )]
31+ #[derive(hdf5 :: H5Type , Clone , PartialEq , Debug )]
2432#[repr(C )]
2533pub struct Pixel {
2634 xy : (i64 , i64 ),
2735 color : Color ,
2836}
2937
30- fn main () -> h5 :: Result <()> {
38+ fn main () -> hdf5 :: Result <()> {
3139 use self :: Color :: * ;
3240 use ndarray :: {arr1, arr2};
3341
3442 {
3543 // write
36- let file = h5 :: File :: open (" pixels.h5" , " w" )? ;
44+ let file = hdf5 :: File :: open (" pixels.h5" , " w" )? ;
3745 let colors = file . new_dataset :: <Color >(). create (" colors" , 2 )? ;
3846 colors . write (& [RED , BLUE ])? ;
3947 let group = file . create_group (" dir" )? ;
@@ -45,7 +53,7 @@ fn main() -> h5::Result<()> {
4553 }
4654 {
4755 // read
48- let file = h5 :: File :: open (" pixels.h5" , " r" )? ;
56+ let file = hdf5 :: File :: open (" pixels.h5" , " r" )? ;
4957 let colors = file . dataset (" colors" )? ;
5058 assert_eq! (colors . read_1d :: <Color >()? , arr1 (& [RED , BLUE ]));
5159 let pixels = file . dataset (" dir/pixels" )? ;
@@ -67,12 +75,12 @@ fn main() -> h5::Result<()> {
6775
6876### Platforms
6977
70- ` hdf5-rs ` is known to run on these platforms: Linux, macOS, Windows (tested on Travis CI and
71- AppVeyor, HDF5 1.8 and 1.10, system installations and conda environments).
78+ ` hdf5 ` crate is known to run on these platforms: Linux, macOS, Windows (tested on Travis
79+ CI and AppVeyor, HDF5 1.8 and 1.10, system installations and conda environments).
7280
7381### Rust
7482
75- ` hdf5-rs ` is tested continuously for all three official release channels, and requires
83+ ` hdf5 ` crate is tested continuously for all three official release channels, and requires
7684a modern Rust compiler (e.g. of version 1.31 or later).
7785
7886### HDF5
@@ -84,7 +92,7 @@ threadsafe option enabled.
8492
8593### HDF5 version
8694
87- Build scripts for both ` libhdf5 -sys` and ` hdf5-rs ` crates check the actual version of the
95+ Build scripts for both ` hdf5 -sys` and ` hdf5 ` crates check the actual version of the
8896HDF5 library that they are being linked against, and some functionality may be conditionally
8997enabled or disabled at compile time. While this allows supporting multiple versions of HDF5
9098in a single codebase, this is something the library user should be aware of in case they
@@ -127,7 +135,7 @@ unless `HDF5_VERSION` is set.
127135
128136### Windows
129137
130- ` hdf5-rs ` fully supports MSVC toolchain, which allows using the
138+ ` hdf5 ` crate fully supports MSVC toolchain, which allows using the
131139[ official releases] ( https://www.hdfgroup.org/downloads/index.html ) of
132140HDF5 and is generally the recommended way to go. That being said, previous experiments have
133141shown that all tests pass on the ` gnu ` target as well, one just needs to be careful with
@@ -149,6 +157,6 @@ Few things to note when building on Windows:
149157
150158## License
151159
152- ` hdf5-rs ` is primarily distributed under the terms of both the MIT license and the
160+ ` hdf5 ` crate is primarily distributed under the terms of both the MIT license and the
153161Apache License (Version 2.0). See [ LICENSE-APACHE] ( LICENSE-APACHE ) and
154162[ LICENSE-MIT] ( LICENSE-MIT ) for details.
0 commit comments