commit | 86589e0aa9ca70d882cbcd64cf4e19f04e71b9e9 | [log] [tgz] |
---|---|---|
author | martinboehme <mboehme@google.com> | Wed Mar 31 11:32:27 2021 +0200 |
committer | GitHub <noreply@github.com> | Wed Mar 31 11:32:27 2021 +0200 |
tree | bc9b56aa648e3a2205a670c0925b04bd746c0592 | |
parent | c431d21055119cf9c547d39e22042d070c9d2406 [diff] |
Respect `crate_name` attribute when setting CARGO_CRATE_NAME. (#669) As part of this change, I've moved the formerly private `_crate_name` function from rust.bzl to utils.bzl and renamed it to `crate_name_from_attr. I've also had to add a `hasattr(attr, "crate_name")` check to this function because `rustc_compile_action` (which calls through to `_get_rustc_env`) gets called from the implementation of the Rust proto rules, and those don't have a `crate_name` attribute (and it wouldn't make sense to add one either).
This repository provides rules for building Rust projects with Bazel.
Please refer to the full documentation.