Consider using a smaller command line argument parser
还没有人认领这个 Issue。
评估
调研方向
尚未确定任何文件、测试或入口点。首先定位当前的 clap 集成,然后将 pico-args 和 argh 与 sudo 的解析和帮助要求进行比较。完成标准是选择并采用一个更小的解析器,同时保留所需的命令行行为,并验证对二进制大小和编译时间的影响。
由索引模型根据 Issue 内容生成。
描述
clap constitutes roughly 80% of sudo's binary size. According to this we have various choices that are significantly smaller:
https://github.com/rosetta-rs/argparse-rosetta-rs#results
Among those, pico-args seems to be the 2nd most popular choice and it's 30x smaller and 10x faster to compile. argh was authored by Google and may receive continued support as well. This clap issue seems relevant: https://github.com/clap-rs/clap/issues/1365
Since other, smaller parsers often don't support builtin formatting for --help we'd probably have to write that ourselves, however for sudo I suspect a simple, static string is sufficient.
- 主要语言
- Rust
- 星标
- 5.9k
- 派生
- 180
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/sudo 的其他 Issue
-
Issue-Bug Needs-Triage
难度 1/5 1 小时以内 新手友好度 74/100
-
Issue-Bug Needs-Triage
难度 3/5 1-2 天 新手友好度 55/100
-
Issue-Feature Needs-Triage
难度 4/5 3-5 天 新手友好度 38/100
-
Issue-Bug Needs-Triage
难度 3/5 1-2 天 新手友好度 65/100
-
Issue-Bug Needs-Triage
难度 4/5 3-5 天 新手友好度 45/100
相似的 Issue
-
[Bug]: Web chat input doesn't regain focus after a reply finishes可能已有人在做 @GaijinSystems 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
zeroclaw-labs/zeroclaw#11658 ·
维护者通常 2 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 72/100
-
documentation
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
NuSkooler/enigma-bbs#907 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复