rules_proto (v4)

December 22, 2025 ยท View on GitHub

build-status Go Reference

Bazel starlark rules for building protocol buffers +/- gRPC :sparkles:.

bazel gazelle protobuf grpc

@build_stack_rules_proto provides:

  1. Rules for driving the protoc tool within a bazel workspace.
  2. A gazelle extension that generates rules based on the content of your .proto files.
  3. Example setups for a variety of languages.

MODULE.bazel

bazel_dep(name = "build_stack_rules_proto", version = "4.x.x")

NOTE: build_stack_rules_proto is still in the submission process to the bcr. Until merged, a git_override or other override is needed to consume this repository.

See https://registry.bazel.build/modules/build_stack_rules_proto for latest version.

NOTE: Version 4.x.x no longer supports WORKSPACE, please use the latest 3.x.x release for workspace compatibility.

Docs

DescriptionLink
Documentation about the core rulesetCORE_RULES.md
Available ToolchainsTOOLCHAINS.md
Guide to setting up the gazelle extensionGAZELLE.md
Writing custom gazelle logicSTARLARK.md
Examplesexample/README.md
Preconfigured pluginsPLUGINS.md
Preconfigured rulesRULES.md
A history of this repositoryHISTORY.md
Developer GuideDEVELOPMENT.md