Skip to content
Branch: master
Clone or download
mfarrugi #190, #200 :: Migrate to new cc provider. (#209)
* #190, #200 :: Migrate to new cc provider.

* re-replace dep.cc.libs
Latest commit b3cc7e4 Apr 1, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.bazelci
bindgen #190, #200 :: Migrate to new cc provider. (#209) Apr 1, 2019
docs Add rule for bindgen (#102) (#108) Feb 6, 2019
examples Test the examples on Bazel's CI (#193) Feb 12, 2019
proto Use ProtoInfo instead of legacy .proto attr (#211) Apr 1, 2019
rust #190, #200 :: Migrate to new cc provider. (#209) Apr 1, 2019
test
tools/runfiles
util Bump Rust to 1.33.0 (#210) Mar 28, 2019
.gitignore
AUTHORS Move rust rules to their own repository Mar 4, 2016
BUILD
CODEOWNERS
CONTRIBUTING.md
CONTRIBUTORS
LICENSE.txt Move rust rules to their own repository Mar 4, 2016
README.md
WORKSPACE
libc.BUILD Replace usages of `ctx.action` with `ctx.actions.{run, run_shell}` (#151 Nov 9, 2018
renovate.json
workspace.bzl

README.md

Build status

Rust Rules

Overview

This repository provides rules for building Rust projects with Bazel.

Basics

Protobuf

with an overview here.

Setup

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.

External Dependencies

Currently the most common approach to managing external dependencies is using cargo-raze to generate BUILD files for Cargo crates.

Roadmap

  • Improve expressiveness of features and support for Cargo's feature groups.
  • Add cargo_crate workspace rule for pulling crates from Cargo.
You can’t perform that action at this time.