Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
8f903d5
Revert "Split rustdoc test compilation and execution (#4034)"
dzbarsky Jun 5, 2026
7b6b11a
Remove WORKSPACE support (#4005)
UebelAndre May 1, 2026
8416ca3
feat: Add BPF triple constraint mapping (#3696)
tamird May 1, 2026
1b8a224
Remove unneeded code
dzbarsky May 15, 2026
dc69d0c
Rearrange link paths on Windows to reduce size overruns and fix errors
dzbarsky Jan 20, 2026
32bb0a7
Revert "Fix stamping for rules that don't have a stamp attribute (#38…
dzbarsky Feb 7, 2026
014e9a2
Revert "Switch stamping detection to ctx.configuration.stamp_binaries…
dzbarsky Feb 7, 2026
23986ad
Fix process-wrapper link lib handling when using argfiles
dzbarsky Feb 16, 2026
2addfcc
Rewrite process_wrapper_bootstrap to cc
dzbarsky Feb 18, 2026
561677d
Attempt to fix CopyFile for windows
dzbarsky Feb 18, 2026
eafa82f
Apply lint config in exec configuration (#2)
isaacparker0 Feb 20, 2026
f093e3e
Fix up rules_rust bzl_library targets
dzbarsky Feb 20, 2026
9fd56bb
rust-analyzer: include Bazel package dir in crate source include_dirs…
isaacparker0 Feb 20, 2026
541154e
Improve proc_macro_deps ergonomics
dzbarsky Sep 9, 2025
855fd50
Always use param file for process wrapper
dzbarsky Feb 25, 2026
92da52d
Avoid hashing RustAnalyzerInfo in rust_analyzer alias mapping
dzbarsky Feb 26, 2026
8d47dd9
Convert wrappers to symbolic macros
dzbarsky Feb 26, 2026
3cb43e1
Handle toolchain registration when not registered as a bazel_dep
dzbarsky Feb 28, 2026
36a5e9a
Replace the --rustc-quit-on-rmeta / .rmeta approach with Buck2-style …
walter-zeromatter Feb 26, 2026
f1df2fa
Cleanup some process_wrapper code
dzbarsky Mar 2, 2026
292d235
Fix prost to be compatible with multiplatform
dzbarsky Mar 13, 2026
eb294ef
Improve toolchain make var env expansion
dzbarsky Apr 5, 2026
a5c08fb
Improve rust compilation messages
dzbarsky Apr 9, 2026
7e15d0c
Add rust_test sharding support (#13)
bolinfest Apr 15, 2026
efde3d3
Add per-crate rustc flag trimming
dzbarsky Apr 26, 2026
c4fcc18
Fix Windows GNU staticlib output naming
dzbarsky Apr 26, 2026
106e407
Move processwrapper to rust toolchain
dzbarsky Dec 19, 2025
4bb3afc
Capture process wrapper exit codes
dzbarsky Apr 26, 2026
768e5eb
Provision hermetic SDKROOT
dzbarsky Apr 27, 2026
de6ba55
Internalize macos SDK dep
dzbarsky Apr 30, 2026
8be6e2a
rustdoc_test should not do compilation at test time
dzbarsky May 2, 2026
a6320a1
Fix CcInfo collection through CrateGroupInfo
dzbarsky May 3, 2026
a1a95aa
Expose macOS SDK from llvm module
dzbarsky May 3, 2026
8e158c8
Loongarch64 and sparc support
dzbarsky May 3, 2026
8f7cf60
Avoid vendored crates for rust-analyzer binary
dzbarsky Apr 1, 2026
1a9796d
Don't force passing proc_macro_deps via macro
dzbarsky May 4, 2026
eedab79
Remove cargo build script rundir support
dzbarsky May 5, 2026
66727a0
Shorten cargo build script manifest runfiles paths
dzbarsky May 5, 2026
e36e5c0
Simplify prost/pyo3 setup
dzbarsky May 5, 2026
30a281b
Fix dynamic_runtime_libs support in dylibs
dzbarsky May 5, 2026
2af1118
Separate build script data from compile_data (#21)
michaelm-openai May 8, 2026
49f2afa
Add RUSTC_BOOTSTRAP guardrail for -Zno-codegen pipelining (#19)
walter-zeromatter May 8, 2026
547407a
Add direct_pyi_files and transitive_pyi_files to py_pyo3_library PyIn…
dillydill123 May 9, 2026
c31ddad
Fix tests
dzbarsky May 9, 2026
32d2573
Add CI configs
dzbarsky May 9, 2026
77a74b0
More CI sanitization
dzbarsky May 10, 2026
63f9be8
Windows runtime lib linkage test expectation fixes
dzbarsky May 11, 2026
91a4725
Cleanup tool_path arg to construct_arguments
dzbarsky May 11, 2026
311dfe4
Include tool runfiles in Rust toolchains
dzbarsky May 11, 2026
51ce10e
Generalize captured-output-test-runner
dzbarsky May 12, 2026
d523d06
Expose injectable rustc compile helper
dzbarsky May 12, 2026
f5d9791
Fix oso_prefix
dzbarsky May 14, 2026
5e1bebf
Better wasm-bindgen support
dzbarsky May 16, 2026
71d9180
Bump rules_rs for tests
dzbarsky May 17, 2026
c4bcd66
vscode test workspace CI fixes
dzbarsky May 17, 2026
aa84307
BPF linker support
dzbarsky Jun 5, 2026
12d8d8f
Bootstrap processwrapper should expand SDKROOT
dzbarsky Jun 6, 2026
6883276
Backpressure non-hermetic build script paths
dzbarsky Jun 7, 2026
5628335
Remove cargo build script fallback C++ tools
dzbarsky Jun 7, 2026
4b6d0f1
Do not silently remove $AR when it is libtool
dzbarsky Jun 7, 2026
e0f8a26
Add cc_runtime_linkage attribute for static C++ runtime in shared lib…
walter-zeromatter Jun 10, 2026
da676c7
Only default SDKROOT if cc toolchain doesn't set one
dzbarsky Jun 12, 2026
dc6c6f8
Avoid bazel crash with apple_support toolchain
dzbarsky Jun 13, 2026
d96645f
Better libtool error handling
dzbarsky Jun 13, 2026
b02c525
Add distributed ThinLTO support
dzbarsky Jun 13, 2026
033dcb6
Fix cross-platform Bazel Test failures (#26)
dzbarsky Jun 13, 2026
22468d6
Fix path-mapped action arguments after rebase
dzbarsky Jun 14, 2026
47574cc
Omit unused private LTO arguments
dzbarsky Jun 14, 2026
29fbe9b
Another AR fixup
dzbarsky Jun 15, 2026
1aa4bb6
Improve pdb support when using cc_common.link
dzbarsky Jun 17, 2026
26bb615
Only reject existing non-hermetic build script paths
dzbarsky Jun 17, 2026
12939e1
Check non-hermetic path list components
dzbarsky Jun 17, 2026
ec3b3e1
Test public Starlark dependencies
dzbarsky Jun 17, 2026
98d5ecf
Use target compilation mode for Cargo build scripts (#24)
dzbarsky Jun 22, 2026
ede1c09
Declare apple_support Starlark dependency
dzbarsky Jul 7, 2026
303b3b1
Use rules_cc fission helper
dzbarsky Jul 7, 2026
bdcce7f
Use rules_cc debug context helper
dzbarsky Jul 7, 2026
f57ef7e
Export rust-analyzer library sources
dzbarsky Jul 7, 2026
ad118ca
Include build-script tools in action inputs
dzbarsky Jul 23, 2026
e15b024
Respect --instrumentation_filter for Rust coverage
May 4, 2026
2c5990e
Clarify --instrument_test_targets in coverage docs
May 5, 2026
0105631
Configure rust-analyzer setup runfile paths (#34)
isaacparker0 Aug 1, 2026
fa6cc71
Enable debug info only on nightly.
slackito Jul 31, 2026
be2306e
Fix unsorted-dict-items buildifier warning.
slackito Jul 31, 2026
02fe2a0
Publish commit-addressed rules_rust source archives
dzbarsky Aug 4, 2026
f1a20ed
Prioritize C toolchain library search paths
dzbarsky Aug 13, 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
  •  
  •  
  •  
16 changes: 15 additions & 1 deletion .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ min_rust_version_shell_commands: &min_rust_version_shell_commands
- sed -i 's|^rust\.toolchain(|rust.toolchain(versions = ["1.85.0"],\n|' MODULE.bazel
nightly_flags: &nightly_flags
- "--//rust/toolchain/channel=nightly"
- "--//rust/settings:experimental_compile_rustdoc_tests=True"
nightly_aspects_flags: &nightly_aspects_flags
- "--//rust/toolchain/channel=nightly"
- "--config=rustfmt"
Expand Down Expand Up @@ -87,14 +86,20 @@ split_coverage_postprocessing_shell_commands: &split_coverage_postprocessing_she
- echo "coverage --experimental_fetch_all_coverage_outputs" >> user.bazelrc
- echo "coverage --experimental_split_coverage_postprocessing" >> user.bazelrc
- echo "build --//rust/settings:experimental_use_coverage_metadata_files" >> user.bazelrc
coverage_flags: &coverage_flags
- "--instrumentation_filter=^//"
- "--instrument_test_targets"
rbe_coverage_flags: &rbe_coverage_flags
# https://github.com/bazelbuild/bazel/issues/20578
- "--strategy=CoverageReport=local"
- "--instrumentation_filter=^//"
- "--instrument_test_targets"
tasks:
ubuntu2204:
build_targets: *default_linux_targets
test_targets: *default_linux_targets
coverage_targets: *default_linux_targets
coverage_flags: *coverage_flags
post_shell_commands: *coverage_validation_post_shell_commands
run_targets:
- //test:query_test_binary
Expand All @@ -112,6 +117,7 @@ tasks:
build_targets: *default_macos_targets
test_targets: *default_macos_targets
coverage_targets: *default_macos_targets
coverage_flags: *coverage_flags
post_shell_commands: *coverage_validation_post_shell_commands
windows:
build_targets: *default_windows_targets
Expand All @@ -129,12 +135,14 @@ tasks:
platform: ubuntu2204
shell_commands: *split_coverage_postprocessing_shell_commands
coverage_targets: *default_linux_targets
coverage_flags: *coverage_flags
post_shell_commands: *coverage_validation_post_shell_commands
macos_split_coverage_postprocessing:
name: Split Coverage Postprocessing
platform: macos_arm64
shell_commands: *split_coverage_postprocessing_shell_commands
coverage_targets: *default_macos_targets
coverage_flags: *coverage_flags
post_shell_commands: *coverage_validation_post_shell_commands
ubuntu2204_opt:
name: Opt Mode
Expand Down Expand Up @@ -170,6 +178,7 @@ tasks:
build_targets: *default_linux_targets
test_targets: *default_linux_targets
coverage_targets: *default_linux_targets
coverage_flags: *coverage_flags
post_shell_commands: *coverage_validation_post_shell_commands
rbe_ubuntu2204_with_aspects:
name: With Aspects
Expand Down Expand Up @@ -204,6 +213,7 @@ tasks:
build_targets: *default_macos_targets
test_targets: *default_macos_targets
coverage_targets: *default_macos_targets
coverage_flags: *coverage_flags
post_shell_commands: *coverage_validation_post_shell_commands
macos_rolling_with_aspects:
name: "Macos Rolling Bazel Version With Aspects"
Expand All @@ -212,6 +222,7 @@ tasks:
build_targets: *default_macos_targets
test_targets: *default_macos_targets
coverage_targets: *default_macos_targets
coverage_flags: *coverage_flags
post_shell_commands: *coverage_validation_post_shell_commands
soft_fail: yes
bazel: "rolling"
Expand Down Expand Up @@ -371,7 +382,10 @@ tasks:
build_targets: *default_linux_targets
test_targets: *default_linux_targets
coverage_targets: *default_linux_targets
coverage_flags: *coverage_flags
post_shell_commands: *coverage_validation_post_shell_commands
run_targets:
- //test:build_script_path_mapping_test_binary
linux_docs:
name: Docs
platform: ubuntu2204
Expand Down
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
18 changes: 18 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ build --nobuild_runfile_links

# https://bazel.build/reference/command-line-reference#flag--enable_platform_specific_config
common --enable_platform_specific_config
common:linux --host_platform=//platforms:local_gnu
common:windows --host_platform=//platforms:local_windows_msvc

# Enable the only currently supported report type
# https://bazel.build/reference/command-line-reference#flag--combined_report
Expand Down Expand Up @@ -50,6 +52,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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ examples/sys/complex/3rdparty/crates/** linguist-generated
extensions/bindgen/3rdparty/crates/** linguist-generated
extensions/prost/private/3rdparty/crates/** linguist-generated
extensions/wasm_bindgen/3rdparty/crates/** linguist-generated
test/unpretty/*.unpretty.expanded.rs text eol=lf
tools/rust_analyzer/3rdparty/crates/** linguist-generated
util/import/3rdparty/crates/** linguist-generated
92 changes: 92 additions & 0 deletions .github/workflows/bazel_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
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_base=C:/b' | 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

PLATFORM_ARGS=()
if [[ "${RUNNER_OS}" == "macOS" ]]; then
case "${RUNNER_ARCH}" in
ARM64) MACOS_PLATFORM="@llvm//platforms:macos_aarch64" ;;
X64) MACOS_PLATFORM="@llvm//platforms:macos_x86_64" ;;
*) echo "Unsupported macOS runner architecture: ${RUNNER_ARCH}"; exit 1 ;;
esac
PLATFORM_ARGS+=("--extra_toolchains=@llvm//toolchain:all")
PLATFORM_ARGS+=("--platforms=${MACOS_PLATFORM}")
PLATFORM_ARGS+=("--@rules_cc//cc/toolchains/args/archiver_flags:use_libtool_on_macos=False")
fi

bazel \
--bazelrc="$GITHUB_WORKSPACE/.github/github.bazelrc" \
test \
--config=remote \
"${REMOTE_ARGS[@]}" \
"${PLATFORM_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.

43 changes: 43 additions & 0 deletions .github/workflows/source_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release source archive

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write

concurrency:
group: source-release-${{ github.sha }}
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish source archive
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail

commit="${GITHUB_SHA}"
tag="source-${commit}"
archive="rules_rust-${commit}.tar.gz"

git archive --format=tar --prefix="rules_rust-${commit}/" "${commit}" |
gzip -n > "${archive}"

if gh release view "${tag}" > /dev/null 2>&1; then
echo "Source release ${tag} already exists."
exit 0
fi

gh release create "${tag}" "${archive}" \
--target "${commit}" \
--latest=false \
--title "rules_rust source ${commit}" \
--notes "Source archive for rules_rust commit ${commit}."
Loading
Loading