commit | 05bd7d1d1bd34225a6614fc131267181aee2b61e | [log] [tgz] |
---|---|---|
author | lberki <lberki@users.noreply.github.com> | Mon Aug 12 10:24:23 2019 +0200 |
committer | Yun Peng <pcloudy@google.com> | Mon Aug 12 10:24:23 2019 +0200 |
tree | 38d13d29cfb66cfd4c0927a9df9c0f3f8205942a | |
parent | 7caeda2a863cebf1bc9b494fce6d27942a2d5ede [diff] |
Make rust_proto_library not require the proto_library.proto_source_root attribute. (#246) It's going away in Bazel 1.0. Unfortunately, I can't just remove the code to support it so that rules_rust supports Bazel versions that still have it.
This repository provides rules for building Rust projects with Bazel.
with an overview here.
To use the Rust rules, add the following to your WORKSPACE
file to add the external repositories for the Rust toolchain:
http_archive( name = "io_bazel_rules_rust", sha256 = "c82118824b2448b77146f1dae97b6eaa717babedad0822aca4879f3cbbf2b7b5", strip_prefix = "rules_rust-3228ccd3814c2ad0d7307d2f87fb8ff9616149d7", urls = [ # Master branch as of 2018-12-11 "https://github.com/bazelbuild/rules_rust/archive/3228ccd3814c2ad0d7307d2f87fb8ff9616149d7.tar.gz", ], ) http_archive( name = "bazel_skylib", sha256 = "eb5c57e4c12e68c0c20bc774bfbc60a568e800d025557bc4ea022c6479acc867", strip_prefix = "bazel-skylib-0.6.0", url = "https://github.com/bazelbuild/bazel-skylib/archive/0.6.0.tar.gz", ) load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories") rust_repositories() load("@io_bazel_rules_rust//:workspace.bzl", "bazel_version") bazel_version(name = "bazel_version")
The rules are under active development, as such the lastest commit on the master branch should be used. master
currently requires Bazel >= 0.17.0.
Currently the most common approach to managing external dependencies is using cargo-raze to generate BUILD
files for Cargo crates.
cargo_crate
workspace rule for pulling crates from Cargo.