Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ build:san-all --//bazel:sanitizer_mode=all
build:san-all --copt=-fsanitize=address,undefined,vptr,function,alignment
build:san-all --linkopt=-fsanitize=address,undefined,vptr,function,alignment

# Use rules_rust's Rust-side allocator_library that defines the
# mangled `__rustc::*` allocator shim symbols (rust_alloc,
# rust_dealloc, etc.). The default cc_allocator_library predates the
# allocator-symbol mangling in rustc 1.87+ and leaves those symbols
# undefined when a Rust staticlib is linked into a cc_binary via
# cc_common.link. See bazelbuild/rules_rust#3459.
build --@rules_rust//rust/settings:experimental_use_allocator_libraries_with_mangled_symbols=True

# LTO mixin: enable LTO for C++ and Rust. Usually mixed in with
# PGO + release, but should work with any.
build:lto --copt -flto=thin
Expand Down
13 changes: 11 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bazel_dep(name = "rules_go", version = "0.59.0")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_python", version = "1.6.0")
bazel_dep(name = "rules_rust", version = "0.60.0")
bazel_dep(name = "rules_rust", version = "0.70.0")
bazel_dep(name = "snappy", version = "1.2.1")
bazel_dep(name = "yaml-cpp", version = "0.8.0")
bazel_dep(name = "zlib", version = "1.3.1.bcr.6")
Expand Down Expand Up @@ -350,7 +350,16 @@ rust.toolchain(
"aarch64-unknown-linux-gnu",
"x86_64-unknown-linux-gnu",
],
versions = ["1.86.0"],
# Prefer our S3 mirror for the rustc tarball (static.rust-lang.org is
# frequently slow from some POPs). Only the `rustc-*` component is
# mirrored; other components (rust-std, cargo, clippy, rustfmt,
# llvm-tools, rust-src) 404 on the mirror and fall through to the
# upstream URL automatically.
urls = [
"https://vectorized-public.s3.us-west-2.amazonaws.com/dependencies/{}.tar.xz",
"https://static.rust-lang.org/dist/{}.tar.xz",
],
versions = ["1.91.0"],
)
Comment on lines 350 to 363
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//bazel/thirdparty:empty_alloc is added as part of the allocator-shim workaround, but this rust.toolchain(...) registration doesn’t reference it (and a repo-wide search finds no references). If the intent is to override the toolchain’s allocator library to prevent double-linking, wire empty_alloc into the toolchain configuration here; otherwise consider removing the unused target/comment.

Copilot uses AI. Check for mistakes.
use_repo(rust, "rust_toolchains")

Expand Down
1,296 changes: 553 additions & 743 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

Loading
Loading