Back to News

Rust project adopts LLM policy for rust-lang/rust contributions

117 points · 72 comments#rust#llm-policy#open-source#code-review

Five teams in the Rust project have adopted a policy governing how large language models can be used when contributing to the rust-lang/rust monorepo. The policy allows LLMs for answering questions, analysis, summarization, polishing, checking, suggesting, and reviewing, but strictly limits direct content creation. It was created in response to a backlog of 1,300 open PRs, as LLM-generated code has made it harder for maintainers to assess contributor effort and understanding.

Coverage timeline

  1. Hacker Newsafdbcreid

    Recently, five teams in the Rust project adopted a policy that I originally authored, governing how Large Language Models can be used when contributing to the `rust-lang/rust` monorepo. Notably, the new policy is _not_ an official stance on LLMs, and does _not_ apply everywhere in the Rust project. I wrote it for a very specific purpose, described below. This post talks about why we created that policy, what it says, and how this will affect contributors. The policy affects the following groups of people: * People who review or moderate PRs on `rust-lang/rust`. * People who author PRs with LLM-generated code on `rust-lang/rust`. * People who discover issues using LLMs and post them on `rust-lang/rust`. * People who write issues or comments that directly quote an LLM on `rust-lang/rust`. If you are not in one of those groups, you don't have to change anything about how you work. ## Why was this policy created? While the Rust project is a collection of technical artifacts, it is also a _

  2. 机器之心新闻资讯

    AI 编程正在把软件开发里最昂贵的一件事迅速变便宜:写代码。然而,Rust 社区却发现,麻烦恰恰由此开始。 数据显示,rust-lang/rust 仓库里积压了 1300 个尚未关闭的 PR。过去,一个结构完整、测试充分、说明详细的 Pull Request,往往意味着背后有人花了不少时间研究代码、理解设计,再认真完成修改。 LLM 普及之后,这套判断标准开始失效。一个人可以很快生成几百行代码,甚至同时提交多个看起来相当完整的 PR。代码产量大幅提高,负责审核这些代码的维护者却没有变多。 开源社区遇到了一个很现实的新问题:代码越来越便宜,人的判断越来越贵。 最近,Rust 项目中的五个团队采纳了一套针对 rust-lang/rust 主仓库的 LLM 使用政策,专门规定大语言模型可以怎样参与 rust-lang/rust 主仓库的贡献。 它没有覆盖整个 Rust 项目,也没有给 AI 编程下一个简单的「允许」或「禁止」结论。政策给出的核心原则很有意思:可以用 LLM 回答问题、分析、提炼、润色、检查、建议和审查;涉及到直接创造内容,则会受到严格限制。 OpenAI 的一位研发人员以自己作为维护者的身份,认同 Rust 的这份新政策,表示「非常周到且合理。」 图源:https://x.com/charliermarsh/status/2085065098616275359 一份漂亮的 PR,已经证明不了你懂代码 Rust 这次专门为 LLM 制定规则,首先碰到的是一个很反直觉的问题:AI 正在让「认真工作留下的痕迹」失去可信度。 维护者看到一份完成度很高的 PR,通常可以推断出几件事:作者投入了时间,对相关代码有一定理解,也可能愿意长期参与这个项目。这些信号会直接影响开源社区的协作方式。此外,维护者通常不愿意轻易关闭一个别人花很多时间完成的 PR。代码审查过程中发现新的问题,双方还可以继续讨论和修改。 LLM 普及后,这些判断越来越难成立。 格式工整、测试齐全、描述详细的 PR,几分钟或者几十分钟就可以生成。代码看起来专业,作者未必理解其中的设计。如果背后运行的是自主 Coding Agent,甚至可能连一个真正参与思考的人都不存在。 Rust 团队尤其担心一种情况:开发者收到 Review 意见后,直接把审核者的话复制给 LLM,再把 LLM 的回复原封不动贴回 G