From cb23a5b7f65ecd0aea395a57059afd63935948bd Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 21 Mar 2024 10:07:41 +0000 Subject: [PATCH] Update rules_rust to v0.40.0 (with Rust v1.76.0) Signed-off-by: Ryan Northey --- .github/workflows/format.yml | 2 +- bazel/dependencies.bzl | 4 ++-- bazel/external/rules_rust.patch | 10 +++++----- bazel/repositories.bzl | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index a09aa7a6..eca7a0e5 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -87,7 +87,7 @@ jobs: - uses: actions/checkout@v2 - name: Install dependencies - run: cargo install cargo-raze --version 0.14.1 + run: cargo install cargo-raze --version 0.16.1 - name: Format (bazel query) run: | diff --git a/bazel/dependencies.bzl b/bazel/dependencies.bzl index b30ea99a..330a2365 100644 --- a/bazel/dependencies.bzl +++ b/bazel/dependencies.bzl @@ -40,7 +40,7 @@ def proxy_wasm_cpp_host_dependencies(): "wasm32-unknown-unknown", "wasm32-wasi", ], - version = "1.68.0", + version = "1.76.0", ) rust_repository_set( name = "rust_linux_s390x", @@ -49,7 +49,7 @@ def proxy_wasm_cpp_host_dependencies(): "wasm32-unknown-unknown", "wasm32-wasi", ], - version = "1.68.0", + version = "1.76.0", ) zig_register_toolchains( diff --git a/bazel/external/rules_rust.patch b/bazel/external/rules_rust.patch index 67689bec..b4c03029 100644 --- a/bazel/external/rules_rust.patch +++ b/bazel/external/rules_rust.patch @@ -1,13 +1,13 @@ # https://github.com/bazelbuild/rules_rust/pull/1315 diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl -index 6cdbefeb..284d4afa 100644 +index e1012230..9dadfd15 100644 --- a/rust/private/rustc.bzl +++ b/rust/private/rustc.bzl -@@ -1024,7 +1024,7 @@ def rustc_compile_action( - ), - ] - +@@ -1481,2 +1481,2 @@ def rustc_compile_action( + }) + crate_info = rust_common.create_crate_info(**crate_info_dict) + - 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 diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 9a011f37..68df4f85 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -74,10 +74,10 @@ def proxy_wasm_cpp_host_repositories(): maybe( http_archive, name = "rules_rust", - sha256 = "e3fe2a255589d128c5e59e407ee57c832533f25ce14cc23605d368cf507ce08d", - strip_prefix = "rules_rust-0.24.1", + sha256 = "1e6e8ea8675bd8e19ecca7996dca75c40b3e75a9ca208cfd12c1ca9a3554a6d8", + strip_prefix = "rules_rust-0.40.0", # NOTE: Update Rust version in bazel/dependencies.bzl. - url = "https://github.com/bazelbuild/rules_rust/archive/0.24.1.tar.gz", + url = "https://github.com/bazelbuild/rules_rust/archive/0.40.0.tar.gz", patches = ["@proxy_wasm_cpp_host//bazel/external:rules_rust.patch"], patch_args = ["-p1"], )