aldanor / hdf5-rust

HDF5 for Rust
https://docs.rs/hdf5
Apache License 2.0
310 stars 85 forks source link

use const generics in hdf5-types for array impl #131

Closed mulimoen closed 3 years ago

mulimoen commented 3 years ago

Const generics are rapidly approaching which means impl_array can be replaced with a generic size, supporting more array cases than one can manually specify. This is feature gated on const_generics on hdf5-types and should only be a minor bump.

Ref #122

aldanor commented 3 years ago

I wonder, if we can enable this feature automatically? (e.g. through build script, hmm) There would be no reason not to use it once 1.51 is out.

Also, need some checks that it compiles - we can either employ nightly for that, or just wait till 1.51 and add checks on stable.

mulimoen commented 3 years ago

We could enable this using autocfg but we will need another build.rs... I think it is ok to have a feature for this for now. We might want to make this default when 1.51 is out and remove the feature entirely when enough time has passed.

aldanor commented 3 years ago

Very minor comment aside, looks great and lgtm!

mulimoen commented 3 years ago

@aldanor Maybe it is worthwhile to publish this to crates.io?

aldanor commented 3 years ago

I wonder if we should've added const-generics feature to the root crate, hmm... (which would trigger hdf5-types/const-generics)