#array #generics

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

28 releases

Uses new Rust 2024

new 0.3.1 Apr 30, 2025
0.3.0 Feb 21, 2025
0.2.3 Dec 7, 2024
0.2.1 Oct 20, 2024
0.1.0 May 7, 2022

#80 in Data structures

Download history 16158/week @ 2025-01-11 20043/week @ 2025-01-18 20990/week @ 2025-01-25 22951/week @ 2025-02-01 24594/week @ 2025-02-08 23490/week @ 2025-02-15 44756/week @ 2025-02-22 32369/week @ 2025-03-01 32836/week @ 2025-03-08 39912/week @ 2025-03-15 39490/week @ 2025-03-22 26850/week @ 2025-03-29 36951/week @ 2025-04-05 33063/week @ 2025-04-12 42755/week @ 2025-04-19 29726/week @ 2025-04-26

146,575 downloads per month
Used in 405 crates (20 directly)

MIT/Apache

77KB
2K 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.

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

~315–620KB
~16K SLoC