Skip to content

Commit cb828d1

Browse files
committed
deps: Bump rules_rust to 0.67.0
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent 2f17c73 commit cb828d1

File tree

8 files changed

+109
-237
lines changed

8 files changed

+109
-237
lines changed

.bazelrc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ common:clang-common --action_env=BAZEL_COMPILER=clang
117117
common:clang-common --linkopt=-fuse-ld=lld
118118
common:clang-common --action_env=CC=clang --host_action_env=CC=clang
119119
common:clang-common --action_env=CXX=clang++ --host_action_env=CXX=clang++
120-
common:clang-common --incompatible_enable_cc_toolchain_resolution=false
121120

122121
# Clang with libc++ (default)
123122
common:clang --config=clang-common
@@ -133,15 +132,7 @@ build:gcc --action_env=CC=gcc --action_env=CXX=g++
133132
# option not play well with fission:
134133
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110885
135134
build:gcc --copt=-fno-debug-types-section
136-
# These trigger errors in multiple places both in Envoy dependecies
137-
# and in Envoy code itself when using GCC.
138-
# And in all cases the reports appear to be clear false positives.
139-
build:gcc --copt=-Wno-error=restrict
140135
build:gcc --copt=-Wno-error=uninitialized
141-
build:gcc --cxxopt=-Wno-missing-requires
142-
build:gcc --cxxopt=-Wno-dangling-reference
143-
build:gcc --cxxopt=-Wno-nonnull-compare
144-
build:gcc --incompatible_enable_cc_toolchain_resolution=false
145136
build:gcc --linkopt=-fuse-ld=gold --host_linkopt=-fuse-ld=gold
146137

147138
# libc++ default for clang
@@ -387,7 +378,6 @@ build:sizeopt -c opt --copt -Os
387378

388379
# Remote execution: https://docs.bazel.build/versions/master/remote-execution.html
389380
build:rbe-toolchain --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
390-
build:rbe-toolchain --incompatible_enable_cc_toolchain_resolution=false
391381

392382
build:rbe-toolchain-clang --config=rbe-toolchain
393383
build:rbe-toolchain-clang --config=clang

bazel/repositories.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,12 @@ def _go_deps(skip_targets):
112112
def _rust_deps():
113113
external_http_archive(
114114
"rules_rust",
115-
patches = ["@envoy//bazel:rules_rust.patch", "@envoy//bazel:rules_rust_ppc64le.patch"],
115+
patches = ["@envoy//bazel:rules_rust.patch"],
116116
)
117117

118118
def envoy_dependencies(skip_targets = []):
119+
external_http_archive("platforms")
120+
119121
# Treat Envoy's overall build config as an external repo, so projects that
120122
# build Envoy as a subcomponent can easily override the config.
121123
if "envoy_build_config" not in native.existing_rules().keys():

bazel/repository_locations.bzl

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,25 @@ REPOSITORY_LOCATIONS_SPEC = dict(
15561556
license = "Emscripten SDK",
15571557
license_url = "https://github.com/emscripten-core/emsdk/blob/{version}/LICENSE",
15581558
),
1559+
# NOTE: Required for rules_rust 0.67.0 compatibility with Bazel 7.x.
1560+
# This provides the UEFI platform constraint used by rules_rust.
1561+
# May be removable once Envoy upgrades to Bazel 8.0+ which includes this by default.
1562+
# See: https://github.com/envoyproxy/envoy/pull/41172#issuecomment-2365923085
1563+
platforms = dict(
1564+
project_name = "platforms",
1565+
project_desc = "Constraint values for specifying platforms and toolchains",
1566+
project_url = "https://github.com/bazelbuild/platforms",
1567+
version = "1.0.0",
1568+
sha256 = "852b71bfa15712cec124e4a57179b6bc95d59fdf5052945f5d550e072501a769",
1569+
strip_prefix = "platforms-{version}",
1570+
urls = [
1571+
"https://github.com/bazelbuild/platforms/archive/{version}.tar.gz",
1572+
],
1573+
release_date = "2025-05-27",
1574+
use_category = ["build"],
1575+
license = "Apache-2.0",
1576+
license_url = "https://github.com/bazelbuild/platforms/blob/{version}/LICENSE",
1577+
),
15591578
# After updating you may need to run:
15601579
#
15611580
# CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index
@@ -1564,8 +1583,8 @@ REPOSITORY_LOCATIONS_SPEC = dict(
15641583
project_name = "Bazel rust rules",
15651584
project_desc = "Bazel rust rules (used by Wasm)",
15661585
project_url = "https://github.com/bazelbuild/rules_rust",
1567-
version = "0.56.0",
1568-
sha256 = "f1306aac0b258b790df01ad9abc6abb0df0b65416c74b4ef27f4aab298780a64",
1586+
version = "0.67.0",
1587+
sha256 = "dc287e3eca80b29d5cc95e261cae273eedf1af4a00a96ae937e234534dadb24c",
15691588
# Note: rules_rust should point to the releases, not archive to avoid the hassle of bootstrapping in crate_universe.
15701589
# This is described in https://bazelbuild.github.io/rules_rust/crate_universe.html#setup, otherwise bootstrap
15711590
# is required which in turn requires a system CC toolchains, not the bazel controlled ones.
@@ -1576,7 +1595,7 @@ REPOSITORY_LOCATIONS_SPEC = dict(
15761595
"dataplane_ext",
15771596
],
15781597
extensions = ["envoy.wasm.runtime.wasmtime"],
1579-
release_date = "2024-12-16",
1598+
release_date = "2025-10-23",
15801599
cpe = "N/A",
15811600
license = "Apache-2.0",
15821601
license_url = "https://github.com/bazelbuild/rules_rust/blob/{version}/LICENSE.txt",

bazel/rules_rust.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
--- rust/private/rustc.bzl
22
+++ rust/private/rustc.bzl
3-
@@ -1451,7 +1451,7 @@ def rustc_compile_action(
4-
})
5-
crate_info = rust_common.create_crate_info(**crate_info_dict)
3+
@@ -1612,7 +1612,7 @@ def rustc_compile_action(
4+
**crate_info_dict
5+
)
66

77
- if crate_info.type in ["staticlib", "cdylib"]:
88
+ if crate_info.type in ["staticlib", "cdylib"] and not out_binary:
@@ -12,7 +12,7 @@
1212

1313
--- rust/private/rustc.bzl
1414
+++ rust/private/rustc.bzl
15-
@@ -1043,7 +1043,7 @@ def construct_arguments(
15+
@@ -1061,7 +1061,7 @@ def construct_arguments(
1616

1717
if toolchain.llvm_cov and ctx.configuration.coverage_enabled:
1818
# https://doc.rust-lang.org/rustc/instrument-coverage.html

bazel/rules_rust_ppc64le.patch

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)