Skip to content

Commit 75a4aa5

Browse files
committed
Add documentation regarding meta-features
1 parent 2e71218 commit 75a4aa5

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ default = []
1616
mpio = ["mpi-sys", "hdf5-sys/mpio"]
1717
lzf = ["lzf-sys", "errno"]
1818
blosc = ["blosc-sys"]
19+
# The features with version numbers such as 1.10.3, 1.12.0 are metafeatures
20+
# and is only available when the HDF5 library is at least this version.
21+
# Features have_direct and have_parallel are also metafeatures and dependent
22+
# on the HDF5 library which is linked against.
1923

2024
[workspace]
2125
members = [".", "hdf5-types", "hdf5-derive", "hdf5-sys", "hdf5-src"]

src/globals.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ use hdf5_sys::{h5e, h5p, h5t};
1616

1717
use crate::internal_prelude::*;
1818

19-
#[cfg(dll_indirection)]
20-
pub struct H5GlobalConstant(&'static usize);
21-
#[cfg(not(dll_indirection))]
22-
pub struct H5GlobalConstant(&'static hdf5_sys::h5i::hid_t);
19+
pub struct H5GlobalConstant(
20+
#[cfg(dll_indirection)] &'static usize,
21+
#[cfg(not(dll_indirection))] &'static hdf5_sys::h5i::hid_t,
22+
);
2323

2424
impl std::ops::Deref for H5GlobalConstant {
2525
type Target = hdf5_sys::h5i::hid_t;

src/lib.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
//! HDF5 for Rust.
2+
//!
3+
//! This crate provides thread-safe Rust bindings and high-level wrappers for the `HDF5`
4+
//! library API. Some of the features include:
5+
//!
6+
//! - Thread-safety with non-threadsafe libhdf5 builds guaranteed via reentrant mutexes.
7+
//! - Native representation of most HDF5 types, including variable-length strings and arrays.
8+
//! - Derive-macro for automatic mapping of user structs and enums to `HDF5` types.
9+
//! - Multi-dimensional array reading/writing interface via `ndarray`.
10+
//!
11+
//! Direct low-level bindings are also available and provided in the `hdf5-sys` crate.
12+
//!
13+
//! Requires `HDF5` library of version 1.8.4 or later. Newer versions will enable additional
14+
//! features of the library. Such items are marked in the documentation with a version number
15+
//! indicating the required version of `HDF5`. The `have_direct` and `have_parallel` features
16+
//! also indicates `HDF5` functionality.
117
#![cfg_attr(feature = "cargo-clippy", warn(clippy::pedantic))]
218
#![cfg_attr(feature = "cargo-clippy", warn(clippy::nursery))]
319
#![cfg_attr(feature = "cargo-clippy", warn(clippy::all))]

0 commit comments

Comments
 (0)