commit | bb745f946a0b033dc50b7671bea10c9395e53e4d | [log] [tgz] |
---|---|---|
author | A Googler <no-reply@google.com> | Mon Sep 18 13:03:47 2023 -0700 |
committer | Blaze Rules Copybara <blaze-rules@google.com> | Mon Sep 18 13:05:49 2023 -0700 |
tree | 1e79d87d68e1e04e222a629eb3c898f5a6fcf26e | |
parent | 7537ac6fab259134caaa1501d752271f502a28cd [diff] |
Create proto_toolchain rule and macro The proto_toolchain rule serves to define what protoc is used and to generate descriptor sets by proto_library. This is a stripped down version of proto_lang_toolchain. It's not possible to set plugins or runtime libraries on it. Steps in migration: - this and other changes to proto_lang_toolchain - release rules_proto, rules_java, rules_cc, rules_python - use new version and define toolchains in protobuf repo Issue: https://github.com/bazelbuild/rules_proto/issues/179 PiperOrigin-RevId: 566390506
This repository contains Starlark implementation of Protobuf rules in Bazel.
For a high-level overview of using Protocol Buffers and gRPC with Bazel, see https://bazel-contrib.github.io/SIG-rules-authors/proto-grpc.html.
For the list of Proto rules, see the Bazel documentation.
To get started with rules_proto
, add the WORKSPACE
file snippet from the latest release.
Then, in your BUILD
files, import and use the rules:
load("@rules_proto//proto:defs.bzl", "proto_library") proto_library( ... )
If you're migrating from the native proto rules to rules_proto
, you can use the following buildifier command to automate the changes to your BUILD
and .bzl
files:
buildifier --lint=fix --warnings=native-proto <path/to/BUILD>
Bazel and rules_proto
are the work of many contributors. We appreciate your help!
To contribute, please read the contribution guidelines: CONTRIBUTING.md.
Note that the rules_proto
use the GitHub issue tracker for bug reports and feature requests only.
For asking questions see:
#proto
on slack.bazel.build