The developers of the Rust programming language are preparing to publish rules for using AI assistants in projects. The proposed rules have gone through a thorough discussion of over 3,000 posts, have been approved by 4 maintainers, and are now awaiting publication. The rules, with some exceptions, prohibit the submission of AI-generated code to the main repository rust-lang/rust, but do not apply to submodules, sub-branches, or dependencies from the crates.io directory, as well as other repositories of the organization. However, the rules do allow the use of AI for analysis, study, review, and verification of code.
The use of AI is permitted when information obtained through AI is used privately by a single developer and is not publicly distributed. For example, developers can use AI to ask questions about code, generate summaries of comments on pull requests or issues, review changes with AI, create tools for personal use through AI, and consult AI for possible solution options. Developers are also allowed to experiment with changes through AI that do not require peer review by other participants.
However, using AI to generate comments, problem reports, and descriptions of changes on behalf of a participant is prohibited. Quoting results from AI is allowed as long as it is explicitly stated that the content was generated through AI. Creating documentation through AI is not permitted. When reviewing, AI findings cannot be the sole basis for accepting or rejecting changes; they can only serve as recommendations.
With certain limitations and explicit acknowledgment that the result was obtained through AI, developers can use AI for tasks such as machine translation, error searching, and making minor edits to code and texts, like correcting typos and choosing synonyms. Additionally, developers can experiment with submitting pre-vetted changes generated through AI, provided they are marked as “ai-assisted” and do not impact core features of the language. These changes will be tracked in a private Zulip channel accessible only to project participants.