What we accept
Bug fixes
Bug fixes
Bug fixes accompanied by unit tests that demonstrate the problem are the most welcome contribution. Bug reports without patches are also appreciated.Bug fixes without tests are generally not accepted.
New APIs and features
New APIs and features
New APIs and features may be accepted if they:
- Include adequate test coverage and documentation
- Do not compromise backward compatibility
- Clear a high bar of usefulness — features that are fine in isolation are often rejected if they do not have enough impact to justify ongoing maintenance cost
Performance optimizations
Performance optimizations
Performance improvements may be accepted if they:
- Include convincing benchmarks that demonstrate the improvement
- Do not significantly increase code complexity
What we do not accept
What we do not accept
- API changes: Changes to existing APIs are almost never accepted. Stability and backward compatibility are paramount.
- Wire or text format changes: Changes to the binary wire format or text format are never accepted. Any incompatible change would need to be a completely new format.
Before you start
Contributor License Agreement
All contributions must be accompanied by a signed Contributor License Agreement (CLA). You retain copyright over your contribution — the CLA simply grants Google permission to use and redistribute it as part of the project.Determine which CLA applies
- Individual: If you are writing original code that you personally own, sign the individual CLA.
- Corporate: If you are contributing on behalf of an employer, your company must sign the corporate CLA.
Sign the CLA
Complete the signing process at cla.developers.google.com. The CLA bot on GitHub will confirm your status when you open a pull request.
Coding style
This project follows Google’s Coding Style Guides. Review the relevant guide for the language you are changing and make sure your code is style-conforming before submitting.Filing issues
- Bug reports: Open an issue on GitHub with a clear description, a minimal reproduction case, and the protobuf version you are using.
- Feature requests: File an issue and describe the use case. Get explicit support from a maintainer before starting implementation work on behavioral or API changes.
- Security vulnerabilities: Do not open a public issue. Report security concerns via Google’s Bug Hunters program.
Development setup
The protobuf repository supports multiple build systems. Choose the one appropriate for the language you are working on.- Bazel
- CMake
- Language-specific
Bazel is the primary build system for the protobuf project.
Running tests
All tests must pass before a pull request can be merged.Pull request process
Target the right branch
Most pull requests should target the
main branch. The change will be included in the next major or minor release.For a bug fix that needs to land in a patch release (e.g., v27.1), first merge to main, then create a separate cherry-pick PR against the release branch (e.g., 27.x).Keep the PR focused
Create small PRs that address a single concern. If a PR fixes multiple unrelated things, split it into separate pull requests.Do not include unrelated style or formatting changes — submit those in a separate PR.
Write a good description
Provide a clear description of what changed and why. Link to the relevant GitHub issue if one exists. The description becomes part of the release notes when the
release notes: yes label is applied.Respond to review feedback
A protobuf team member will be assigned to review your PR. Minor cleanups may be merged quickly; larger changes will go through multiple review rounds.
- Expect a first response within 7 days.
- Respond to reviewer comments within a reasonable time. PRs with no activity for 2 weeks or longer may be closed.
- Maintain a clean commit history. Use
git rebase -i upstream/mainto curate commits and incorporate upstream changes.
Reviewer guidelines
If you are reviewing a pull request:- Confirm that all tests are passing before approving.
- Apply the
release notes: yeslabel if the change should appear in the release notes (new features, bug fixes). - Apply the
release notes: nolabel for changes that should not appear (refactoring, test updates, internal propagations). - Apply the appropriate language label (e.g.,
C++,Java,Python) to help triage and routing.