Skip to content

Commit 4a9be40

Browse files
authored
Merge pull request #18710 from github/redsun82/rules_rust-update
Bazel: update `rules_rust`
2 parents 4bb7559 + eee82f1 commit 4a9be40

File tree

327 files changed

+2077
-1051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+2077
-1051
lines changed

MODULE.bazel

+2-11
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ local_path_override(
1414

1515
# see https://registry.bazel.build/ for a list of available packages
1616

17-
bazel_dep(name = "platforms", version = "0.0.10")
17+
bazel_dep(name = "platforms", version = "0.0.11")
1818
bazel_dep(name = "rules_go", version = "0.50.1")
1919
bazel_dep(name = "rules_pkg", version = "1.0.1")
2020
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
@@ -28,7 +28,7 @@ bazel_dep(name = "rules_kotlin", version = "2.0.0-codeql.1")
2828
bazel_dep(name = "gazelle", version = "0.40.0")
2929
bazel_dep(name = "rules_dotnet", version = "0.17.4")
3030
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
31-
bazel_dep(name = "rules_rust", version = "0.52.2")
31+
bazel_dep(name = "rules_rust", version = "0.57.1")
3232
bazel_dep(name = "zstd", version = "1.5.5.bcr.1")
3333

3434
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
@@ -53,15 +53,6 @@ use_repo(rust, "rust_toolchains")
5353

5454
register_toolchains("@rust_toolchains//:all")
5555

56-
rust_host_tools = use_extension("@rules_rust//rust:extensions.bzl", "rust_host_tools")
57-
58-
# Don't download a second toolchain as host toolchain, make sure this is the same version as above
59-
# The host toolchain is used for vendoring dependencies.
60-
rust_host_tools.host_tools(
61-
edition = RUST_EDITION,
62-
version = RUST_VERSION,
63-
)
64-
6556
# deps for python extractor
6657
# keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh`
6758
py_deps = use_extension("//misc/bazel/3rdparty:py_deps_extension.bzl", "p")

misc/bazel/3rdparty/patch_defs.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import sys
2+
import re
3+
import pathlib
4+
5+
label_re = re.compile(r'"@vendor//:(.+)-([\d.]+)"')
6+
7+
file = pathlib.Path(sys.argv[1])
8+
temp = file.with_suffix(f'{file.suffix}.tmp')
9+
10+
11+
with open(file) as input, open(temp, "w") as output:
12+
for line in input:
13+
line = label_re.sub(lambda m: f'"@vendor__{m[1]}-{m[2]}//:{m[1].replace("-", "_")}"', line)
14+
output.write(line)
15+
16+
temp.rename(file)

misc/bazel/3rdparty/py_deps/BUILD.ahash-0.4.7.bazel

+5-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

misc/bazel/3rdparty/py_deps/BUILD.aho-corasick-0.7.18.bazel

+5-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

misc/bazel/3rdparty/py_deps/BUILD.ansi_term-0.11.0.bazel

+5-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

misc/bazel/3rdparty/py_deps/BUILD.anyhow-1.0.44.bazel

+5-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

misc/bazel/3rdparty/py_deps/BUILD.atty-0.2.14.bazel

+11-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

misc/bazel/3rdparty/py_deps/BUILD.bazel

+54
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)