blob: e54108f62eac2676e0f66fe8dbb7282a6c50f744 [file] [log] [blame] [view]
temporal40ee5512008-07-10 02:12:20 +00001Protocol Buffers - Google's data interchange format
Feng Xiao17007a62014-08-28 14:39:49 -07002===================================================
3
Protobuf Team Bot30a7b232023-09-26 14:07:53 -07004[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/protocolbuffers/protobuf/badge)](https://securityscorecards.dev/viewer/?uri=github.com/protocolbuffers/protobuf)
5
Hong Shinf7de3bf2023-09-14 14:11:01 -07006Copyright 2023 Google LLC
Feng Xiao17007a62014-08-28 14:39:49 -07007
Feng Xiaod0e01142016-01-21 17:06:38 -08008Overview
9--------
temporal40ee5512008-07-10 02:12:20 +000010
Feng Xiaod0e01142016-01-21 17:06:38 -080011Protocol Buffers (a.k.a., protobuf) are Google's language-neutral,
12platform-neutral, extensible mechanism for serializing structured data. You
Protobuf Team Bot23d8aac2023-02-09 15:00:37 -080013can learn more about it in [protobuf's documentation](https://protobuf.dev).
Feng Xiao64d86522016-01-06 16:25:35 -080014
Feng Xiaod0e01142016-01-21 17:06:38 -080015This README file contains protobuf installation instructions. To install
16protobuf, you need to install the protocol compiler (used to compile .proto
17files) and the protobuf runtime for your chosen programming language.
Feng Xiao64d86522016-01-06 16:25:35 -080018
Protobuf Team Bot53ad6a42024-03-06 08:59:05 -080019Working With Protobuf Source Code
20---------------------------------
21
22Most users will find working from
23[supported releases](https://github.com/protocolbuffers/protobuf/releases) to be
24the easiest path.
25
26If you choose to work from the head revision of the main branch your build will
27occasionally be broken by source-incompatible changes and insufficiently-tested
28(and therefore broken) behavior.
29
30If you are using C++ or otherwise need to build protobuf from source as a part
31of your project, you should pin to a release commit on a release branch.
32
33This is because even release branches can experience some instability in between
34release commits.
35
Hong Shin3c3dfe02023-07-18 11:20:42 -070036Protobuf Compiler Installation
Feng Xiaod0e01142016-01-21 17:06:38 -080037------------------------------
Feng Xiao64d86522016-01-06 16:25:35 -080038
Hong Shin3c3dfe02023-07-18 11:20:42 -070039The protobuf compiler is written in C++. If you are using C++, please follow
Feng Xiaod0e01142016-01-21 17:06:38 -080040the [C++ Installation Instructions](src/README.md) to install protoc along
41with the C++ runtime.
Feng Xiao64d86522016-01-06 16:25:35 -080042
Feng Xiaod0e01142016-01-21 17:06:38 -080043For non-C++ users, the simplest way to install the protocol compiler is to
Protobuf Team Bot016ef232022-11-23 13:53:12 -080044download a pre-built binary from our [GitHub release page](https://github.com/protocolbuffers/protobuf/releases).
Feng Xiaode000522014-08-28 11:18:51 -070045
Feng Xiaod0e01142016-01-21 17:06:38 -080046In the downloads section of each release, you can find pre-built binaries in
Protobuf Team Bot016ef232022-11-23 13:53:12 -080047zip packages: `protoc-$VERSION-$PLATFORM.zip`. It contains the protoc binary
48as well as a set of standard `.proto` files distributed along with protobuf.
Feng Xiaode000522014-08-28 11:18:51 -070049
Feng Xiaod0e01142016-01-21 17:06:38 -080050If you are looking for an old version that is not available in the release
Protobuf Team Bot016ef232022-11-23 13:53:12 -080051page, check out the [Maven repository](https://repo1.maven.org/maven2/com/google/protobuf/protoc/).
Feng Xiaode000522014-08-28 11:18:51 -070052
Feng Xiaod0e01142016-01-21 17:06:38 -080053These pre-built binaries are only provided for released versions. If you want
noahdietz5abf8022022-04-12 10:25:08 -070054to use the github main version at HEAD, or you need to modify protobuf code,
Feng Xiaod0e01142016-01-21 17:06:38 -080055or you are using C++, it's recommended to build your own protoc binary from
56source.
temporal40ee5512008-07-10 02:12:20 +000057
Mike Kruskaled5c57a2022-08-10 22:51:29 -070058If you would like to build protoc binary from source, see the [C++ Installation Instructions](src/README.md).
temporal40ee5512008-07-10 02:12:20 +000059
Feng Xiaod0e01142016-01-21 17:06:38 -080060Protobuf Runtime Installation
61-----------------------------
temporal40ee5512008-07-10 02:12:20 +000062
Feng Xiaod0e01142016-01-21 17:06:38 -080063Protobuf supports several different programming languages. For each programming
64language, you can find instructions in the corresponding source directory about
65how to install protobuf runtime for that specific language:
temporal40ee5512008-07-10 02:12:20 +000066
Joshua Haberman96ccf402021-05-20 10:06:36 -070067| Language | Source |
68|--------------------------------------|-------------------------------------------------------------|
69| C++ (include C++ runtime and protoc) | [src](src) |
70| Java | [java](java) |
71| Python | [python](python) |
72| Objective-C | [objectivec](objectivec) |
73| C# | [csharp](csharp) |
Joshua Haberman96ccf402021-05-20 10:06:36 -070074| Ruby | [ruby](ruby) |
75| Go | [protocolbuffers/protobuf-go](https://github.com/protocolbuffers/protobuf-go)|
76| PHP | [php](php) |
77| Dart | [dart-lang/protobuf](https://github.com/dart-lang/protobuf) |
Protobuf Team Bot3e6dba72023-06-14 20:51:55 -070078| JavaScript | [protocolbuffers/protobuf-javascript](https://github.com/protocolbuffers/protobuf-javascript)|
temporal40ee5512008-07-10 02:12:20 +000079
Feng Xiao74bf45f2017-09-08 15:44:09 -070080Quick Start
81-----------
temporal40ee5512008-07-10 02:12:20 +000082
Protobuf Team Bot016ef232022-11-23 13:53:12 -080083The best way to learn how to use protobuf is to follow the [tutorials in our
Protobuf Team Bot23d8aac2023-02-09 15:00:37 -080084developer guide](https://protobuf.dev/getting-started).
Feng Xiao74bf45f2017-09-08 15:44:09 -070085
86If you want to learn from code examples, take a look at the examples in the
87[examples](examples) directory.
88
89Documentation
90-------------
temporal40ee5512008-07-10 02:12:20 +000091
Protobuf Team Bot23d8aac2023-02-09 15:00:37 -080092The complete documentation is available at the [Protocol Buffers doc site](https://protobuf.dev).
93
94Support Policy
95--------------
96
97Read about our [version support policy](https://protobuf.dev/version-support/)
98to stay current on support timeframes for the language libraries.
Protocol Buffers Docs1cb0d642022-07-17 13:16:59 +000099
100Developer Community
101-------------------
102
103To be alerted to upcoming changes in Protocol Buffers and connect with protobuf developers and users,
104[join the Google Group](https://groups.google.com/g/protobuf).