#const-generics #array #typenum #transition #path #generic-array #interop

no-std hybrid-array

Hybrid typenum-based and const generic array types designed to provide the flexibility of typenum-based expressions while also allowing interoperability and a transition path to const generics

19 releases

0.2.0-rc.8 Mar 17, 2024
0.2.0-rc.5 Feb 6, 2024
0.2.0-pre.8 Dec 31, 2023
0.2.0-pre.5 Oct 26, 2023
0.1.0 May 7, 2022

#72 in Data structures

Download history 25/week @ 2023-12-04 1/week @ 2023-12-11 21/week @ 2023-12-18 3531/week @ 2023-12-25 10432/week @ 2024-01-01 20574/week @ 2024-01-08 10463/week @ 2024-01-15 6292/week @ 2024-01-22 6470/week @ 2024-01-29 5455/week @ 2024-02-05 3999/week @ 2024-02-12 1761/week @ 2024-02-19 2310/week @ 2024-02-26 10082/week @ 2024-03-04 3916/week @ 2024-03-11 3526/week @ 2024-03-18

19,894 downloads per month
Used in 298 crates (3 directly)

MIT/Apache

63KB
1.5K SLoC

RustCrypto: Hybrid Const Generic / Typenum Arrays

crate Docs Build Status Apache2/MIT licensed Rust Version Project Chat

Hybrid array type combining const generics with the expressiveness of typenum-based constraints, providing an alternative to generic-array and a incremental transition path to const generics.

About

This crate uses typenum to enable the following features which aren't yet possible with the stable implementation of const generics:

Internally the crate is built on const generics and provides traits which make it possible to convert between const generic types and typenum types.

Features

This crate exposes the following feature flags. The default is NO features.

  • zeroize - Implements Zeroize for Array<T: Zeroize, U>

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~165KB