xx
.md

protoc

protoc is a dependency that provisions an official Protobuf compiler package and puts its executable directory first in PATH. It is not a function and takes no arguments. Use protobuf_generate for built-in code generators.

Load an exact stable release version in canonical x.y or x.y.z form, without a leading v. Versions before 3.0.0 are unsupported because their packages use a different layout. Package availability also varies by host:

xx retains the package's bundled include tree for code generation, validates archive paths and extracted sizes, and verifies the installed compiler's reported version. GitHub release digests are verified when metadata provides one. Older packages published before GitHub added digests rely on the authenticated release metadata, HTTPS transport, exact official URL, and exact byte size.

Example

load("@[email protected]", "protoc")
load("@os@1", "run")

run(("protoc", "--version"), deps=[protoc])