Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
66f1701
Revert "Split rustdoc test compilation and execution (#4034)"
dzbarsky Jun 5, 2026
4d034c0
Remove WORKSPACE support (#4005)
UebelAndre May 1, 2026
89788c6
feat: Add BPF triple constraint mapping (#3696)
tamird May 1, 2026
07ff81d
Remove unneeded code
dzbarsky May 15, 2026
15fd03d
Rearrange link paths on Windows to reduce size overruns and fix errors
dzbarsky Jan 20, 2026
1b0c342
Revert "Fix stamping for rules that don't have a stamp attribute (#38…
dzbarsky Feb 7, 2026
66c8697
Revert "Switch stamping detection to ctx.configuration.stamp_binaries…
dzbarsky Feb 7, 2026
b2eecc6
Fix process-wrapper link lib handling when using argfiles
dzbarsky Feb 16, 2026
e06ec0a
Rewrite process_wrapper_bootstrap to cc
dzbarsky Feb 18, 2026
67d29de
Attempt to fix CopyFile for windows
dzbarsky Feb 18, 2026
98c8519
Apply lint config in exec configuration (#2)
isaacparker0 Feb 20, 2026
f4ac278
Fix up rules_rust bzl_library targets
dzbarsky Feb 20, 2026
48f01ee
rust-analyzer: include Bazel package dir in crate source include_dirs…
isaacparker0 Feb 20, 2026
0b645f6
Improve proc_macro_deps ergonomics
dzbarsky Sep 9, 2025
81f3cfd
Always use param file for process wrapper
dzbarsky Feb 25, 2026
09a6174
Avoid hashing RustAnalyzerInfo in rust_analyzer alias mapping
dzbarsky Feb 26, 2026
1fc96dd
Convert wrappers to symbolic macros
dzbarsky Feb 26, 2026
5fd55c4
Handle toolchain registration when not registered as a bazel_dep
dzbarsky Feb 28, 2026
91ba217
Replace the --rustc-quit-on-rmeta / .rmeta approach with Buck2-style …
walter-zeromatter Feb 26, 2026
45ff250
Cleanup some process_wrapper code
dzbarsky Mar 2, 2026
216ec5e
Fix prost to be compatible with multiplatform
dzbarsky Mar 13, 2026
6a130ec
Improve toolchain make var env expansion
dzbarsky Apr 5, 2026
9d48393
Improve rust compilation messages
dzbarsky Apr 9, 2026
b3472b7
Add rust_test sharding support (#13)
bolinfest Apr 15, 2026
f16ccac
Add per-crate rustc flag trimming
dzbarsky Apr 26, 2026
1778fbb
Fix Windows GNU staticlib output naming
dzbarsky Apr 26, 2026
01ec5f5
Move processwrapper to rust toolchain
dzbarsky Dec 19, 2025
a1ac9fc
Capture process wrapper exit codes
dzbarsky Apr 26, 2026
9d1b186
Provision hermetic SDKROOT
dzbarsky Apr 27, 2026
d9db5a9
Internalize macos SDK dep
dzbarsky Apr 30, 2026
37ee557
rustdoc_test should not do compilation at test time
dzbarsky May 2, 2026
0486de2
Fix CcInfo collection through CrateGroupInfo
dzbarsky May 3, 2026
5d4f553
Expose macOS SDK from llvm module
dzbarsky May 3, 2026
107f334
Loongarch64 and sparc support
dzbarsky May 3, 2026
f45c2ea
Avoid vendored crates for rust-analyzer binary
dzbarsky Apr 1, 2026
906e806
Don't force passing proc_macro_deps via macro
dzbarsky May 4, 2026
b31990f
Remove cargo build script rundir support
dzbarsky May 5, 2026
0643eea
Shorten cargo build script manifest runfiles paths
dzbarsky May 5, 2026
453b832
Simplify prost/pyo3 setup
dzbarsky May 5, 2026
30c452b
Fix dynamic_runtime_libs support in dylibs
dzbarsky May 5, 2026
e4c14d6
Separate build script data from compile_data (#21)
michaelm-openai May 8, 2026
dcad0c1
Add RUSTC_BOOTSTRAP guardrail for -Zno-codegen pipelining (#19)
walter-zeromatter May 8, 2026
6bbdd1f
Add direct_pyi_files and transitive_pyi_files to py_pyo3_library PyIn…
dillydill123 May 9, 2026
1dc7757
Fix tests
dzbarsky May 9, 2026
be53d14
Add CI configs
dzbarsky May 9, 2026
3737a16
More CI sanitization
dzbarsky May 10, 2026
3055ae8
Windows runtime lib linkage test expectation fixes
dzbarsky May 11, 2026
d9c92ea
Cleanup tool_path arg to construct_arguments
dzbarsky May 11, 2026
c45b312
Include tool runfiles in Rust toolchains
dzbarsky May 11, 2026
2a008ac
Generalize captured-output-test-runner
dzbarsky May 12, 2026
f98703f
Expose injectable rustc compile helper
dzbarsky May 12, 2026
b1de177
Fix oso_prefix
dzbarsky May 14, 2026
1f815d7
Better wasm-bindgen support
dzbarsky May 16, 2026
4f6fd98
Bump rules_rs for tests
dzbarsky May 17, 2026
98ddb6d
vscode test workspace CI fixes
dzbarsky May 17, 2026
7640b2e
BPF linker support
dzbarsky Jun 5, 2026
afdbbe6
Bootstrap processwrapper should expand SDKROOT
dzbarsky Jun 6, 2026
9bcbab6
Backpressure non-hermetic build script paths
dzbarsky Jun 7, 2026
dbae2b2
Remove cargo build script fallback C++ tools
dzbarsky Jun 7, 2026
6c2dcfa
Do not silently remove $AR when it is libtool
dzbarsky Jun 7, 2026
b1eab50
Add cc_runtime_linkage attribute for static C++ runtime in shared lib…
walter-zeromatter Jun 10, 2026
9c4de2a
Only default SDKROOT if cc toolchain doesn't set one
dzbarsky Jun 12, 2026
8c4812f
Avoid bazel crash with apple_support toolchain
dzbarsky Jun 13, 2026
4f7a3cb
Better libtool error handling
dzbarsky Jun 13, 2026
49c11e3
Add distributed ThinLTO support
dzbarsky Jun 13, 2026
fd0f135
Fix cross-platform Bazel Test failures (#26)
dzbarsky Jun 13, 2026
36f76c2
Fix path-mapped action arguments after rebase
dzbarsky Jun 14, 2026
8970e5d
Omit unused private LTO arguments
dzbarsky Jun 14, 2026
e934b97
Another AR fixup
dzbarsky Jun 15, 2026
f4256ba
Improve pdb support when using cc_common.link
dzbarsky Jun 17, 2026
2f9261d
Only reject existing non-hermetic build script paths
dzbarsky Jun 17, 2026
57a400a
Check non-hermetic path list components
dzbarsky Jun 17, 2026
b5e074f
Test public Starlark dependencies
dzbarsky Jun 17, 2026
d72934b
Use target compilation mode for Cargo build scripts (#24)
dzbarsky Jun 22, 2026
0c017a5
Declare apple_support Starlark dependency
dzbarsky Jul 7, 2026
a1f2ec1
Use rules_cc fission helper
dzbarsky Jul 7, 2026
deafa4a
Use rules_cc debug context helper
dzbarsky Jul 7, 2026
1a644f0
Export rust-analyzer library sources
dzbarsky Jul 7, 2026
ba57524
Include build-script tools in action inputs
dzbarsky Jul 23, 2026
24540d9
Configure rust-analyzer setup runfile paths (#34)
isaacparker0 Aug 1, 2026
bd91ef5
Publish commit-addressed rules_rust source archives
dzbarsky Aug 4, 2026
69dee27
Reject embedded sandbox paths in Rust compiler outputs (#36)
dzbarsky Aug 6, 2026
25c5a80
rustc: stage cc dynamic libraries in test runfiles (#37)
walter-zeromatter Aug 12, 2026
f3a5e92
Preserve fork behavior after rebasing onto rules_rust 0.73.0
dzbarsky Aug 14, 2026
424372f
Preserve repository-independent constraints and remap native build paths
dzbarsky Aug 15, 2026
993551f
Add hermetic macOS SDKROOT setting (#42)
dzbarsky Aug 17, 2026
93bf344
Narrow C++ toolchain inputs for Rust compilation (#43)
finn-ball Aug 18, 2026
ee4bda0
Fix Flycheck source labels for package-relative filenames
dzbarsky Aug 25, 2026
046fcc3
Make crate dependency search paths path-mappable (#44)
finn-ball Aug 28, 2026
2e31881
fix: Mitigate the -L dependency= consolidation races on Windows (#48)
Sep 1, 2026
cb4caef
fix: preserve fork behavior after rules_rust 0.74.0 rebase
dzbarsky Sep 1, 2026
497bf23
fix: restrict dlltool handling to Windows GNU
dzbarsky Sep 1, 2026
87de00e
fix: defer C++ linker arguments for path mapping (#50)
dzbarsky Sep 5, 2026
e9d4385
fix: enable Rust allocator libraries by default (#51)
dzbarsky Sep 5, 2026
ba1bd10
Test shared ThinLTO backends for static C++ consumers (#52)
dzbarsky Sep 5, 2026
a88b370
fix: remap bootstrap source paths in rustc (#53)
dzbarsky Sep 5, 2026
51d3f35
fix: remap assembler debug paths in Cargo build scripts (#54)
titusfortner Sep 8, 2026
13619b7
Precompute build-script flag metadata (#56)
zbarsky-openai Sep 8, 2026
c5cc09e
Store Rust linker configuration in a provider (#61)
dzbarsky Sep 15, 2026
722cd56
Avoid metadata output conflicts for binaries and tests (#65)
dzbarsky Sep 21, 2026
98daef6
Pass user C/C++ flags to Cargo build scripts (#64)
dzbarsky Sep 21, 2026
f537331
Honor skip_expanding_rustc_env for metadata actions (#63)
dzbarsky Sep 21, 2026
8ab81ba
Avoid linkstamp scans for nonlinking Rust crates and Clippy (#67)
dzbarsky Sep 21, 2026
fd521ef
Restrict rust-analyzer aspect to advertised Rust providers
dzbarsky Sep 23, 2026
93e2877
Skip location expansion for literal rust-analyzer environment values …
dzbarsky Oct 2, 2026
cd0bd6e
Allow cc_shared_library to traverse Rust linker input owners (#75)
dzbarsky Oct 2, 2026
b53494d
Defer native linker input expansion to Args (#74)
dzbarsky Oct 2, 2026
2b76924
Reuse native linker inputs when disambiguating libraries (#73)
dzbarsky Oct 2, 2026
cbebe6d
Scope extra_rustc_flag to target configurations (#72)
dzbarsky Oct 2, 2026
3eb80ee
Pass the free-threaded Python ABI to PyO3 (#77)
dzbarsky Oct 2, 2026
3286fff
Preserve File identity when disambiguating native libraries (#71)
dzbarsky Oct 2, 2026
fb61087
Allow crates to override the Clippy configuration (#70)
dzbarsky Oct 2, 2026
e51ad65
fix: Mitigate the -L dependency= consolidation races on Windows under…
Oct 5, 2026
628dc24
fix: use the toolchain repository as the rustc sysroot to shorten Win…
titusfortner Sep 9, 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
  •  
  •  
  •  
3 changes: 2 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 @@ -385,6 +384,8 @@ tasks:
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[@]}" \
//...
1 change: 1 addition & 0 deletions .github/workflows/cargo_bazel_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ defaults:

jobs:
validation:
if: github.repository == 'bazelbuild/rules_rust'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down
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.

1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
description: Override the ref to read .bcr templates from
jobs:
publish:
if: github.repository == 'bazelbuild/rules_rust'
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.4.1
with:
author_name: bazel-io
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ env:

jobs:
validation:
if: github.repository == 'bazelbuild/rules_rust'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/runfiles_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ defaults:

jobs:
validation:
if: github.repository == 'bazelbuild/rules_rust'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down
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