Total re-design of Factory?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
Start by reviewing the current factory crate and traits.rs, focusing on allocator constraints and trait object compatibility. Compare the existing design with the stated goals for algorithm abstraction and name-to-object mapping. Done means proposing a redesign that addresses those goals and identifies the intended std or no_std support level.
由索引模型根据 Issue 内容生成。
描述
We have a number of tickets open about factories. I think we agree that the current design of the factory basically needs to be deleted and re-designed from scratch.
Design goals:
- Provide an abstraction layer that keeps algorithm-specific code out of calling applications. For example, if an application needs a signature algorithm, it should be possible to build it abstractly so that the developer doesn't know or care whether it's ML-DSA-44, ML-DSA-87, ECDSA-P256, or something else. That essentially means that the abstraction layer should operate at the level of traits so that you only need to know that you're holding a
&dyn Signer, or similar. - Provide a string-to-object mapping; ie something that behaves something like
let signer = SignerFactory::new_from_name("ML-DSA-65"); - That scaffolding will make it easy to build protocols like X.509, CMS, JWT, CWT, TLS (if we go there) because they just need a mapping table from however that protocol names algorithms (OIDs, codepoints, etc) to our canonical internal name, and then they can use the factory. In particular, that does separation of layers by keeping algorithm-specific junk out of the protocol layer.
We get to decide at what level of std, no_std+alloc, no_std, no_alloc we want the factory to be functional at. The current factory is attempting to be operable without an allocator, and this is the root of all the complexity. Doing this at the no_std+alloc level would be much simpler because then you'd have access to Box, which would make the whole thing easier.
PS -- if we trash the current factory crate, then that might soften the requirement that our traits.rs all need to be dyn-compatible, which would allow us to roll-back some of the hideous designs, like the fact that Hash's hash() isn't a static, but instead requires SHA256::new().hash(&msg); when it really should be SHA256::hash(&msg); for no good reason except that the latter is not dyn-compatible.
- 主要语言
- Rust
- 星标
- 25
- 派生
- 18
- 平均合并
- 56 分钟
- 30 天内合并 PR
- 1
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bcgit/bc-rust 的其他 Issue
-
Docs refactor: use `#[cfg(doc)]`可能已有人在做 @Sweesz 于 1 天前认领。 未关闭documentation good first issue help wanted refactor
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Improve docs in Factories可能重新可做 关联的 PR 已关闭且未合并。 未关闭documentation good first issue help wanted
难度 2/5 1-3 小时 新手友好度 82/100
bcgit/bc-rust#161 · 1 个 reaction ·
维护者通常 1 天内回复
-
good first issue refactor
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
r-bug
难度 1/5 1 小时以内 新手友好度 88/100
servo/rust-smallvec#844 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
farion1231/cc-switch#9122 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
lbjlaq/Antigravity-Manager#3801 ·
维护者通常 1 天内回复
-
LIMIT inputs are named MIN/MAX instead of the standard MN/MX, so LIMIT(MN := ...) does not resolve未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Published SDL drops input-field default values: a non-null field with a default renders as required未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复