commit | 2c0468366367d7ed97a1f702f9cd7155ab3f73c5 | [log] [tgz] |
---|---|---|
author | Marcel Hlopko <hlopko@bazel.build> | Wed Dec 04 15:44:27 2019 +0100 |
committer | GitHub <noreply@github.com> | Wed Dec 04 15:44:27 2019 +0100 |
tree | ab971886ce727dcb21511cc6d48d40e379fd386f | |
parent | f6c112fa4eb2b8f934feb938a6fce41425e41587 [diff] | |
parent | 4ca513733555346c55e7259fe0c0a36cb20f319d [diff] |
Merge pull request #37 from bazelbuild/philwo-patch-1 Mirror all http_archives.
This repository contains Starlark implementation of Protobuf rules in Bazel.
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 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.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