crates.io 身份验证与发布中的 GitHub 依赖
GitHub Dependency in crates.io Authentication and Publishing
crates.io 身份验证与发布中的 GitHub 依赖
Rust 包注册表 crates.io 目前要求用户拥有 GitHub 账号才能登录并发布 Rust 包。这造成了对 GitHub 的系统性依赖,批评者认为这不应成为核心语言生态系统的“影子依赖”。
Centralized Authentication as a Systemic Risk
中心化身份验证作为一种系统性风险
Crates.io 依赖 GitHub 进行身份验证,这意味着任何希望向官方注册表发布 crate 的用户都必须维护一个 GitHub 账号。这种中心化被视为一种有问题的设计选择,因为它引入了对单一的、微软拥有的托管平台的依赖。
"I just think it's pretty messed up that crates[.]io still requires a GitHub account to login, therefore to publish Rust packages. GitHub shouldn't be a shadow dependency of the language ecosystem."
"我只是觉得 crates[.]io 仍然需要 GitHub 账号才能登录,从而才能发布 Rust 包,这真的很糟糕。GitHub 不应该成为语言生态系统的影子依赖。"
While some argue that crates can be hosted anywhere and that the dependency is limited to authentication, others contend that because crates.io is the default registry and a core component of the ecosystem, its reliance on a third-party platform is a critical flaw.
虽然一些人认为 crate 可以托管在任何地方,且这种依赖仅限于身份验证,但其他人则认为,由于 crates.io 是默认注册表且是生态系统的核心组件,其对第三方平台的依赖是一个关键缺陷。
The Challenge of Decoupling from GitHub
从 GitHub 解耦的挑战
撤销最初将 crates.io 与 GitHub 绑定的设计决策是一个困难的过程,涉及大量的技术债务。讨论强调了去中心化生态系统的理想与维护该生态系统所需的有限资源之间的紧张关系。
Resource Constraints in Registry Maintenance
注册表维护中的资源限制
维护官方注册表是一项资源受限的工作。根据贡献者的说法,工作量严重向极少数的付费维护者倾斜。
"To be clear: approximately one person is paid to work on crates.io. That person has to provide (and will continue to provide) significant design and review support for that project, but ultimately, keeping the lights on has to take priority."
"明确地说:大约只有一个人获得报酬来从事 crates.io 的工作。那个人必须为该项目提供(并将继续提供)大量的设计和评审支持,但最终,维持运营必须是首要任务。"
Technical Debt and Design Choices
技术债务与设计选择
对 GitHub 进行身份验证的依赖被描述为最初的一个糟糕的设计选择,随着时间的推移积累了技术债务。虽然正在努力解决这些问题,但移除这种依赖的难度被归因于注册表的核心架构。
Alternative Perspectives on Ecosystem Distribution
关于生态系统分布的替代视角
一些贡献者建议,问题不仅限于身份验证。更广泛的问题是包生态系统使用单一中央仓库的概念,有人认为这本身就是一个有缺陷的模型。
"The whole idea of a single central repository is absolutely terrible. Crates should be able to depend on crates hosted anywhere."
"整个单一中央仓库的想法绝对很糟糕。Crates 应该能够依赖于托管在任何地方的 crates。"
This perspective suggests that the Rust ecosystem would be more robust if it moved away from a central registry model entirely, entirely allowing crates to depend on packages hosted on any platform, reducing the reliance on any single entity, including GitHub or crates.io itself.
这种观点认为,如果 Rust 生态系统完全转向远离中央注册表模型,允许 crate 依赖于托管在任何平台上的包,那么生态系统将会更加健壮,从而减少对包括 GitHub 或 crates.io 本身在内的任何单一实体的依赖。