The developers of the Rust programming language have recently approved guidelines for using AI assistants in their project. These rules dictate that AI-generated code cannot be shared, but AI can be utilized for analyzing, examining, and reviewing code within the main repository rust-lang/rust. The rules also apply to submodules, sub-branches, and dependencies within the crates.io directory, with separate approvals required from their respective development teams.
Specifically, the guidelines permit the use of AI for private developer use only. This includes tasks such as asking AI questions about code, summarizing comments on pull requests or issues, reviewing changes, creating personal use tools with AI, and seeking advice on potential solutions. Developers are also allowed to experiment with changes generated through AI without needing peer review.
However, the rules prohibit using AI to write comments, issue reports, or change descriptions on behalf of a participant. Quoting AI results is allowed as long as it is clearly stated that the content was AI-generated. Generating documentation through AI is not permitted, and AI findings cannot solely determine the acceptance or rejection of changes.
With certain limitations and disclosures, AI can be employed for machine translation, error detection, minor code and text edits, such as typo corrections and synonym selection. Additionally, developers can propose pre-vetted changes created through AI in a controlled experiment. These changes, labeled as “ai-assisted,” should be agreed upon with reviewers before submission and must be tracked in a private channel accessible only to project participants to monitor the experiment’s outcome.