temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1 | Protocol Buffers - Google's data interchange format |
Feng Xiao | 17007a6 | 2014-08-28 14:39:49 -0700 | [diff] [blame] | 2 | =================================================== |
| 3 | |
Protobuf Team Bot | 30a7b23 | 2023-09-26 14:07:53 -0700 | [diff] [blame] | 4 | [](https://securityscorecards.dev/viewer/?uri=github.com/protocolbuffers/protobuf) |
| 5 | |
Hong Shin | f7de3bf | 2023-09-14 14:11:01 -0700 | [diff] [blame] | 6 | Copyright 2023 Google LLC |
Feng Xiao | 17007a6 | 2014-08-28 14:39:49 -0700 | [diff] [blame] | 7 | |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 8 | Overview |
| 9 | -------- |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10 | |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 11 | Protocol Buffers (a.k.a., protobuf) are Google's language-neutral, |
| 12 | platform-neutral, extensible mechanism for serializing structured data. You |
Protobuf Team Bot | 23d8aac | 2023-02-09 15:00:37 -0800 | [diff] [blame] | 13 | can learn more about it in [protobuf's documentation](https://protobuf.dev). |
Feng Xiao | 64d8652 | 2016-01-06 16:25:35 -0800 | [diff] [blame] | 14 | |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 15 | This README file contains protobuf installation instructions. To install |
| 16 | protobuf, you need to install the protocol compiler (used to compile .proto |
| 17 | files) and the protobuf runtime for your chosen programming language. |
Feng Xiao | 64d8652 | 2016-01-06 16:25:35 -0800 | [diff] [blame] | 18 | |
Protobuf Team Bot | 53ad6a4 | 2024-03-06 08:59:05 -0800 | [diff] [blame] | 19 | Working With Protobuf Source Code |
| 20 | --------------------------------- |
| 21 | |
| 22 | Most users will find working from |
| 23 | [supported releases](https://github.com/protocolbuffers/protobuf/releases) to be |
| 24 | the easiest path. |
| 25 | |
| 26 | If you choose to work from the head revision of the main branch your build will |
| 27 | occasionally be broken by source-incompatible changes and insufficiently-tested |
| 28 | (and therefore broken) behavior. |
| 29 | |
| 30 | If you are using C++ or otherwise need to build protobuf from source as a part |
| 31 | of your project, you should pin to a release commit on a release branch. |
| 32 | |
| 33 | This is because even release branches can experience some instability in between |
| 34 | release commits. |
| 35 | |
Hong Shin | 3c3dfe0 | 2023-07-18 11:20:42 -0700 | [diff] [blame] | 36 | Protobuf Compiler Installation |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 37 | ------------------------------ |
Feng Xiao | 64d8652 | 2016-01-06 16:25:35 -0800 | [diff] [blame] | 38 | |
Hong Shin | 3c3dfe0 | 2023-07-18 11:20:42 -0700 | [diff] [blame] | 39 | The protobuf compiler is written in C++. If you are using C++, please follow |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 40 | the [C++ Installation Instructions](src/README.md) to install protoc along |
| 41 | with the C++ runtime. |
Feng Xiao | 64d8652 | 2016-01-06 16:25:35 -0800 | [diff] [blame] | 42 | |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 43 | For non-C++ users, the simplest way to install the protocol compiler is to |
Protobuf Team Bot | 016ef23 | 2022-11-23 13:53:12 -0800 | [diff] [blame] | 44 | download a pre-built binary from our [GitHub release page](https://github.com/protocolbuffers/protobuf/releases). |
Feng Xiao | de00052 | 2014-08-28 11:18:51 -0700 | [diff] [blame] | 45 | |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 46 | In the downloads section of each release, you can find pre-built binaries in |
Protobuf Team Bot | 016ef23 | 2022-11-23 13:53:12 -0800 | [diff] [blame] | 47 | zip packages: `protoc-$VERSION-$PLATFORM.zip`. It contains the protoc binary |
| 48 | as well as a set of standard `.proto` files distributed along with protobuf. |
Feng Xiao | de00052 | 2014-08-28 11:18:51 -0700 | [diff] [blame] | 49 | |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 50 | If you are looking for an old version that is not available in the release |
Protobuf Team Bot | 016ef23 | 2022-11-23 13:53:12 -0800 | [diff] [blame] | 51 | page, check out the [Maven repository](https://repo1.maven.org/maven2/com/google/protobuf/protoc/). |
Feng Xiao | de00052 | 2014-08-28 11:18:51 -0700 | [diff] [blame] | 52 | |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 53 | These pre-built binaries are only provided for released versions. If you want |
noahdietz | 5abf802 | 2022-04-12 10:25:08 -0700 | [diff] [blame] | 54 | to use the github main version at HEAD, or you need to modify protobuf code, |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 55 | or you are using C++, it's recommended to build your own protoc binary from |
| 56 | source. |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 57 | |
Mike Kruskal | ed5c57a | 2022-08-10 22:51:29 -0700 | [diff] [blame] | 58 | If you would like to build protoc binary from source, see the [C++ Installation Instructions](src/README.md). |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 59 | |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 60 | Protobuf Runtime Installation |
| 61 | ----------------------------- |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 62 | |
Feng Xiao | d0e0114 | 2016-01-21 17:06:38 -0800 | [diff] [blame] | 63 | Protobuf supports several different programming languages. For each programming |
| 64 | language, you can find instructions in the corresponding source directory about |
| 65 | how to install protobuf runtime for that specific language: |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 66 | |
Joshua Haberman | 96ccf40 | 2021-05-20 10:06:36 -0700 | [diff] [blame] | 67 | | 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 Haberman | 96ccf40 | 2021-05-20 10:06:36 -0700 | [diff] [blame] | 74 | | 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 Bot | 3e6dba7 | 2023-06-14 20:51:55 -0700 | [diff] [blame] | 78 | | JavaScript | [protocolbuffers/protobuf-javascript](https://github.com/protocolbuffers/protobuf-javascript)| |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 79 | |
Feng Xiao | 74bf45f | 2017-09-08 15:44:09 -0700 | [diff] [blame] | 80 | Quick Start |
| 81 | ----------- |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 82 | |
Protobuf Team Bot | 016ef23 | 2022-11-23 13:53:12 -0800 | [diff] [blame] | 83 | The best way to learn how to use protobuf is to follow the [tutorials in our |
Protobuf Team Bot | 23d8aac | 2023-02-09 15:00:37 -0800 | [diff] [blame] | 84 | developer guide](https://protobuf.dev/getting-started). |
Feng Xiao | 74bf45f | 2017-09-08 15:44:09 -0700 | [diff] [blame] | 85 | |
| 86 | If you want to learn from code examples, take a look at the examples in the |
| 87 | [examples](examples) directory. |
| 88 | |
| 89 | Documentation |
| 90 | ------------- |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 91 | |
Protobuf Team Bot | 23d8aac | 2023-02-09 15:00:37 -0800 | [diff] [blame] | 92 | The complete documentation is available at the [Protocol Buffers doc site](https://protobuf.dev). |
| 93 | |
| 94 | Support Policy |
| 95 | -------------- |
| 96 | |
| 97 | Read about our [version support policy](https://protobuf.dev/version-support/) |
| 98 | to stay current on support timeframes for the language libraries. |
Protocol Buffers Docs | 1cb0d64 | 2022-07-17 13:16:59 +0000 | [diff] [blame] | 99 | |
| 100 | Developer Community |
| 101 | ------------------- |
| 102 | |
| 103 | To 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). |