xref: /aosp_15_r20/external/protobuf/README.md (revision 1b3f573f81763fcece89efc2b6a5209149e44ab8)
1*1b3f573fSAndroid Build Coastguard WorkerProtocol Buffers - Google's data interchange format
2*1b3f573fSAndroid Build Coastguard Worker===================================================
3*1b3f573fSAndroid Build Coastguard Worker
4*1b3f573fSAndroid Build Coastguard WorkerCopyright 2008 Google Inc.
5*1b3f573fSAndroid Build Coastguard Worker
6*1b3f573fSAndroid Build Coastguard Workerhttps://developers.google.com/protocol-buffers/
7*1b3f573fSAndroid Build Coastguard Worker
8*1b3f573fSAndroid Build Coastguard WorkerOverview
9*1b3f573fSAndroid Build Coastguard Worker--------
10*1b3f573fSAndroid Build Coastguard Worker
11*1b3f573fSAndroid Build Coastguard WorkerProtocol Buffers (a.k.a., protobuf) are Google's language-neutral,
12*1b3f573fSAndroid Build Coastguard Workerplatform-neutral, extensible mechanism for serializing structured data. You
13*1b3f573fSAndroid Build Coastguard Workercan find [protobuf's documentation on the Google Developers site](https://developers.google.com/protocol-buffers/).
14*1b3f573fSAndroid Build Coastguard Worker
15*1b3f573fSAndroid Build Coastguard WorkerThis README file contains protobuf installation instructions. To install
16*1b3f573fSAndroid Build Coastguard Workerprotobuf, you need to install the protocol compiler (used to compile .proto
17*1b3f573fSAndroid Build Coastguard Workerfiles) and the protobuf runtime for your chosen programming language.
18*1b3f573fSAndroid Build Coastguard Worker
19*1b3f573fSAndroid Build Coastguard WorkerProtocol Compiler Installation
20*1b3f573fSAndroid Build Coastguard Worker------------------------------
21*1b3f573fSAndroid Build Coastguard Worker
22*1b3f573fSAndroid Build Coastguard WorkerThe protocol compiler is written in C++. If you are using C++, please follow
23*1b3f573fSAndroid Build Coastguard Workerthe [C++ Installation Instructions](src/README.md) to install protoc along
24*1b3f573fSAndroid Build Coastguard Workerwith the C++ runtime.
25*1b3f573fSAndroid Build Coastguard Worker
26*1b3f573fSAndroid Build Coastguard WorkerFor non-C++ users, the simplest way to install the protocol compiler is to
27*1b3f573fSAndroid Build Coastguard Workerdownload a pre-built binary from our release page:
28*1b3f573fSAndroid Build Coastguard Worker
29*1b3f573fSAndroid Build Coastguard Worker  [https://github.com/protocolbuffers/protobuf/releases](https://github.com/protocolbuffers/protobuf/releases)
30*1b3f573fSAndroid Build Coastguard Worker
31*1b3f573fSAndroid Build Coastguard WorkerIn the downloads section of each release, you can find pre-built binaries in
32*1b3f573fSAndroid Build Coastguard Workerzip packages: protoc-$VERSION-$PLATFORM.zip. It contains the protoc binary
33*1b3f573fSAndroid Build Coastguard Workeras well as a set of standard .proto files distributed along with protobuf.
34*1b3f573fSAndroid Build Coastguard Worker
35*1b3f573fSAndroid Build Coastguard WorkerIf you are looking for an old version that is not available in the release
36*1b3f573fSAndroid Build Coastguard Workerpage, check out the maven repo here:
37*1b3f573fSAndroid Build Coastguard Worker
38*1b3f573fSAndroid Build Coastguard Worker  [https://repo1.maven.org/maven2/com/google/protobuf/protoc/](https://repo1.maven.org/maven2/com/google/protobuf/protoc/)
39*1b3f573fSAndroid Build Coastguard Worker
40*1b3f573fSAndroid Build Coastguard WorkerThese pre-built binaries are only provided for released versions. If you want
41*1b3f573fSAndroid Build Coastguard Workerto use the github main version at HEAD, or you need to modify protobuf code,
42*1b3f573fSAndroid Build Coastguard Workeror you are using C++, it's recommended to build your own protoc binary from
43*1b3f573fSAndroid Build Coastguard Workersource.
44*1b3f573fSAndroid Build Coastguard Worker
45*1b3f573fSAndroid Build Coastguard WorkerIf you would like to build protoc binary from source, see the [C++ Installation
46*1b3f573fSAndroid Build Coastguard WorkerInstructions](src/README.md).
47*1b3f573fSAndroid Build Coastguard Worker
48*1b3f573fSAndroid Build Coastguard WorkerProtobuf Runtime Installation
49*1b3f573fSAndroid Build Coastguard Worker-----------------------------
50*1b3f573fSAndroid Build Coastguard Worker
51*1b3f573fSAndroid Build Coastguard WorkerProtobuf supports several different programming languages. For each programming
52*1b3f573fSAndroid Build Coastguard Workerlanguage, you can find instructions in the corresponding source directory about
53*1b3f573fSAndroid Build Coastguard Workerhow to install protobuf runtime for that specific language:
54*1b3f573fSAndroid Build Coastguard Worker
55*1b3f573fSAndroid Build Coastguard Worker| Language                             | Source                                                      |
56*1b3f573fSAndroid Build Coastguard Worker|--------------------------------------|-------------------------------------------------------------|
57*1b3f573fSAndroid Build Coastguard Worker| C++ (include C++ runtime and protoc) | [src](src)                                                  |
58*1b3f573fSAndroid Build Coastguard Worker| Java                                 | [java](java)                                                |
59*1b3f573fSAndroid Build Coastguard Worker| Python                               | [python](python)                                            |
60*1b3f573fSAndroid Build Coastguard Worker| Objective-C                          | [objectivec](objectivec)                                    |
61*1b3f573fSAndroid Build Coastguard Worker| C#                                   | [csharp](csharp)                                            |
62*1b3f573fSAndroid Build Coastguard Worker| Ruby                                 | [ruby](ruby)                                                |
63*1b3f573fSAndroid Build Coastguard Worker| Go                                   | [protocolbuffers/protobuf-go](https://github.com/protocolbuffers/protobuf-go)|
64*1b3f573fSAndroid Build Coastguard Worker| PHP                                  | [php](php)                                                  |
65*1b3f573fSAndroid Build Coastguard Worker| Dart                                 | [dart-lang/protobuf](https://github.com/dart-lang/protobuf) |
66*1b3f573fSAndroid Build Coastguard Worker
67*1b3f573fSAndroid Build Coastguard WorkerQuick Start
68*1b3f573fSAndroid Build Coastguard Worker-----------
69*1b3f573fSAndroid Build Coastguard Worker
70*1b3f573fSAndroid Build Coastguard WorkerThe best way to learn how to use protobuf is to follow the tutorials in our
71*1b3f573fSAndroid Build Coastguard Workerdeveloper guide:
72*1b3f573fSAndroid Build Coastguard Worker
73*1b3f573fSAndroid Build Coastguard Workerhttps://developers.google.com/protocol-buffers/docs/tutorials
74*1b3f573fSAndroid Build Coastguard Worker
75*1b3f573fSAndroid Build Coastguard WorkerIf you want to learn from code examples, take a look at the examples in the
76*1b3f573fSAndroid Build Coastguard Worker[examples](examples) directory.
77*1b3f573fSAndroid Build Coastguard Worker
78*1b3f573fSAndroid Build Coastguard WorkerDocumentation
79*1b3f573fSAndroid Build Coastguard Worker-------------
80*1b3f573fSAndroid Build Coastguard Worker
81*1b3f573fSAndroid Build Coastguard WorkerThe complete documentation for Protocol Buffers is available via the
82*1b3f573fSAndroid Build Coastguard Workerweb at:
83*1b3f573fSAndroid Build Coastguard Worker
84*1b3f573fSAndroid Build Coastguard Workerhttps://developers.google.com/protocol-buffers/
85