commit | 3212323502e21b819ac4fbdd455cb227ad0f6394 | [log] [tgz] |
---|---|---|
author | Thi Doãn <t@thi.im> | Tue Apr 05 19:12:01 2022 +0900 |
committer | GitHub <noreply@github.com> | Tue Apr 05 12:12:01 2022 +0200 |
tree | 64e9101cc36bf2df8d8fbafe30a4d12e492f6159 | |
parent | b828a0ac3a073f4ea12156b913a4f8be8eff9870 [diff] |
Update protobuf to 3.20.0 (#113) * Update protobuf to 3.20.0 Also add prebuit protoc binaries for Apple silicon. * Fix protoc URLs for macOS arm64
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 following to your WORKSPACE
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_proto", sha256 = "66bfdf8782796239d3875d37e7de19b1d94301e8972b3cbd2446b332429b4df1", strip_prefix = "rules_proto-4.0.0", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz", "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz", ], ) load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") rules_proto_dependencies() rules_proto_toolchains()
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