Thank you for your interest in contributing to Carbon! There are many ways to
contribute, and we appreciate all of them. If you have questions, please feel
free to ask on Discord #contributing-help
channel or GitHub.
Everyone who contributes to Carbon is expected to:
We also encourage anyone interested in contributing to check out all the information here in our contributing guide, especially the guidelines and philosophy for contributions
If you're looking for a quick way to contribute, commenting on proposals is a way to provide proposal authors with a breadth of feedback. The "leads questions" label has questions the community is looking for a decision on. The list of open proposals will have more mature proposals that are nearing a decision. For more about the difference, see the evolution process.
When giving feedback, please keep comments positive, constructive, and concise. Our goal is to use community discussion to improve proposals and assist authors.
If you have ideas for Carbon, we encourage you to discuss it with the community, and potentially prepare a proposal for it. Ultimately, any changes or improvements to Carbon will need to turn into a proposal and go through our evolution process.
If you do start working on a proposal, keep in mind that this requires a time investment to discuss the idea with the community, get it reviewed, and eventually implemented. A good starting point is to read through the evolution process. We encourage discussing the idea early, before even writing a proposal, and the process explains how to do that.
Helping with pull requests review is a good way to provide feedback, while getting acquainted with the code base.
The implementation of the Carbon language design is currently focused on the Carbon toolchain (see Carbon toolchain issues)
Some issues are also marked as "good first issues". These are intended to be a good place to start contributing.
To pick up a "good first issue", check to make sure there's no in-flight pull request on the issue, and then start working on it. We don't assign issues to new contributors because some people have different time constraints, and we want new contributors to feel welcome to pick the issue up when it may not be making progress. Even if someone else merges a fix before you, these issues should be a quick and helpful way to start learning how Carbon is built, building towards larger contributions.
As Carbon's design and implementation take shape, we'll inevitably encounter plenty of bugs. Helping us triage, analyze, and address them is always a great way to get involved. See open issues on GitHub.
When triaging issues, we typically won't assign issues because we want to be confident that contributors who have an issue assigned to them are planning for the amount of time it will take, which requires familiarity. Contributors with write access are expected to have that familiarity and may assign issues to themselves.
We'd love to accept your documentation, pull requests, and comments! Before we can accept them, we need you to cover some legal bases.
Please fill out either the individual or corporate CLA.
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your documents, comments and pull requests.
NOTE: Only original content from you and other people who have signed the CLA can be accepted as Carbon contributions: this covers GitHub (including both code and discussion), Google Docs, and Discord.
Initially, Carbon is bootstrapping using Google's CLA. We are planning to create an open source foundation and transfer all Carbon-related rights to it; our goal is for the foundation setup to be similar to other open source projects, such as LLVM or Kubernetes.
We use a few systems for collaboration which contributors should be aware of.
Before using these systems, everyone must sign the CLA. They are all governed by the Code of Conduct.
Our collaboration systems are all viewable publicly, and most can be joined without particular requests. However, some require extra permissions, such as editing Google Docs, joining meetings, or some details of the proposal process.
When requesting any of the following access, please provide a reason for the access. All requests require a signed CLA.
If you simply want to chime in on GitHub or Discord, none of this is needed. If you're interested in joining meetings, ask for commenter access. If you're trying to write proposals, both types of contributor access will help.
Please see our contribution tool documentation for information on setting up a git client for Carbon development, as well as helpful tooling that will ease the contribution process. For example, pre-commit is used to simplify code review.
All submissions to Carbon need to follow our Contributor License Agreement (CLA), which covers any original work of authorship included in the submission. This doesn't prohibit the use of coding assistance tools, including tool-, AI-, or machine-generated code, as long as these submissions abide by the CLA's requirements.
All contributions, regardless of what tools are used, are also still the responsibility of the operator of these tools and subject to normal code review and our guidelines and standards below. We also emphasize two additional requirements for contributors operating or using AI-based tools:
Contributions should not become extractive of the project and community: the value added should outweigh the overhead of landing the contribution. The overhead of landing contributions ranges from code review, to discussions, distractions from the current project priorities, or growing maintenance burden without growing maintainers.
Each PR should be transparent about the tooling used in proportion to how
much of the PR was produced by the tool and whether the tool is a standard
one for the project. For example, formatting with the standard tools is
reasonable to assume without further comment. But if a PR is largely derived
from running a specific Python script, regular expression, or AI-based tool
over the codebase, we ask that its commit message is transparent about this
and include a description of how the tool was used to formulate the change.
For PRs largely derived from AI-based tooling, we suggest following the
pattern established by the Fedora Project to mark commits with
Assisted-by: ....
Our policies and practices here are inspired by and aim to be roughly compatible with several other open source projects:
As the open source community evolves and learns how best to integrate these tools into project and development workflows, we expect to reflect that with updates and improvements here.
All documents and pull requests must be consistent with the guidelines and follow the Carbon documentation and coding styles.
For both documentation and code:
For documentation:
For code:
foo is objectively better word to use"bar confusing since it has this alternate
meaning, I think foo is clearer."When trying to make a point, please employ these strategies to make your argument effective and helpful:
If someone questions or argues with your point, try to directly address the points being made. Try not to step backwards or switch to a more general or more meta level as that can seem like you're evading the question.
#language-questions on Discord.It is also okay to do things like ask a question to get clarification about what someone has said or to solicit opinions about various options. Just be respectful, and don't drown out other discussion.
Changes to Carbon documentation follow the Google developer documentation style guide.
Markdown files should additionally use Prettier for formatting, which we automate with pre-commit.
Other style points to be aware of are:
text—text), we are using a double-hyphen with surrounding spaces
(text -- text). We are doing this because we frequently read Markdown with
fixed-width fonts where em dashes are not clearly visible.If you're not sure what style to use, please ask on Discord or GitHub.
A license is required at the top of all documents and files.
Google Docs all use this template. It puts the license at the top of every page if printed.
Markdown files always have at the top:
# DOC TITLE
<!--
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->
For example, see the top of CONTRIBUTING.md's raw content.
Every file type uses a variation on the same license text ("Apache-2.0 WITH LLVM-exception") with similar formatting. If you're not sure what text to use, please ask on Discord or GitHub.
Carbon repositories all follow a common pull-request workflow for landing changes. It is a trunk-based development model that emphasizes small, incremental changes and preserves a simple linear history.
Carbon's Contributing guidelines are based on TensorFlow and Flutter guidelines. Many thanks to these communities for their help in providing a basis.