Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Consider using a smaller command line argument parser

未关闭
#69 0 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
停滞
技术栈
rust
领域
cli

调研方向

尚未确定任何文件、测试或入口点。首先定位当前的 clap 集成,然后将 pico-args 和 argh 与 sudo 的解析和帮助要求进行比较。完成标准是选择并采用一个更小的解析器,同时保留所需的命令行行为,并验证对二进制大小和编译时间的影响。

由索引模型根据 Issue 内容生成。

描述

Issue-Task

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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/sudo 的其他 Issue

查看 microsoft/sudo 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。