Investigate `min_generic_const_args` for handling array sizes generically
还没有人认领这个 Issue。
评估
调研方向
首先阅读 src/sizes.rs 以了解当前的固定大小宏方案,然后查看 nightly min_generic_const_args 目标。使用 typenum::Unsigned::USIZE 作为 Array 类型的 N 构建一个概念验证;对于相关用例,任意大小都能正常工作并确认该方案可行,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Currently we use macros to write a fixed set of supported sizes, which is inflexible and we would ideally support arbitrary sizes instead (#81). See:
https://github.com/RustCrypto/hybrid-array/blob/master/src/sizes.rs
It seems like min_const_generic_args could be the missing compiler feature we need to be able to use the associated constant typenum::Unsigned::USIZE as N for [T; N] when defining our Array type.
It would be good to try to make this work on nightly in a proof-of-concept capacity to ensure it will actually work for our use cases. It would also make a compelling use case for min_const_generic_args.
cc @BoxyUwU
- 主要语言
- Rust
- 星标
- 23
- 派生
- 25
- 平均合并
- 1 小时 46 分钟
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RustCrypto/hybrid-array 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 50/100
RustCrypto/hybrid-array#201 · 7 条评论 · 7 个 reaction ·
-
`ArrayExt` trait 未关闭
难度 5/5 一周以上 新手友好度 25/100
RustCrypto/hybrid-array#168 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
RustCrypto/hybrid-array#66 · 3 条评论 ·
查看 RustCrypto/hybrid-array 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug good first issue package: quic
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 1/5 1 小时以内 新手友好度 78/100
-
`dora trace view` sends a non-canonical full UUID as-is, so a valid trace ID shows "No spans found" 未关闭cli coordinator rust
难度 2/5 1-3 小时 新手友好度 88/100
-
area: tasks enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
Jason-jo17/Polybench#15 · 1 条评论 ·