|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| .github/ | | 06-Sep-2024 | - | 149 | 118 |
| benchmarks/ | | 06-Sep-2024 | - | 12,873 | 11,546 |
| cmake/ | | 06-Sep-2024 | - | 2,362 | 2,043 |
| conformance/ | | 06-Sep-2024 | - | 15,726 | 12,006 |
| csharp/ | | 06-Sep-2024 | - | 158,328 | 129,173 |
| docs/ | | 06-Sep-2024 | - | 1,899 | 1,573 |
| editors/ | | 06-Sep-2024 | - | 331 | 183 |
| examples/ | | 06-Sep-2024 | - | 1,334 | 1,020 |
| java/ | | 06-Sep-2024 | - | 128,592 | 93,012 |
| js/ | | 06-Sep-2024 | - | 56,255 | 35,385 |
| kokoro/ | | 06-Sep-2024 | - | 5,461 | 3,504 |
| m4/ | | 06-Sep-2024 | - | 1,931 | 1,594 |
| objectivec/ | | 06-Sep-2024 | - | 89,746 | 69,273 |
| patches/ | | 06-Sep-2024 | - | 540 | 495 |
| php/ | | 06-Sep-2024 | - | 56,832 | 38,177 |
| protoc-artifacts/ | | 06-Sep-2024 | - | 781 | 628 |
| python/ | | 06-Sep-2024 | - | 50,838 | 37,819 |
| ruby/ | | 06-Sep-2024 | - | 35,579 | 26,617 |
| src/ | | 06-Sep-2024 | - | 299,562 | 221,779 |
| third_party/ | | 06-Sep-2024 | - | 540 | 380 |
| toolchain/ | | 06-Sep-2024 | - | 396 | 368 |
| util/python/ | | 06-Sep-2024 | - | 21 | 19 |
| .bazelignore | D | 06-Sep-2024 | 99 | 5 | 4 |
| .gitmodules | D | 06-Sep-2024 | 245 | 8 | 7 |
| .readthedocs.yml | D | 06-Sep-2024 | 518 | 23 | 11 |
| BUILD | D | 06-Sep-2024 | 50.4 KiB | 1,506 | 1,378 |
| BUILD.gn | D | 06-Sep-2024 | 14.2 KiB | 392 | 330 |
| CHANGES.txt | D | 06-Sep-2024 | 147.6 KiB | 3,265 | 2,793 |
| CONTRIBUTING.md | D | 06-Sep-2024 | 6.7 KiB | 121 | 102 |
| CONTRIBUTORS.txt | D | 06-Sep-2024 | 4 KiB | 108 | 96 |
| DEPS | D | 06-Sep-2024 | 84 | 7 | 6 |
| DIR_METADATA | D | 06-Sep-2024 | 44 | 4 | 3 |
| LICENSE | D | 06-Sep-2024 | 1.7 KiB | 33 | 28 |
| Makefile.am | D | 06-Sep-2024 | 108.7 KiB | 1,474 | 1,439 |
| Protobuf-C++.podspec | D | 06-Sep-2024 | 1.5 KiB | 41 | 33 |
| Protobuf.podspec | D | 06-Sep-2024 | 2.2 KiB | 43 | 38 |
| README.chromium | D | 06-Sep-2024 | 5.9 KiB | 155 | 109 |
| README.md | D | 06-Sep-2024 | 3.9 KiB | 86 | 61 |
| SECURITY.md | D | 06-Sep-2024 | 176 | 5 | 3 |
| WORKSPACE | D | 06-Sep-2024 | 2 KiB | 69 | 53 |
| appveyor.bat | D | 06-Sep-2024 | 1.4 KiB | 49 | 40 |
| appveyor.yml | D | 06-Sep-2024 | 1.1 KiB | 48 | 33 |
| autogen.sh | D | 06-Sep-2024 | 1.2 KiB | 45 | 24 |
| build_files_updated_unittest.sh | D | 06-Sep-2024 | 1.7 KiB | 63 | 39 |
| cc_proto_blacklist_test.bzl | D | 06-Sep-2024 | 999 | 39 | 30 |
| compiler_config_setting.bzl | D | 06-Sep-2024 | 964 | 24 | 22 |
| configure.ac | D | 06-Sep-2024 | 7.9 KiB | 248 | 213 |
| fix_permissions.sh | D | 06-Sep-2024 | 147 | 9 | 7 |
| gen_chromium_file_lists.py | D | 06-Sep-2024 | 4.7 KiB | 137 | 100 |
| gen_extra_chromium_files.py | D | 06-Sep-2024 | 1.3 KiB | 45 | 27 |
| generate_changelog.py | D | 06-Sep-2024 | 1.5 KiB | 66 | 56 |
| generate_descriptor_proto.sh | D | 06-Sep-2024 | 3.1 KiB | 116 | 89 |
| global.json | D | 06-Sep-2024 | 81 | 7 | 6 |
| internal.bzl | D | 06-Sep-2024 | 1 KiB | 30 | 25 |
| maven_install.json | D | 06-Sep-2024 | 17.5 KiB | 288 | 287 |
| mirclient.cc | D | 06-Sep-2024 | 24.2 KiB | 470 | 468 |
| mirclient.map | D | 06-Sep-2024 | 639 | 31 | 29 |
| post_process_dist.sh | D | 06-Sep-2024 | 1.8 KiB | 65 | 32 |
| proto_library.gni | D | 06-Sep-2024 | 21.6 KiB | 684 | 615 |
| proto_sources.gni | D | 06-Sep-2024 | 21.4 KiB | 440 | 431 |
| protobuf-lite.pc.in | D | 06-Sep-2024 | 249 | 12 | 10 |
| protobuf.bzl | D | 06-Sep-2024 | 19.1 KiB | 588 | 511 |
| protobuf.pc.in | D | 06-Sep-2024 | 271 | 14 | 11 |
| protobuf_deps.bzl | D | 06-Sep-2024 | 4.2 KiB | 94 | 81 |
| protobuf_release.bzl | D | 06-Sep-2024 | 1.4 KiB | 51 | 42 |
| protobuf_version.bzl | D | 06-Sep-2024 | 28 | 2 | 1 |
| tests.sh | D | 06-Sep-2024 | 15.6 KiB | 607 | 448 |
| update_compatibility_version.py | D | 06-Sep-2024 | 1.4 KiB | 57 | 41 |
| update_file_lists.sh | D | 06-Sep-2024 | 6.6 KiB | 201 | 167 |
| update_version.py | D | 06-Sep-2024 | 13.1 KiB | 415 | 343 |
| version.json | D | 06-Sep-2024 | 397 | 17 | 17 |
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
10Shipped: yes
11
12Steps used to create the current version:
131. Pull the release from https://github.com/google/protobuf/releases (Source
14 code zip)
152. Add build files (BUILD.gn, proto_library.gni).
16
17 As needed, update defines required by protobuf on various platforms, warnings
18 generated by compilers, and new dependencies introduced.
193. Add DEPS, DIR_METADATA, and OWNERS.
204. Add mirclient.cc and mirclient.map.
215. Add gen_extra_chromium_files.py and gen_chromium_file_lists.py.
226. Apply patches in patches/ (see the description below):
23
24 $ for patch in patches/*; do patch -s -p1 < $patch; done
25
26 For future releases, it will be worth looking into which patches still need
27 to be applied. In case of conflict, update those patches accordingly and save
28 them back in place (i.e. in patches directory).
297. Generate descriptor_pb2.py using the script "gen_extra_chromium_files.py" in
30 the same directory as this file.
318. Generate proto_sources.gni using the script "gen_chromium_file_lists.py".
329. Update this file (README.chromium).
33
34Note about libmirclient:
35
36On Ubuntu, Chromium has an indirect dependency on the system
37libprotobuf-lite through libmirclient (through GTK). The symbols in
38the system library conflict with Chromium's libprotobuf-lite used on
39component builds.
40
41mirclient.* are added to stub out libmirclient.so.9 to prevent loading
42the system libprotobuf-lite. Chromium's replacement libmirclient will
43get loaded, but its symbols will never be used directly or indirectly.
44
45Note about vpython:
46
47Some Python scripts end up mixing protoc output from this copy of protobuf with
48the google.protobuf module from vpython's protobuf. If Python scripts break due
49to the vpython copy of protobuf, you may need to update the version in
50//.vpython3. See https://crbug.com/1320047.
51
52Description of the patches:
53
54- 0004-fix-shared-library-exports.patch
55
56 This patch allows exporting protobuf symbols in Linux .so libraries, so
57 that protobuf can be built as a component (see http://crrev.com/179806).
58
59- 0008-uninline_get_empty_string.patch
60- 0010-uninline-generated-code.patch
61
62 These patches uninline some functions, resulting in a significant reduction
63 (somewhere between 500 KB and 1 MB) of binary size.
64
65- 0021-Fix-protobuf-s-library-.gitinore-file.patch
66
67 Un-ignores python/google/protobuf/descriptor_pb2.py and
68 python/google/protobuf/compiler/plugin_pb2.py
69
70- 0022-Allow-deprecated-fields.patch
71
72 Allows deprecated fields to be used without extra C++ compiler warnings.
73
74- 0026-remove-sprintf.patch
75
76 Imports
77 https://github.com/protocolbuffers/protobuf/commit/c0fc2e881bc36aafb0bf539bf41889611370f60c
78 to remove use of sprintf.
79
80- 0027-no-noreturn.patch
81
82 Removes an instance of [[noreturn]]. The attribute is correct, but the way
83 protobuf's GOOGLE_LOG(FATAL) is defined, the compiler can't see this and it
84 trips -Winvalid-noreturn. See https://github.com/protocolbuffers/protobuf/issues/9817
85
86- 0028-export-internal-metadata.patch
87
88 Adds a missing PROTOBUF_EXPORT. See cl/443188236
89
90- 0029-make-initializers-optimizable.patch
91
92 Makes the InitProtobufDefaults() static initializer optimizable by Clang when
93 built with libc++. It patches out the OnShutdownDestroyString call, which we
94 do not need, and removes the thread-safe initialization. Thread safety is only
95 needed if a static initializer spawns a thread which then calls
96 InitProtobufDefaults() without synchronizing with the start of main().
97 (Anything which happens after main() starts can rely on the initializer
98 running.)
99
100- 0030-workaround-window-constinit.patch
101
102 Disables PROTOBUF_CONSTINIT in generated code in Windows shared library
103 builds. Protobuf's default instances take pointers to a dllimport variable,
104 fixed_address_empty_string. This is not constinit on Windows. This is a bug in
105 protobuf as the default instance was intended to be constant-initialized. But
106 the components build in Chromium is a developer configuration, so we tolerate
107 an initializer as long as the build works, until protobuf has a proper fix.
108
109 See https://github.com/protocolbuffers/protobuf/issues/10159.
110
111- 0031-workaround-cfi-unrelated-cast.patch
112
113 A workaround for Clang's Control Flow Integrity check for casting pointers to
114 memory that his not yet initialized to be of that type for empty arrays, does
115 not work, and still fails. This patch removes the workaround and instead
116 disables cfi-unrelated-cast for the affected methods and simplifies them.
117
118 See https://github.com/protocolbuffers/protobuf/issues/10186.
119 See https://bugs.chromium.org/p/chromium/issues/detail?id=1294200#c26.
120
121- 0032-cxx20.patch
122
123 Fixes necessary to build in --std=c++20 mode.
124
125 Imports https://critique.corp.google.com/cl/451177197 (a portion of
126 https://github.com/protocolbuffers/protobuf/commit/6dd8af4ecfa7987bddb309862932886b84f1e4ef
127 ).
128
129- 0033-no-enum-conversion-warn.patch
130
131 Avoid hitting the clang error -Wenum-constexpr-conversion by specifying width
132 of the enum.
133
134 Imports https://critique.corp.google.com/cl/466986872.
135
136- 0034-change-macro-to-avoid-pedantic-warning.patch
137
138 Avoid hitting -Wextra-semi.
139
140 Imports (rebased):
141 https://github.com/protocolbuffers/protobuf/commit/def602dd07b7eae1cac6823705975317b5607fc3
142
143- 0035-fix-shared-library-constants
144
145 Fixes for component build when building with MediaPipe. AnyMetadata::PackFrom
146 is called which require string constants to be exported.
147
148- 0036-fix-undefined-memcpy-call.patch
149
150 Fixes an undefined call to memcpy which may be passed NULL, 0. NULL, 0 is
151 forbidden in C, due to a mistake in the C language specification. This
152 partially integrates
153 https://github.com/protocolbuffers/protobuf/commit/b2e1d7d8a1b1959c782595cd815c22fb690ac8e2
154 from upstream and may be removed when protobuf is updated past that commit.
155
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