Skip to content

Commit 1b701ef

Browse files
PiotrSikoraknm3000
authored andcommitted
Update rules_rust to v0.8.1 (with Rust v1.62.1). (proxy-wasm#297)
Signed-off-by: Piotr Sikora <[email protected]>
1 parent 49d6a07 commit 1b701ef

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

bazel/dependencies.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def proxy_wasm_cpp_host_dependencies():
3434
"wasm32-unknown-unknown",
3535
"wasm32-wasi",
3636
],
37-
version = "1.60.0",
37+
version = "1.62.1",
3838
)
3939
rust_repository_set(
4040
name = "rust_linux_s390x",
@@ -43,7 +43,7 @@ def proxy_wasm_cpp_host_dependencies():
4343
"wasm32-unknown-unknown",
4444
"wasm32-wasi",
4545
],
46-
version = "1.60.0",
46+
version = "1.62.1",
4747
)
4848

4949
zig_register_toolchains(

bazel/external/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

bazel/repositories.bzl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ def proxy_wasm_cpp_host_repositories():
6666
maybe(
6767
http_archive,
6868
name = "rules_rust",
69-
sha256 = "0c57c91a20df12d2b1e5db6c58fd6df21bce0c73940eeafbcb87761c14c28878",
70-
strip_prefix = "rules_rust-0.3.1",
69+
sha256 = "f3d443e9ad1eca99fbcade1c649adbd8200753cf22e47846b3105a43a550273b",
70+
strip_prefix = "rules_rust-0.8.1",
7171
# NOTE: Update Rust version in bazel/dependencies.bzl.
72-
url = "https://github.com/bazelbuild/rules_rust/archive/0.3.1.tar.gz",
72+
url = "https://github.com/bazelbuild/rules_rust/archive/0.8.1.tar.gz",
73+
patches = ["@proxy_wasm_cpp_host//bazel/external:rules_rust.patch"],
74+
patch_args = ["-p1"],
7375
)
7476

7577
# Core.

0 commit comments

Comments
 (0)