From a33096e04ead153c86c6a48d69698cf63a3ef370 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Mon, 23 Feb 2026 15:52:14 +0000 Subject: [PATCH 1/2] update default rust versions --- rust/private/common.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/private/common.bzl b/rust/private/common.bzl index 207a70704d..6f1b642626 100644 --- a/rust/private/common.bzl +++ b/rust/private/common.bzl @@ -31,9 +31,9 @@ load(":providers.bzl", "CrateGroupInfo", "CrateInfo", "DepInfo", "DepVariantInfo # # Note: Code in `.github/workflows/crate_universe.yaml` looks for this line, if # you remove it or change its format, you will also need to update that code. -DEFAULT_RUST_VERSION = "1.86.0" +DEFAULT_RUST_VERSION = "1.93.1" -DEFAULT_NIGHTLY_ISO_DATE = "2025-04-03" +DEFAULT_NIGHTLY_ISO_DATE = "2026-02-12" def _create_crate_info(**kwargs): """A constructor for a `CrateInfo` provider From cfe2a1d8ae868b5b0c1a8b2d8319fa29a0cacda0 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Tue, 24 Feb 2026 10:26:40 +0000 Subject: [PATCH 2/2] rust settings: flip experimental_use_allocator_libraries_with_mangled_symbols New versions of rustc don't work without this. --- rust/settings/settings.bzl | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/rust/settings/settings.bzl b/rust/settings/settings.bzl index da44833b5e..257caa547f 100644 --- a/rust/settings/settings.bzl +++ b/rust/settings/settings.bzl @@ -193,7 +193,6 @@ def experimental_use_allocator_libraries_with_mangled_symbols(name): used as a dependency of a rust_binary, or when the experimental_use_cc_common_link setting is used. - For older versions of rustc, the allocator symbol definitions can be provided via the `rust_toolchain`'s `allocator_library` or `global_allocator_library` attributes, with sample targets like `@rules_rust//ffi/cc/allocator_library` @@ -201,10 +200,11 @@ def experimental_use_allocator_libraries_with_mangled_symbols(name): Recent versions of rustc started mangling these allocator symbols (https://github.com/rust-lang/rust/pull/127173). The mangling uses a scheme that is specific to the exact version of the compiler. - This makes the cc allocator library definitions ineffective. To work around - this, we provide rust versions of the symbol definitions annotated with - an unstable language attribute that instructs rustc to mangle them consistently. - Because of that, this is only compatible with nightly versions of the compiler. + This makes the cc allocator library definitions ineffective. + + When rustc builds a staticlib it provides the mapping definitions. + We rely on this and build an empty staticlib as a basis for the allocator + definitions. Since the new symbol definitions are written in rust, we cannot just attach them as attributes on the `rust_toolchain` as the old cc versions, as that @@ -221,12 +221,10 @@ def experimental_use_allocator_libraries_with_mangled_symbols(name): the result of building the rust allocator libraries via a provider, which can be consumed by the rust build actions. We attach an instance of this as a common attribute to the rust rule set. - - TODO: how this interacts with stdlibs """ bool_flag( name = name, - build_setting_default = False, + build_setting_default = True, ) native.config_setting(