Skip to content

Commit

Permalink
Update rules_rust to v0.40.0 (with Rust v1.76.0)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax committed Mar 21, 2024
1 parent dd3b88e commit cb23a5b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions bazel/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions bazel/external/rules_rust.patch
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
Expand Down

0 comments on commit cb23a5b

Please sign in to comment.