dep-protobuf/pkg
Keith Smiley f08d703292 Add support for bazel 9.x (#26201)
This doesn't flip the default bazel version, but instead makes this repo
compatible with the current version and bazel 9.x. The primary changes
for 9.x support are adding new load statements for things that were
previously built in. This cascaded into a few dep updates to pull in
their missing load statement fixes.

Closes #26201

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/26201 from keith:ks/add-support-for-bazel-9.x e8192d86b3c838f6c88d4a4adfebd07162debc0d
PiperOrigin-RevId: 878654773
2026-03-04 13:59:16 -08:00
..
test bazel: add missing rules_cc loads (#23584) 2025-10-10 17:00:33 -07:00
BUILD.bazel Breaking change: make generator headers private 2026-01-18 19:42:51 -08:00
build_systems.bzl Add support for bazel 9.x (#26201) 2026-03-04 13:59:16 -08:00
cc_dist_library.bzl Automated Code Change 2025-08-26 10:25:14 -07:00
README.md Add source distribution packaging rules (#9835) 2022-04-22 16:58:16 -07:00

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.