RustCrypto / RustCrypto/traits
Tracking issue for migrating from `hybrid-array` to const generic core arrays
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 755
- Forks
- 256
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 2
Description
Note: continuation of #970
We recently replaced generic-array with hybrid-array, which hopefully improves overall ergonomics, but ideally we wouldn't need typenum at all and could express all of our constraints using const generics.
This issue tracks the features in core that would need to be stabilized before we can phase out hybrid-array in favor of const generics and core arrays:
The first issue (60551) is arguably the biggest blocker. All of the trait crates defined in this repo use associated ArraySize types which would be best replaced by associated constants. While it would be possible to switch from associated constants to const generic parameters, this has all the drawbacks of using explicit generic parameters versus families of them expressed as associated types. It becomes quite unwieldy when there are several of them involved. Our use cases benefit from these constants being "carried along" with another generic parameter, so it would be best to wait until this feature is implemented.
The second issue (76560) is important because we do quite a bit of arithmetic with typenum.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Rust issues #60551 and #76560, then review how the trait crates use associated ArraySize types, hybrid-array, and typenum. Done means the required core features are available and the repository can phase out hybrid-array in favor of const generics and core arrays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100