protobuf/pkg
Adam Cozzette 501ececd39 Reorganize upb file structure
This change moves almost everything in the `upb/` directory up one level, so
that for example `upb/upb/generated_code_support.h` becomes just
`upb/generated_code_support.h`. The only exceptions I made to this were that I
left `upb/cmake` and `upb/BUILD` where they are, mostly because that avoids
conflict with other files and the current locations seem reasonable for now.

The `python/` directory is a little bit of a challenge because we had to merge
the existing directory there with `upb/python/`. I made `upb/python/BUILD` into
the BUILD file for the merged directory, and it effectively loads the contents
of the other BUILD file via `python/build_targets.bzl`, but I plan to clean
this up soon.

PiperOrigin-RevId: 568651768
2023-09-26 14:38:35 -07:00
..
test Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-09 09:01:30 -07:00
BUILD.bazel Reorganize upb file structure 2023-09-26 14:38:35 -07:00
README.md Add source distribution packaging rules (#9835) 2022-04-22 16:58:16 -07:00
build_systems.bzl Fix staleness test by avoiding version-specific Bazel behavior 2022-12-27 18:24:15 -08:00
cc_dist_library.bzl Update cc_dist_library() to include transitive sources 2022-11-04 15:12:55 +00:00

README.md

Protobuf packaging

This directory contains Bazel rules for building packaging and distribution artifacts.

Everything in this directory should be considered internal and subject to change.

Protocol compiler binary packaging

The protocol compiler is used in binary form in various places. There are rules which package it, along with commonly used .proto files, for distribution.

Source distribution packaging

Protobuf releases include source distributions, sliced by target language (C++, Java, etc.). There are rules in this package to define those source archives. These depend upon pkg_files rules elsewhere in the repo to get the contents.

The source distribution files should include the outputs from autogen.sh, but this isn't something we can reliably do from Bazel. To produce fully functioning source distributions, run autogen.sh before building the archives (this populates the necessary files directly into the source tree).

C++ runtime binary distribution

The cc_dist_library rule creates composite libraries from several other cc_library targets. Bazel uses a "fine-grained" library model, where each cc_library produces its own library artifacts, without transitive dependencies. The cc_dist_library rule combines several other libraries together, creating a single library that may be suitable for distribution.