• Home
Name Date Size #Lines LOC

..--

.github/03-May-2024-149118

benchmarks/03-May-2024-12,87311,546

cmake/03-May-2024-2,3622,043

conformance/03-May-2024-15,72612,006

csharp/03-May-2024-158,328129,173

docs/03-May-2024-1,8991,573

editors/03-May-2024-331183

examples/03-May-2024-1,3341,020

java/03-May-2024-128,59293,012

js/03-May-2024-56,25535,385

kokoro/03-May-2024-5,4613,504

m4/03-May-2024-1,9311,594

objectivec/03-May-2024-89,74669,273

patches/03-May-2024-506466

php/03-May-2024-56,83238,177

protoc-artifacts/03-May-2024-781628

python/03-May-2024-50,83837,819

ruby/03-May-2024-35,57926,617

src/03-May-2024-299,558221,775

third_party/03-May-2024-540380

toolchain/03-May-2024-396368

util/python/03-May-2024-2119

.bazelignoreD03-May-202499 54

.gitmodulesD03-May-2024245 87

.readthedocs.ymlD03-May-2024518 2311

BUILDD03-May-202450.4 KiB1,5061,378

BUILD.gnD03-May-202414.4 KiB389327

CHANGES.txtD03-May-2024147.6 KiB3,2652,793

CONTRIBUTING.mdD03-May-20246.7 KiB121102

CONTRIBUTORS.txtD03-May-20244 KiB10896

DEPSD03-May-202484 76

DIR_METADATAD03-May-202444 43

LICENSED03-May-20241.7 KiB3328

Makefile.amD03-May-2024108.7 KiB1,4741,439

Protobuf-C++.podspecD03-May-20241.5 KiB4133

Protobuf.podspecD03-May-20242.2 KiB4338

README.chromiumD03-May-20245.4 KiB14299

README.mdD03-May-20243.9 KiB8661

SECURITY.mdD03-May-2024176 53

WORKSPACED03-May-20242 KiB6953

appveyor.batD03-May-20241.4 KiB4940

appveyor.ymlD03-May-20241.1 KiB4833

autogen.shD03-May-20241.2 KiB4524

build_files_updated_unittest.shD03-May-20241.7 KiB6339

cc_proto_blacklist_test.bzlD03-May-2024999 3930

compiler_config_setting.bzlD03-May-2024964 2422

configure.acD03-May-20247.9 KiB248213

fix_permissions.shD03-May-2024147 97

gen_chromium_file_lists.pyD03-May-20244.7 KiB137100

gen_extra_chromium_files.pyD03-May-20241.3 KiB4527

generate_changelog.pyD03-May-20241.5 KiB6656

generate_descriptor_proto.shD03-May-20243.1 KiB11689

global.jsonD03-May-202481 76

internal.bzlD03-May-20241 KiB3025

maven_install.jsonD03-May-202417.5 KiB288287

mirclient.ccD03-May-202424.2 KiB470468

mirclient.mapD03-May-2024639 3129

post_process_dist.shD03-May-20241.8 KiB6532

proto_library.gniD03-May-202421.6 KiB684615

proto_sources.gniD03-May-202421.4 KiB440431

protobuf-lite.pc.inD03-May-2024249 1210

protobuf.bzlD03-May-202419.1 KiB588511

protobuf.pc.inD03-May-2024271 1411

protobuf_deps.bzlD03-May-20244.2 KiB9481

protobuf_release.bzlD03-May-20241.4 KiB5142

protobuf_version.bzlD03-May-202428 21

tests.shD03-May-202415.6 KiB607448

update_compatibility_version.pyD03-May-20241.4 KiB5741

update_file_lists.shD03-May-20246.6 KiB201167

update_version.pyD03-May-202413.1 KiB415343

version.jsonD03-May-2024397 1717

README.chromium

1Name: Protocol Buffers
2Short Name: protobuf
3URL: https://github.com/google/protobuf
4License: BSD
5License File: LICENSE
6Version: 3.20.3
7CPEPrefix: cpe:/a:google:protobuf:3.20.3
8Revision: fe271ab76f2ad2b2b28c10443865d2af21e27e0e
9Security Critical: yes
10
11Steps used to create the current version:
121. Pull the release from https://github.com/google/protobuf/releases (Source
13   code zip)
142. Add build files (BUILD.gn, proto_library.gni).
15
16   As needed, update defines required by protobuf on various platforms, warnings
17   generated by compilers, and new dependencies introduced.
183. Add DEPS, DIR_METADATA, and OWNERS.
194. Add mirclient.cc and mirclient.map.
205. Add gen_extra_chromium_files.py and gen_chromium_file_lists.py.
216. Apply patches in patches/ (see the description below):
22
23   $ for patch in patches/*; do patch -s -p1 < $patch; done
24
25   For future releases, it will be worth looking into which patches still need
26   to be applied. In case of conflict, update those patches accordingly and save
27   them back in place (i.e. in patches directory).
287. Generate descriptor_pb2.py using the script "gen_extra_chromium_files.py" in
29   the same directory as this file.
308. Generate proto_sources.gni using the script "gen_chromium_file_lists.py".
319. Update this file (README.chromium).
32
33Note about libmirclient:
34
35On Ubuntu, Chromium has an indirect dependency on the system
36libprotobuf-lite through libmirclient (through GTK).  The symbols in
37the system library conflict with Chromium's libprotobuf-lite used on
38component builds.
39
40mirclient.* are added to stub out libmirclient.so.9 to prevent loading
41the system libprotobuf-lite.  Chromium's replacement libmirclient will
42get loaded, but its symbols will never be used directly or indirectly.
43
44Note about vpython:
45
46Some Python scripts end up mixing protoc output from this copy of protobuf with
47the google.protobuf module from vpython's protobuf. If Python scripts break due
48to the vpython copy of protobuf, you may need to update the version in
49//.vpython3. See https://crbug.com/1320047.
50
51Description of the patches:
52
53- 0004-fix-shared-library-exports.patch
54
55  This patch allows exporting protobuf symbols in Linux .so libraries, so
56  that protobuf can be built as a component (see http://crrev.com/179806).
57
58- 0008-uninline_get_empty_string.patch
59- 0010-uninline-generated-code.patch
60
61  These patches uninline some functions, resulting in a significant reduction
62  (somewhere between 500 KB and 1 MB) of binary size.
63
64- 0021-Fix-protobuf-s-library-.gitinore-file.patch
65
66  Un-ignores python/google/protobuf/descriptor_pb2.py and
67  python/google/protobuf/compiler/plugin_pb2.py
68
69- 0022-Allow-deprecated-fields.patch
70
71  Allows deprecated fields to be used without extra C++ compiler warnings.
72
73- 0026-remove-sprintf.patch
74
75  Imports
76  https://github.com/protocolbuffers/protobuf/commit/c0fc2e881bc36aafb0bf539bf41889611370f60c
77  to remove use of sprintf.
78
79- 0027-no-noreturn.patch
80
81  Removes an instance of [[noreturn]]. The attribute is correct, but the way
82  protobuf's GOOGLE_LOG(FATAL) is defined, the compiler can't see this and it
83  trips -Winvalid-noreturn. See https://github.com/protocolbuffers/protobuf/issues/9817
84
85- 0028-export-internal-metadata.patch
86
87  Adds a missing PROTOBUF_EXPORT. See cl/443188236
88
89- 0029-make-initializers-optimizable.patch
90
91  Makes the InitProtobufDefaults() static initializer optimizable by Clang when
92  built with libc++. It patches out the OnShutdownDestroyString call, which we
93  do not need, and removes the thread-safe initialization. Thread safety is only
94  needed if a static initializer spawns a thread which then calls
95  InitProtobufDefaults() without synchronizing with the start of main().
96  (Anything which happens after main() starts can rely on the initializer
97  running.)
98
99- 0030-workaround-window-constinit.patch
100
101  Disables PROTOBUF_CONSTINIT in generated code in Windows shared library
102  builds. Protobuf's default instances take pointers to a dllimport variable,
103  fixed_address_empty_string. This is not constinit on Windows. This is a bug in
104  protobuf as the default instance was intended to be constant-initialized. But
105  the components build in Chromium is a developer configuration, so we tolerate
106  an initializer as long as the build works, until protobuf has a proper fix.
107
108  See https://github.com/protocolbuffers/protobuf/issues/10159.
109
110- 0031-workaround-cfi-unrelated-cast.patch
111
112  A workaround for Clang's Control Flow Integrity check for casting pointers to
113  memory that his not yet initialized to be of that type for empty arrays, does
114  not work, and still fails. This patch removes the workaround and instead
115  disables cfi-unrelated-cast for the affected methods and simplifies them.
116
117  See https://github.com/protocolbuffers/protobuf/issues/10186.
118  See https://bugs.chromium.org/p/chromium/issues/detail?id=1294200#c26.
119
120- 0032-cxx20.patch
121
122  Fixes necessary to build in --std=c++20 mode.
123
124  Imports https://critique.corp.google.com/cl/451177197 (a portion of
125  https://github.com/protocolbuffers/protobuf/commit/6dd8af4ecfa7987bddb309862932886b84f1e4ef
126  ).
127
128- 0033-no-enum-conversion-warn.patch
129
130  Avoid hitting the clang error -Wenum-constexpr-conversion by specifying width
131  of the enum.
132
133  Imports https://critique.corp.google.com/cl/466986872.
134
135- 0034-change-macro-to-avoid-pedantic-warning.patch
136
137  Avoid hitting -Wextra-semi.
138
139  Imports (rebased):
140  https://github.com/protocolbuffers/protobuf/commit/def602dd07b7eae1cac6823705975317b5607fc3
141
142

README.md

1Protocol Buffers - Google's data interchange format
2===================================================
3
4Copyright 2008 Google Inc.
5
6https://developers.google.com/protocol-buffers/
7
8Overview
9--------
10
11Protocol Buffers (a.k.a., protobuf) are Google's language-neutral,
12platform-neutral, extensible mechanism for serializing structured data. You
13can find [protobuf's documentation on the Google Developers site](https://developers.google.com/protocol-buffers/).
14
15This 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.
18
19Protocol Compiler Installation
20------------------------------
21
22The protocol compiler is written in C++. If you are using C++, please follow
23the [C++ Installation Instructions](src/README.md) to install protoc along
24with the C++ runtime.
25
26For non-C++ users, the simplest way to install the protocol compiler is to
27download a pre-built binary from our release page:
28
29  [https://github.com/protocolbuffers/protobuf/releases](https://github.com/protocolbuffers/protobuf/releases)
30
31In the downloads section of each release, you can find pre-built binaries in
32zip packages: protoc-$VERSION-$PLATFORM.zip. It contains the protoc binary
33as well as a set of standard .proto files distributed along with protobuf.
34
35If you are looking for an old version that is not available in the release
36page, check out the maven repo here:
37
38  [https://repo1.maven.org/maven2/com/google/protobuf/protoc/](https://repo1.maven.org/maven2/com/google/protobuf/protoc/)
39
40These pre-built binaries are only provided for released versions. If you want
41to use the github master version at HEAD, or you need to modify protobuf code,
42or you are using C++, it's recommended to build your own protoc binary from
43source.
44
45If you would like to build protoc binary from source, see the [C++ Installation
46Instructions](src/README.md).
47
48Protobuf Runtime Installation
49-----------------------------
50
51Protobuf supports several different programming languages. For each programming
52language, you can find instructions in the corresponding source directory about
53how to install protobuf runtime for that specific language:
54
55| Language                             | Source                                                      |
56|--------------------------------------|-------------------------------------------------------------|
57| C++ (include C++ runtime and protoc) | [src](src)                                                  |
58| Java                                 | [java](java)                                                |
59| Python                               | [python](python)                                            |
60| Objective-C                          | [objectivec](objectivec)                                    |
61| C#                                   | [csharp](csharp)                                            |
62| JavaScript                           | [js](js)                                                    |
63| Ruby                                 | [ruby](ruby)                                                |
64| Go                                   | [protocolbuffers/protobuf-go](https://github.com/protocolbuffers/protobuf-go)|
65| PHP                                  | [php](php)                                                  |
66| Dart                                 | [dart-lang/protobuf](https://github.com/dart-lang/protobuf) |
67
68Quick Start
69-----------
70
71The best way to learn how to use protobuf is to follow the tutorials in our
72developer guide:
73
74https://developers.google.com/protocol-buffers/docs/tutorials
75
76If you want to learn from code examples, take a look at the examples in the
77[examples](examples) directory.
78
79Documentation
80-------------
81
82The complete documentation for Protocol Buffers is available via the
83web at:
84
85https://developers.google.com/protocol-buffers/
86