| 1 |
# Protobuf packaging |
| 2 |
|
| 3 |
This directory contains Bazel rules for building packaging and distribution |
| 4 |
artifacts. |
| 5 |
|
| 6 |
*Everything in this directory should be considered internal and subject to |
| 7 |
change.* |
| 8 |
|
| 9 |
## Protocol compiler binary packaging |
| 10 |
|
| 11 |
The protocol compiler is used in binary form in various places. There are rules |
| 12 |
which package it, along with commonly used `.proto` files, for distribution. |
| 13 |
|
| 14 |
## Source distribution packaging |
| 15 |
|
| 16 |
Protobuf releases include source distributions, sliced by target language (C++, |
| 17 |
Java, etc.). There are rules in this package to define those source archives. |
| 18 |
These depend upon `pkg_files` rules elsewhere in the repo to get the contents. |
| 19 |
|
| 20 |
The source distribution files should include the outputs from `autogen.sh`, but |
| 21 |
this isn't something we can reliably do from Bazel. To produce fully functioning |
| 22 |
source distributions, run `autogen.sh` before building the archives (this |
| 23 |
populates the necessary files directly into the source tree). |
| 24 |
|
| 25 |
## C++ runtime binary distribution |
| 26 |
|
| 27 |
The `cc_dist_library` rule creates composite libraries from several other |
| 28 |
`cc_library` targets. Bazel uses a "fine-grained" library model, where each |
| 29 |
`cc_library` produces its own library artifacts, without transitive |
| 30 |
dependencies. The `cc_dist_library` rule combines several other libraries |
| 31 |
together, creating a single library that may be suitable for distribution. |