Skip to content

Update rules_rust to v0.8.1 (with Rust v1.62.1). #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bazel/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def proxy_wasm_cpp_host_dependencies():
"wasm32-unknown-unknown",
"wasm32-wasi",
],
version = "1.60.0",
version = "1.62.0",
)
rust_repository_set(
name = "rust_linux_s390x",
Expand All @@ -43,7 +43,7 @@ def proxy_wasm_cpp_host_dependencies():
"wasm32-unknown-unknown",
"wasm32-wasi",
],
version = "1.60.0",
version = "1.62.0",
)

zig_register_toolchains(
Expand Down
15 changes: 15 additions & 0 deletions bazel/external/rules_rust.patch
Original file line number Diff line number Diff line change
@@ -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
8 changes: 5 additions & 3 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "437b345d8b9c0e03b955f76f76a58778d0fe3043301bbfee4c9bd205168f65b9",
strip_prefix = "rules_rust-0.7.0",
# 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.7.0.tar.gz",
patches = ["@proxy_wasm_cpp_host//bazel/external:rules_rust.patch"],
patch_args = ["-p1"],
)

# Core.
Expand Down