From 6782c8500d3f4ac86961dfd7b472895c44675814 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Thu, 15 Oct 2020 17:59:09 -0700 Subject: [PATCH] build: update rules_rust to allow Rustc in RBE (#13595) Signed-off-by: Lizan Zhou Signed-off-by: Piotr Sikora --- .bazelrc | 2 -- bazel/repository_locations.bzl | 8 ++++---- bazel/wasm/wasm.bzl | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.bazelrc b/.bazelrc index 53940f9526cb..19d36e85dcd6 100644 --- a/.bazelrc +++ b/.bazelrc @@ -192,8 +192,6 @@ build:remote --spawn_strategy=remote,sandboxed,local build:remote --strategy=Javac=remote,sandboxed,local build:remote --strategy=Closure=remote,sandboxed,local build:remote --strategy=Genrule=remote,sandboxed,local -# rules_rust is not remote runnable (yet) -build:remote --strategy=Rustc=sandboxed,local build:remote --remote_timeout=7200 build:remote --auth_enabled=true build:remote --remote_download_toplevel diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index d95b881f4112..de598a8aa2d6 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -904,14 +904,14 @@ DEPENDENCY_REPOSITORIES_SPEC = dict( project_name = "Bazel rust rules", project_desc = "Bazel rust rules (used by Wasm)", project_url = "https://github.com/bazelbuild/rules_rust", - version = "fda9a1ce6482973adfda022cadbfa6b300e269c3", - sha256 = "484a2b2b67cd2d1fa1054876de7f8d291c4b203fd256bc8cbea14d749bb864ce", + version = "fb90a7484800157fbb8a5904fbeb608dc1effc0c", + sha256 = "cbb253b8c5ab1a3c1787790f900e7d6774e95ba038714fc0f710935e62f30f5f", # Last commit where "out_binary = True" works. # See: https://github.com/bazelbuild/rules_rust/issues/386 strip_prefix = "rules_rust-{version}", urls = ["https://github.com/bazelbuild/rules_rust/archive/{version}.tar.gz"], - use_category = ["build"], - last_updated = "2020-07-29", + use_category = ["test_only"], + last_updated = "2020-10-15", ), rules_antlr = dict( project_name = "ANTLR Rules for Bazel", diff --git a/bazel/wasm/wasm.bzl b/bazel/wasm/wasm.bzl index 0e7a84da2e75..5a20b46837a1 100644 --- a/bazel/wasm/wasm.bzl +++ b/bazel/wasm/wasm.bzl @@ -115,7 +115,7 @@ def envoy_wasm_cc_binary(name, tags = [], **kwargs): wasm_cc_binary(name, tags, repository = "@envoy", **kwargs) def wasm_rust_binary(name, tags = [], **kwargs): - wasm_name = "_wasm_" + (name if not ".wasm" in name else name.strip(".wasm")) + wasm_name = "_wasm_" + name.replace(".", "_") kwargs.setdefault("visibility", ["//visibility:public"]) rust_binary(