[ANN] hybrid-array v0.1: hybrid const generic + typenum arrays

Announcing hybrid-array v0.1 - a generic array crate built on both const generics and typenum:

Rust's stable const generics support is still lacking two important features which mean they can't be fully used to replace crates like generic-array.

The hybrid-array crate is designed from the ground up to combine both typenum and const generics, providing the expressive bounds of typenum, as well as its ability to specify an array size constant as an associated type, while also simultaneously enabling generic conversions to/from core arrays and selection of array sizes based on const generic parameters.

With these features combined, it should be possible to migrate code which currently uses generic-array to use core arrays and const generics as the public-facing API, with typenum used only to describe bounds and associated constants until such time as stable const generics are sufficiently expressive to natively implement those features.

Finally, unlike generic-array the implementation is 100% safe code!

Enjoy!

9 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.