RustCrypto / RustCrypto/hybrid-array

Tracking issue for additional array size support: `error[E0277]: the trait bound U...: ArraySize is not satisfied`

Open
#66 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
23
Forks
25
Avg merge
1h 46m
Merged PRs (30d)
1

Description

hybrid-array relies on impls of ArraySize on individual typenum::Unsigned types, e.g. U1, U2, U3, which is a deliberate tradeoff versus generic-array which is able to support any array size.

These ArraySize impls are the linkage between typenum types and core arrays, which provide the underlying storage used by hybrid-array, and with it const generic linkage and significantly less unsafe code.

Unfortunately, you will encounter the rustc error message in the issue title if you attempt to use an unsupported array size.

Per #57, we are attempting to handle such cases as one-off requests for sizes which can be granted on a case-by-case basis, and gating them under the extra-sizes. It's unclear how well this will work in practice, but we are attempting it for now.

The main reason to constrain the number of supported sizes is a compile time cost as we add more impls of ArraySize/AssocArraySize. Compile times are not currently too significant but get worse as we add support for more array sizes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read this tracking issue and the referenced #57 discussion first; no source file, test, or specific array size is identified in the payload. Work would require a decided request and a clear plan for adding that size under the extra-sizes feature, with completion defined by support for the selected size.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.