Movatterモバイル変換


[0]ホーム

URL:


Keyboard shortcuts

Press or to navigate between chapters

PressS or/ to search in the book

Press? to show this help

PressEsc to hide this help

Rust Compiler Development Guide

    Getting Started

    Thank you for your interest in contributing to Rust! There are many ways tocontribute, and we appreciate all of them.

    If this is your first time contributing, thewalkthrough chapter can give you a good example ofhow a typical contribution would go.

    This documentation isnot intended to be comprehensive; it is meant to be aquick guide for the most useful things. For more information,see thischapter on how to build and run the compiler.

    Asking Questions

    If you have questions, please make a post on theRust Zulip server orinternals.rust-lang.org.See thelist of teams and working groups andthe Community page on theofficial website for more resources.

    As a reminder, all contributors are expected to follow ourCode of Conduct.

    The compiler team (ort-compiler) usually hangs out in Zulip inthe #t-compiler channel;questions about how the compiler works can go in#t-compiler/help.

    Please ask questions! A lot of people report feeling that they are "wastingexpert's time", but nobody ont-compiler feels this way. Contributors areimportant to us.

    Also, if you feel comfortable, prefer public topics, as this means others cansee the questions and answers, and perhaps even integrate them back into thisguide :)

    Tip: If you're not a native English speaker and feel unsure about writing, try using a translator to help. But avoid using LLM tools that generate long, complex words. In daily teamwork,simple and clear words are best for easy understanding. Even small typos or grammar mistakes can make you seem more human, and people connect better with humans.

    Experts

    Not allt-compiler members are experts on all parts ofrustc; it's apretty large project. To find out who could have some expertise ondifferent parts of the compiler,consult triagebot assign groups.The sections that start with[assign* intriagebot.toml file.But also, feel free to ask questions even if you can't figure out who to ping.

    Another way to find experts for a given part of the compiler is to see who has made recent commits.For example, to find people who have recently worked on name resolution since the 1.68.2 release,you could rungit shortlog -n 1.68.2.. compiler/rustc_resolve/. Ignore any commits starting with"Rollup merge" or commits by@bors (seeCI contribution procedures formore information about these commits).

    Etiquette

    We do ask that you be mindful to include as much useful information as you canin your question, but we recognize this can be hard if you are unfamiliar withcontributing to Rust.

    Just pinging someone without providing any context can be a bit annoying andjust create noise, so we ask that you be mindful of the fact that thet-compiler folks get a lot of pings in a day.

    What should I work on?

    The Rust project is quite large and it can be difficult to know which parts of the project needhelp, or are a good starting place for beginners. Here are some suggested starting places.

    Easy or mentored issues

    If you're looking for somewhere to start, check out the followingissuesearch. See theTriage for an explanation of these labels. You can also tryfiltering the search to areas you're interested in. For example:

    • repo:rust-lang/rust-clippy will only show clippy issues
    • label:T-compiler will only show issues related to the compiler
    • label:A-diagnostics will only show diagnostic issues

    Not all important or beginner work has issue labels.See below for how to find work that isn't labelled.

    Recurring work

    Some work is too large to be done by a single person. In this case, it's common to have "Trackingissues" to co-ordinate the work between contributors. Here are some example tracking issues whereit's easy to pick up work without a large time commitment:

    • Add recurring work items here.

    If you find more recurring work, please feel free to add it here!

    Clippy issues

    TheClippy project has spent a long time making its contribution process as friendly to newcomersas possible. Consider working on it first to get familiar with the process and the compilerinternals.

    Seethe Clippy contribution guide for instructions on getting started.

    Diagnostic issues

    Many diagnostic issues are self-contained and don't need detailed background knowledge of thecompiler. You can see a list of diagnostic issueshere.

    Picking up abandoned pull requests

    Sometimes, contributors send a pull request, but later find out that they don't have enoughtime to work on it, or they simply are not interested in it anymore. Such PRs are ofteneventually closed and they receive theS-inactive label. You could try to examine some ofthese PRs and pick up the work. You can find the list of such PRshere.

    If the PR has been implemented in some other way in the meantime, theS-inactive labelshould be removed from it. If not, and it seems that there is still interest in the change,you can try to rebase the pull request on top of the latestmaster branch and send a newpull request, continuing the work on the feature.

    Writing tests

    Issues that have been resolved but do not have a regression test are marked with theE-needs-test label. Writing unit tests is a low-risk, lower-priority task that offers new contributors a great opportunity to familiarize themselves with the testing infrastructure and contribution workflow.

    Contributing to std (standard library)

    Seestd-dev-guide.

    Contributing code to other Rust projects

    There are a bunch of other projects that you can contribute to outside of therust-lang/rust repo, includingcargo,miri,rustup, and many others.

    These repos might have their own contributing guidelines and procedures. Manyof them are owned by working groups. For more info, see the documentation in those repos' READMEs.

    Other ways to contribute

    There are a bunch of other ways you can contribute, especially if you don'tfeel comfortable jumping straight into the largerust-lang/rust codebase.

    The following tasks are doable without much background knowledge but areincredibly helpful:

    Cloning and Building

    See"How to build and run the compiler".

    Contributor Procedures

    This section has moved to the"Contribution Procedures" chapter.

    Other Resources

    This section has moved to the"About this guide" chapter.


    [8]ページ先頭

    ©2009-2025 Movatter.jp