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