commit | 9a84a0128a79285ea84410366f4eaa9876e3b109 | [log] [tgz] |
---|---|---|
author | Joshua Humphries <2035234+jhump@users.noreply.github.com> | Thu Dec 01 09:03:45 2022 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Dec 01 09:05:42 2022 -0800 |
tree | 332883f70ab7c042bfe9fb15c08fb6fb34dcea90 | |
parent | 4df096f1e9f8f5f7d80bd5db560fa33492ab0a8d [diff] |
Add custom option numbers for use by Buf (#11110) We are requesting a range of numbers instead of just one since we have some plans for a variety of orthogonal kinds of custom options. For example: 1. Injecting extra metadata into FileDescriptorProtos via custom options. (These options are inserted by the Buf tool when building proto sources, to encode additional metadata about the unit of files compiled.) 2. Configuration options for protoc plugins, that generate extra metadata into sources. (These options may be used by users when writing proto sources.) The suggested approach of reserving just one number and making it a message that contains *all* options is unattractive since users of one category of options is unlikely to want to import types related to another category. FWIW, there are several other rows above that have also chosen to reserve ranges of 5 or 10 numbers. Closes #11110 COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11110 from jhump:jh/custom-options-for-buf-and-connect 68ef5ff1daa66fb471cdbfdacb936267751cf219 PiperOrigin-RevId: 492211135
Copyright 2008 Google Inc.
Protocol Buffers documentation
Protocol Buffers (a.k.a., protobuf) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data. You can find protobuf's documentation on the Google Developers site.
This README file contains protobuf installation instructions. To install protobuf, you need to install the protocol compiler (used to compile .proto files) and the protobuf runtime for your chosen programming language.
The protocol compiler is written in C++. If you are using C++, please follow the C++ Installation Instructions to install protoc along with the C++ runtime.
For non-C++ users, the simplest way to install the protocol compiler is to download a pre-built binary from our GitHub release page.
In the downloads section of each release, you can find pre-built binaries in zip packages: protoc-$VERSION-$PLATFORM.zip
. It contains the protoc binary as well as a set of standard .proto
files distributed along with protobuf.
If you are looking for an old version that is not available in the release page, check out the Maven repository.
These pre-built binaries are only provided for released versions. If you want to use the github main version at HEAD, or you need to modify protobuf code, or you are using C++, it's recommended to build your own protoc binary from source.
If you would like to build protoc binary from source, see the C++ Installation Instructions.
Protobuf supports several different programming languages. For each programming language, you can find instructions in the corresponding source directory about how to install protobuf runtime for that specific language:
Language | Source |
---|---|
C++ (include C++ runtime and protoc) | src |
Java | java |
Python | python |
Objective-C | objectivec |
C# | csharp |
Ruby | ruby |
Go | protocolbuffers/protobuf-go |
PHP | php |
Dart | dart-lang/protobuf |
Javascript | protocolbuffers/protobuf-javascript |
The best way to learn how to use protobuf is to follow the tutorials in our developer guide.
If you want to learn from code examples, take a look at the examples in the examples directory.
The complete documentation is available via the Protocol Buffers documentation.
To be alerted to upcoming changes in Protocol Buffers and connect with protobuf developers and users, join the Google Group.