44
55# TODO: this needs to be paired with a refreshed patch
66# (see WORKSPACE.bzlmod)
7- bazel_dep (name = "rules_rust" , version = "0.63.0" )
8-
9- bazel_dep (name = "rules_cc" , version = "0.2.0" )
10- bazel_dep (name = "rules_shell" , version = "0.5.1" )
11-
7+ bazel_dep (name = "rules_rust" , version = "0.68.1" )
8+ bazel_dep (name = "rules_cc" , version = "0.2.8" )
9+ bazel_dep (name = "rules_shell" , version = "0.6.1" )
1210bazel_dep (name = "abseil-cpp" , version = "20250127.1" )
13- git_override ( # with nullability support
11+ git_override (
12+ # with nullability support
1413 module_name = "abseil-cpp" ,
1514 commit = "e3a2008867c5dc5c0f4c7a4e64fb568df70f23be" ,
1615 remote = "https://github.com/abseil/abseil-cpp" ,
1716)
1817
19- bazel_dep (name = "bazel_skylib" , version = "1.8.1 " )
18+ bazel_dep (name = "bazel_skylib" , version = "1.8.2 " )
2019bazel_dep (name = "fuzztest" , version = "20250214.0" )
2120bazel_dep (name = "google_benchmark" , version = "1.9.1" )
2221bazel_dep (name = "googletest" , version = "1.17.0" )
23- bazel_dep (name = "platforms" , version = "0 .0.11 " )
24- bazel_dep (name = "protobuf" , version = "31 .1" )
22+ bazel_dep (name = "platforms" , version = "1 .0.0 " )
23+ bazel_dep (name = "protobuf" , version = "33 .1" )
2524bazel_dep (name = "re2" , version = "2024-07-02.bcr.1" )
2625bazel_dep (name = "rules_license" , version = "1.0.0" )
2726bazel_dep (name = "rules_proto" , version = "7.1.0" )
28- bazel_dep (name = "rules_python" , version = "1.5.3" )
27+ bazel_dep (name = "rules_python" , version = "1.6.0" )
28+
29+ # TODO: Update this to 1.6.0 once bug in bazel 8.5.0rc1 is fixed.
30+ bazel_dep (name = "toolchains_llvm" , version = "1.5.0" )
31+
2932# We don't directly use rules_foreign_cc, but *something* does, and depends on an
3033# out of date version that doesn't work with newer Bazel releases. So here we force
3134# it to be a newer version.
3235bazel_dep (name = "rules_foreign_cc" , version = "0.15.0" )
3336
34- crate = use_extension ("@rules_rust//crate_universe:extensions.bzl" , "crate" )
37+ rust = use_extension ("@rules_rust//rust:extensions.bzl" , "rust" )
38+ rust .toolchain (
39+ allocator_library = "@rules_rust//ffi/rs:empty" ,
40+ dev_components = True ,
41+ edition = "2021" ,
42+ versions = ["nightly/2025-11-20" ],
43+ )
3544
45+ crate = use_extension ("@rules_rust//crate_universe:extensions.bzl" , "crate" )
3646crate .from_cargo (
37- name = "crate_index" ,
38- manifests = [
39- "//:Cargo.toml" ,
40- "//:cargo/cc_bindings_from_rs/cc_bindings_from_rs/Cargo.toml" ,
41- "//:cargo/rs_bindings_from_cc/rs_bindings_from_cc/Cargo.toml" ,
42- "//support/ffi_11:Cargo.toml" ,
43- ],
47+ name = "crate_index" ,
48+ manifests = [
49+ "//:Cargo.toml" ,
50+ ],
4451)
52+ use_repo (crate , "crate_index" )
53+
54+ llvm = use_extension ("@toolchains_llvm//toolchain/extensions:llvm.bzl" , "llvm" )
4555
46- use_repo (crate , "crate_index" )
56+ # We install this toolchain to provide access to clang-format, but it also becomes our cc_toolchain.
57+ # Being our cc_toolchain means we need this to be a version of LLVM that's compatible with our Rust
58+ # toolchain, so we pin to a specific version from github (rather than rely on the versions provided
59+ # by default in the rules).
60+ llvm .toolchain (
61+ extra_llvm_distributions = {
62+ "clang+llvm-21.1.8-x86_64-pc-windows-msvc.tar.xz" : "749d22f565fcd5718dbed06512572d0e5353b502c03fe1f7f17ee8b8aca21a47" ,
63+ "LLVM-21.1.8-Linux-ARM64.tar.xz" : "65ce0b329514e5643407db2d02a5bd34bf33d159055dafa82825c8385bd01993" ,
64+ "LLVM-21.1.8-Linux-X64.tar.xz" : "b3b7f2801d15d50736acea3c73982994d025b01c2f035b91ae3b49d1b575732b" ,
65+ "LLVM-21.1.8-macOS-ARM64.tar.xz" : "b95bdd32a33a81ee4d40363aaeb26728a26783fcef26a4d80f65457433ea4669" ,
66+ },
67+ llvm_version = "21.1.8" ,
68+ )
69+ use_repo (llvm , "llvm_toolchain" )
70+
71+ register_toolchains (
72+ "@llvm_toolchain//:all" ,
73+ "//common/bazel_support/toolchains:cc_bindings_from_rs_on_demand_linux" ,
74+ "//common/bazel_support/toolchains:cc_bindings_from_rs_on_demand_macos" ,
75+ "//common/bazel_support/toolchains:cc_bindings_from_rs_on_demand_ios" ,
76+ )
0 commit comments