diff --git a/bazel/dependencies.bzl b/bazel/dependencies.bzl index 95efe8ad0..8e0cfe91d 100644 --- a/bazel/dependencies.bzl +++ b/bazel/dependencies.bzl @@ -34,7 +34,7 @@ def proxy_wasm_cpp_host_dependencies(): "wasm32-unknown-unknown", "wasm32-wasi", ], - version = "1.60.0", + version = "1.62.1", ) rust_repository_set( name = "rust_linux_s390x", @@ -43,7 +43,7 @@ def proxy_wasm_cpp_host_dependencies(): "wasm32-unknown-unknown", "wasm32-wasi", ], - version = "1.60.0", + version = "1.62.1", ) zig_register_toolchains( diff --git a/bazel/external/rules_rust.patch b/bazel/external/rules_rust.patch new file mode 100644 index 000000000..67689bec2 --- /dev/null +++ b/bazel/external/rules_rust.patch @@ -0,0 +1,15 @@ +# https://github.com/bazelbuild/rules_rust/pull/1315 + +diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl +index 6cdbefeb..284d4afa 100644 +--- a/rust/private/rustc.bzl ++++ b/rust/private/rustc.bzl +@@ -1024,7 +1024,7 @@ def rustc_compile_action( + ), + ] + +- if crate_info.type in ["staticlib", "cdylib"]: ++ if crate_info.type in ["staticlib", "cdylib"] and not out_binary: + # These rules are not supposed to be depended on by other rust targets, and + # as such they shouldn't provide a CrateInfo. However, one may still want to + # write a rust_test for them, so we provide the CrateInfo wrapped in a provider diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 29fec2483..0732d8886 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -66,10 +66,12 @@ def proxy_wasm_cpp_host_repositories(): maybe( http_archive, name = "rules_rust", - sha256 = "0c57c91a20df12d2b1e5db6c58fd6df21bce0c73940eeafbcb87761c14c28878", - strip_prefix = "rules_rust-0.3.1", + sha256 = "f3d443e9ad1eca99fbcade1c649adbd8200753cf22e47846b3105a43a550273b", + strip_prefix = "rules_rust-0.8.1", # NOTE: Update Rust version in bazel/dependencies.bzl. - url = "https://github.com/bazelbuild/rules_rust/archive/0.3.1.tar.gz", + url = "https://github.com/bazelbuild/rules_rust/archive/0.8.1.tar.gz", + patches = ["@proxy_wasm_cpp_host//bazel/external:rules_rust.patch"], + patch_args = ["-p1"], ) # Core.