| 1 |
# [RustCrypto]: Hybrid Const Generic / Typenum Arrays |
| 2 |
|
| 3 |
[![crate][crate-image]][crate-link] |
| 4 |
[![Docs][docs-image]][docs-link] |
| 5 |
[![Build Status][build-image]][build-link] |
| 6 |
[![codecov][coverage-image]][coverage-link] |
| 7 |
![Apache2/MIT licensed][license-image] |
| 8 |
![Rust Version][rustc-image] |
| 9 |
[![Project Chat][chat-image]][chat-link] |
| 10 |
|
| 11 |
Hybrid array type combining const generics with the expressiveness of |
| 12 |
[`typenum`]-based constraints, providing an alternative to [`generic-array`] |
| 13 |
and a incremental transition path to const generics. |
| 14 |
|
| 15 |
## About |
| 16 |
|
| 17 |
This crate uses `typenum` to enable the following features which aren't yet |
| 18 |
possible with the stable implementation of const generics: |
| 19 |
|
| 20 |
- [#60551: Associated constants in traits can not be used in const generics][rust-issue-60551] |
| 21 |
- [#76560: Complex generic constants: `feature(generic_const_exprs)`][rust-issue-76560] |
| 22 |
|
| 23 |
Internally the crate is built on const generics and provides traits which make |
| 24 |
it possible to convert between const generic types and `typenum` types. |
| 25 |
|
| 26 |
## Minimum Supported Rust Version (MSRV) Policy |
| 27 |
|
| 28 |
MSRV increases are not considered breaking changes and can happen in patch |
| 29 |
releases. |
| 30 |
|
| 31 |
The crate MSRV accounts for all supported targets and crate feature |
| 32 |
combinations, excluding explicitly unstable features. |
| 33 |
|
| 34 |
## License |
| 35 |
|
| 36 |
Licensed under either of: |
| 37 |
|
| 38 |
- [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| 39 |
- [MIT license](http://opensource.org/licenses/MIT) |
| 40 |
|
| 41 |
at your option. |
| 42 |
|
| 43 |
### Contribution |
| 44 |
|
| 45 |
Unless you explicitly state otherwise, any contribution intentionally submitted |
| 46 |
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be |
| 47 |
dual licensed as above, without any additional terms or conditions. |
| 48 |
|
| 49 |
[//]: # (badges) |
| 50 |
|
| 51 |
[crate-image]: https://img.shields.io/crates/v/hybrid-array?logo=rust |
| 52 |
[crate-link]: https://crates.io/crates/hybrid-array |
| 53 |
[docs-image]: https://docs.rs/hybrid-array/badge.svg |
| 54 |
[docs-link]: https://docs.rs/hybrid-array/ |
| 55 |
[build-image]: https://github.com/RustCrypto/hybrid-array/actions/workflows/hybrid-array.yml/badge.svg?branch=master |
| 56 |
[build-link]: https://github.com/RustCrypto/hybrid-array/actions/workflows/hybrid-array.yml?query=branch:master |
| 57 |
[coverage-image]: https://codecov.io/gh/RustCrypto/hybrid-array/graph/badge.svg?token=Z92NHFQ70G |
| 58 |
[coverage-link]: https://codecov.io/gh/RustCrypto/hybrid-array |
| 59 |
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg |
| 60 |
[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg |
| 61 |
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg |
| 62 |
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260052-utils |
| 63 |
|
| 64 |
[//]: # (links) |
| 65 |
|
| 66 |
[RustCrypto]: https://github.com/rustcrypto |
| 67 |
[RustCrypto/utils#378]: https://github.com/RustCrypto/utils/issues/378 |
| 68 |
[`typenum`]: https://github.com/paholg/typenum |
| 69 |
[`generic-array`]: https://github.com/fizyk20/generic-array |
| 70 |
[rust-issue-60551]: https://github.com/rust-lang/rust/issues/60551 |
| 71 |
[rust-issue-76560]: https://github.com/rust-lang/rust/issues/76560 |