Skip to content

Back to the catalog

Socket: Rust Moves to Restrict LLM Use in Contributions After Months of Internal Debate
socket.devarticle

Socket: Rust Moves to Restrict LLM Use in Contributions After Months of Internal Debate

The Rust project is drafting a formal policy for rust-lang/rust that bans LLM-authored code, comments, and documentation from being merged while permitting LLM use as a private thinking aid (code review, summarization, exploration). The proposal, written by Jynn Nelson after over a month of internal debate (3,000+ Zulip messages), includes a middle disclosed, case-by-case tier for machine translation and review bots, and a narrow experimental exception for reviewer-solicited AI-authored PRs outside safety-critical components. The piece also surveys how other major open source projects (Zig, QEMU, postmarketOS, Servo, LLVM, Linux kernel, Mesa, Firefox, Ghostty, NixOS) have handled LLM contribution policy, ranging from full bans to disclosure-based acceptance, and covers pushback from Rust leaders like Niko Matsakis on the policy's framing and precedent.

TL;DR Rust is drafting rules banning LLM-authored code/docs from merges while allowing LLMs as a private review/learning aid, surveying how Zig, QEMU, and the Linux kernel handle AI contributions.
Document

What it claims

The proposed rust-lang/rust LLM policy is not a flat ban but a three-tier scheme (allowed / disclosed case-by-case / banned) with an escape hatch for experiments. The summary names the tiers; what it omits is the enforcement philosophy and the concrete constraints that determine how the policy actually bites. Note the scope: it applies only to rust-lang/rust, not the wider rust-lang org. The PR explicitly states that extending it project-wide was attempted and failed to reach consensus. It was still open at publication, with approval expected via a joint Final Comment Period across four teams.

The mechanics the summary skips

  • Enforcement is deliberately lax. The policy quotes "the optimal amount of fraud is not zero" and instructs people not to police whether an LLM was used: point clear violators to the policy, report borderline cases to mods, move on.
  • Lying is escalated. Using an LLM in violation is a policy violation; lying about LLM use is a code of conduct violation, which carries heavier consequences.
  • Review-bot constraints are specific: must run from a separate GitHub account, must be user-blockable, cannot post verbatim LLM output on a personal account, and their comments cannot block a merge without explicit human-reviewer endorsement.
  • Experimental AI-authored PRs require: reviewer solicits the PR in advance; no safety-critical components (trait system, MIR building); well-tested and well-reviewed; both author and reviewer able to fully explain the code; tagged ai-assisted; tracked in a private Zulip channel.
  • A companion compiler-team proposal already lets reviewers reject "burdensome" PRs (needlessly verbose, internally incoherent, or showing misunderstanding) without extensive justification.

The unresolved disagreement

Two distinct critiques, both from leadership, that a "read/adopt" reader should weigh before treating this as settled:

  • Niko Matsakis: worse than no policy; sets a harmful precedent, is too complex ("people are going to read it and just be overwhelmed"), and the experimental-exception conditions are "overkill and kind of insulting… a lack of trust in your fellow team members."
  • Diggory Blake: the policy targets how code is made, not whether it's good; a concise, clearly-positive PR marked AI-generated could be forced into rejection. He wants it reframed around maintainer review obligations, not contributor permissions, to avoid fairness disputes.
  • Jack Huey: wants it treated as "just a step," not the end of the discussion.

Cross-project detail

Beyond the summary's list: Zig's ban cites a 1957 Asimov short story and rests on "construction of original thought"; QEMU's is pragmatic, grounded in copyright/licensing, and explicitly carves out non-generative uses (exploring an API, debugging). NixOS has only a draft under review.

Organisations named here

  • Rust project
  • Stack Overflow
  • postmarketOS
  • Servo
  • LLVM
  • Mesa
  • Firefox
  • Ghostty
  • NixOS
  • Diggory Blake
  • Jack Huey
  • Jynn Nelson
  • Niko Matsakis
  • rust-lang/rust
  • Socket.dev

Technologies named here

  • Zig
  • qemu
  • Linux kernel
  • Rust

Also named here

  • Sarah Gooding