Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e1116e7
Remove WORKSPACE support (#4005)
UebelAndre May 1, 2026
3ad6e96
feat: Add BPF triple constraint mapping (#3696)
tamird May 1, 2026
6d22e96
Remove unneeded code
dzbarsky May 15, 2026
3e7a026
Rearrange link paths on Windows to reduce size overruns and fix errors
dzbarsky Jan 20, 2026
f3a8d87
Revert "Fix stamping for rules that don't have a stamp attribute (#38…
dzbarsky Feb 7, 2026
06ce7d5
Revert "Switch stamping detection to ctx.configuration.stamp_binaries…
dzbarsky Feb 7, 2026
853e438
Fix process-wrapper link lib handling when using argfiles
dzbarsky Feb 16, 2026
4e40b9c
Rewrite process_wrapper_bootstrap to cc
dzbarsky Feb 18, 2026
40358ef
Attempt to fix CopyFile for windows
dzbarsky Feb 18, 2026
46a1a2e
Apply lint config in exec configuration (#2)
isaacparker0 Feb 20, 2026
371849e
Fix up rules_rust bzl_library targets
dzbarsky Feb 20, 2026
7d9206d
rust-analyzer: include Bazel package dir in crate source include_dirs…
isaacparker0 Feb 20, 2026
063707c
Improve proc_macro_deps ergonomics
dzbarsky Sep 9, 2025
5ed6342
Always use param file for process wrapper
dzbarsky Feb 25, 2026
799fa42
Avoid hashing RustAnalyzerInfo in rust_analyzer alias mapping
dzbarsky Feb 26, 2026
69ffa55
Convert wrappers to symbolic macros
dzbarsky Feb 26, 2026
92962ee
Handle toolchain registration when not registered as a bazel_dep
dzbarsky Feb 28, 2026
de626ce
Replace the --rustc-quit-on-rmeta / .rmeta approach with Buck2-style …
walter-zeromatter Feb 26, 2026
ba5c286
Cleanup some process_wrapper code
dzbarsky Mar 2, 2026
14a7bac
Fix prost to be compatible with multiplatform
dzbarsky Mar 13, 2026
f6331cd
Improve toolchain make var env expansion
dzbarsky Apr 5, 2026
247ef80
Improve rust compilation messages
dzbarsky Apr 9, 2026
21ac9cd
Add rust_test sharding support (#13)
bolinfest Apr 15, 2026
52df776
Add per-crate rustc flag trimming
dzbarsky Apr 26, 2026
9652738
Fix Windows GNU staticlib output naming
dzbarsky Apr 26, 2026
712d03e
Move processwrapper to rust toolchain
dzbarsky Dec 19, 2025
e5f4981
Capture process wrapper exit codes
dzbarsky Apr 26, 2026
fc79ea2
Provision hermetic SDKROOT
dzbarsky Apr 27, 2026
3e83e10
Internalize macos SDK dep
dzbarsky Apr 30, 2026
239dc0c
rustdoc_test should not do compilation at test time
dzbarsky May 2, 2026
3b376a0
Fix CcInfo collection through CrateGroupInfo
dzbarsky May 3, 2026
9bfe460
Expose macOS SDK from llvm module
dzbarsky May 3, 2026
68cf568
Loongarch64 and sparc support
dzbarsky May 3, 2026
8384a28
Avoid vendored crates for rust-analyzer binary
dzbarsky Apr 1, 2026
fa16e55
Don't force passing proc_macro_deps via macro
dzbarsky May 4, 2026
b2f1865
Remove cargo build script rundir support
dzbarsky May 5, 2026
b5961d7
Shorten cargo build script manifest runfiles paths
dzbarsky May 5, 2026
c817dbc
Simplify prost/pyo3 setup
dzbarsky May 5, 2026
7ba2106
Fix dynamic_runtime_libs support in dylibs
dzbarsky May 5, 2026
fa3b364
Separate build script data from compile_data (#21)
michaelm-openai May 8, 2026
29693f0
Add RUSTC_BOOTSTRAP guardrail for -Zno-codegen pipelining (#19)
walter-zeromatter May 8, 2026
fc00bed
Add direct_pyi_files and transitive_pyi_files to py_pyo3_library PyIn…
dillydill123 May 9, 2026
d70663d
Fix tests
dzbarsky May 9, 2026
e7e7faf
Add CI configs
dzbarsky May 9, 2026
614e931
More CI sanitization
dzbarsky May 10, 2026
712fbcb
Windows runtime lib linkage test expectation fixes
dzbarsky May 11, 2026
185c735
Cleanup tool_path arg to construct_arguments
dzbarsky May 11, 2026
730e175
Include tool runfiles in Rust toolchains
dzbarsky May 11, 2026
449dd6e
Generalize captured-output-test-runner
dzbarsky May 12, 2026
6881f70
Expose injectable rustc compile helper
dzbarsky May 12, 2026
626945d
Fix oso_prefix
dzbarsky May 14, 2026
50f00f8
Better wasm-bindgen support
dzbarsky May 16, 2026
4b183a2
Flycheck
isaacparker0 May 18, 2026
aa0def3
Rename flycheck symlink
isaacparker0 May 28, 2026
bc822bf
Clean up
isaacparker0 May 28, 2026
bbe8a7b
Clarify comment
isaacparker0 May 28, 2026
3a823e1
Consolidate into single binary
isaacparker0 May 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@ crate_universe/private/bootstrap
crate_universe/tests/integration
docs
examples
extensions
extensions/bindgen
extensions/mdbook
extensions/prost/private/tests
extensions/pyo3/test
extensions/pyo3/tools
extensions/wasm_bindgen/test
test/integration
16 changes: 16 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ build:unpretty --output_groups=+rust_unpretty
# https://github.com/rust-lang/rust/issues/43364
build:unpretty --config=nightly

# Use a shared repository cache location. GitHub Actions persists this path
# between runs, and it is also a reasonable local default.
common --repository_cache=~/.cache/bazel-repo
common --repo_contents_cache=~/.cache/bazel-repo/contents

# BuildBuddy remote cache / BES settings used by CI via `--config=remote`.
common:remote --bes_backend=grpcs://remote.buildbuddy.io
common:remote --bes_results_url=https://app.buildbuddy.io/invocation/
common:remote --remote_cache=grpcs://remote.buildbuddy.io
common:remote --remote_cache_compression
common:remote --experimental_remote_downloader=grpcs://remote.buildbuddy.io
common:remote --remote_download_outputs=minimal

# Allows tests that shell out to Bazel/Bazelisk to find their cache directory.
test --test_env=XDG_CACHE_HOME

# Disable cc toolchains to test rust targets can be built without one.
build:no_cc_toolchain --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
build:no_cc_toolchain --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/bazel_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Bazel Test

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
merge_group:
workflow_dispatch:
workflow_call:
secrets:
BUILDBUDDY_API_KEY:
required: false

permissions:
contents: read

concurrency:
group: bazel-test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
test:
name: bazel test //... (${{ matrix.platform }})
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- platform: linux
os: ubuntu-latest
- platform: macos
os: macos-latest
- platform: windows
os: windows-latest

steps:
- uses: actions/checkout@v6

- name: Mount Bazel repository cache
uses: actions/cache@v4
with:
path: |
~/.cache/bazel-repo
key: bazel-repo-${{ matrix.platform }}-${{ hashFiles('MODULE.bazel', 'MODULE.bazel.lock', '.bazelrc', '**/*.bzl', '**/BUILD', '**/BUILD.bazel') }}
restore-keys: |
bazel-repo-${{ matrix.platform }}-

- name: Configure Windows Bazel
if: runner.os == 'Windows'
shell: pwsh
run: |
'startup --output_user_root=C:/tmp/bazel' | Out-File -FilePath user.bazelrc -Encoding utf8
'startup --windows_enable_symlinks' | Out-File -FilePath user.bazelrc -Append -Encoding utf8

- name: bazel test //...
shell: bash
env:
USE_BAZEL_VERSION: 9.1.0
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
run: |
REMOTE_ARGS=()
if [[ -n "${BUILDBUDDY_API_KEY:-}" ]]; then
REMOTE_ARGS+=(--remote_header="x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}")
else
echo "BUILDBUDDY_API_KEY is not set; using BuildBuddy remote cache without an auth header."
fi

bazel \
--bazelrc="$GITHUB_WORKSPACE/.github/github.bazelrc" \
test \
--config=remote \
"${REMOTE_ARGS[@]}" \
//...
21 changes: 0 additions & 21 deletions .github/workflows/docs.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/formatting.yaml

This file was deleted.

117 changes: 23 additions & 94 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,34 @@ module(
## Core
###############################################################################

bazel_dep(name = "bazel_lib", version = "3.0.0")
bazel_dep(name = "bazel_features", version = "1.32.0")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "protobuf", version = "28.3", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_cc", version = "0.2.4")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_python", version = "1.6.3")
bazel_dep(name = "rules_shell", version = "0.6.1")
bazel_dep(name = "apple_support", version = "1.24.1")
bazel_dep(name = "llvm", version = "0.7.7")

###############################################################################
## Compatibility
###############################################################################

bazel_dep(name = "rules_rs", version = "0.0.76")

osx = use_extension("@llvm//extensions:osx.bzl", "osx")
use_repo(osx, "macos_sdk")

internal_deps = use_extension("//rust/private:internal_extensions.bzl", "i")
use_repo(
internal_deps,
"rrra",
"rrra__anyhow-1.0.102",
"rrra__camino-1.2.2",
"rrra__clap-4.6.0",
"rrra__env_logger-0.11.10",
"rrra__itertools-0.14.0",
"rrra__log-0.4.29",
"rrra__serde-1.0.228",
"rrra__serde_json-1.0.149",
"rules_rust_tinyjson",
)

cargo_internal_deps = use_extension("//cargo/private:internal_extensions.bzl", "i")
use_repo(
cargo_internal_deps,
"rrc",
"rrc__cargo-util-schemas-0.3.1",
"rrc__cargo_toml-0.22.3",
"rrc__pathdiff-0.1.0",
"rrc__semver-1.0.25",
"rrc__toml-0.8.20",
)

rust = use_extension("//rust:extensions.bzl", "rust")
rust.toolchain(edition = "2021")
use_repo(rust, "rust_toolchains")
Expand All @@ -51,6 +45,15 @@ register_toolchains(
"@rust_toolchains//:all",
)

rules_rs_toolchains = use_extension("@rules_rs//rs/toolchains:module_extension.bzl", "toolchains", dev_dependency = True)
rules_rs_toolchains.toolchain(name = "default_rust_toolchains")
use_repo(rules_rs_toolchains, "default_rust_toolchains")

register_toolchains(
"@default_rust_toolchains//:all",
dev_dependency = True,
)

rust_host_tools = use_extension("//rust:extensions.bzl", "rust_host_tools")
rust_host_tools.host_tools(
name = "rust_host_tools",
Expand All @@ -66,7 +69,6 @@ use_repo(
"buildkite_config",
"generated_inputs_in_external_repo",
"libc",
"rrtd",
"rrtd__anyhow-1.0.100",
"rrtd__blake3-1.8.2",
"rrtd__clap-4.5.50",
Expand All @@ -77,85 +79,12 @@ use_repo(
"rrtd__tracing-0.1.41",
"rrtd__tracing-subscriber-0.3.20",
"rrtd__walkdir-2.5.0",
"rtra",
"rtra__serde-1.0.228",
"rtra__serde_json-1.0.149",
"rtvsc",
"rtvsc__serde-1.0.228",
"rtvsc__serde_json-1.0.149",
"rules_rust_toolchain_test_target_json",
)

bazel_dep(name = "rules_python", version = "1.5.1", dev_dependency = True)
bazel_dep(name = "rules_testing", version = "0.7.0", dev_dependency = True)
bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True)

###############################################################################
## Crate Universe
###############################################################################

crate_universe_internal_deps = use_extension(
"//crate_universe/private:internal_extensions.bzl",
"cu",
)
use_repo(
crate_universe_internal_deps,
"cargo_bazel.buildifier-darwin-amd64",
"cargo_bazel.buildifier-darwin-arm64",
"cargo_bazel.buildifier-linux-amd64",
"cargo_bazel.buildifier-linux-arm64",
"cargo_bazel.buildifier-windows-amd64.exe",
"cui",
"cui__anyhow-1.0.98",
"cui__camino-1.1.9",
"cui__cargo-lock-10.1.0",
"cui__cargo-platform-0.1.9",
"cui__cargo_metadata-0.19.2",
"cui__cargo_toml-0.22.3",
"cui__cfg-expr-0.18.0",
"cui__clap-4.5.37",
"cui__crates-index-3.7.0",
"cui__glob-0.3.2",
"cui__hex-0.4.3",
"cui__indoc-2.0.6",
"cui__itertools-0.14.0",
"cui__maplit-1.0.2",
"cui__normpath-1.3.0",
"cui__once_cell-1.21.3",
"cui__pathdiff-0.2.3",
"cui__regex-1.11.1",
"cui__semver-1.0.26",
"cui__serde-1.0.219",
"cui__serde_json-1.0.140",
"cui__serde_starlark-0.1.17",
"cui__sha2-0.10.8",
"cui__spdx-0.10.8",
"cui__tempfile-3.19.1",
"cui__tera-1.20.0",
"cui__textwrap-0.16.2",
"cui__toml-0.9.5",
"cui__tracing-0.1.41",
"cui__tracing-subscriber-0.3.19",
"cui__url-2.5.4",
"cui__walkdir-2.5.0",
)

crate_universe_internal_non_repro_deps = use_extension(
"//crate_universe/private:internal_extensions.bzl",
"cu_nr",
)
use_repo(
crate_universe_internal_non_repro_deps,
"cargo_bazel_bootstrap",
)

crate_universe_internal_dev_deps = use_extension(
"//crate_universe/private:internal_extensions.bzl",
"cu_dev",
dev_dependency = True,
)
use_repo(
crate_universe_internal_dev_deps,
"cross_rs",
"cross_rs_host_bin",
)
14 changes: 0 additions & 14 deletions cargo/3rdparty/BUILD.bazel

This file was deleted.

Loading
Loading