Skip to content

Commit f4a0244

Browse files
authored
Update rules_rust to v0.5.0 (with Rust v1.61.0). (#176)
Signed-off-by: Piotr Sikora <[email protected]>
1 parent 94f48b1 commit f4a0244

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

bazel/repositories.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def proxy_wasm_rust_sdk_repositories():
1919
maybe(
2020
http_archive,
2121
name = "rules_rust",
22-
sha256 = "0b890c1030f2943f061007b7b5cba87f1905c67c8829b9a6eb5104d1d05108a8",
23-
strip_prefix = "rules_rust-0.2.1",
24-
url = "https://github.com/bazelbuild/rules_rust/archive/0.2.1.tar.gz",
22+
sha256 = "73580f341f251f2fc633b73cdf74910f4da64d06a44c063cbf5c01b1de753ec1",
23+
url = "https://github.com/bazelbuild/rules_rust/releases/download/0.5.0/rules_rust-v0.5.0.tar.gz",
24+
patches = ["//bazel:rules_rust.patch"],
25+
patch_args = ["-p1"],
2526
)

bazel/rules_rust.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# https://github.com/bazelbuild/rules_rust/pull/1315
2+
3+
diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl
4+
index 6cdbefeb..284d4afa 100644
5+
--- a/rust/private/rustc.bzl
6+
+++ b/rust/private/rustc.bzl
7+
@@ -1024,7 +1024,7 @@ def rustc_compile_action(
8+
),
9+
]
10+
11+
- if crate_info.type in ["staticlib", "cdylib"]:
12+
+ if crate_info.type in ["staticlib", "cdylib"] and not out_binary:
13+
# These rules are not supposed to be depended on by other rust targets, and
14+
# as such they shouldn't provide a CrateInfo. However, one may still want to
15+
# write a rust_test for them, so we provide the CrateInfo wrapped in a provider

0 commit comments

Comments
 (0)