Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
c4d7276
Revert "Split rustdoc test compilation and execution (#4034)"
dzbarsky Jun 5, 2026
bbe40ff
Remove WORKSPACE support (#4005)
UebelAndre May 1, 2026
8f8871c
feat: Add BPF triple constraint mapping (#3696)
tamird May 1, 2026
c3c2a60
Remove unneeded code
dzbarsky May 15, 2026
3f613e4
Rearrange link paths on Windows to reduce size overruns and fix errors
dzbarsky Jan 20, 2026
cf78588
Revert "Fix stamping for rules that don't have a stamp attribute (#38…
dzbarsky Feb 7, 2026
090cffb
Revert "Switch stamping detection to ctx.configuration.stamp_binaries…
dzbarsky Feb 7, 2026
c834db2
Fix process-wrapper link lib handling when using argfiles
dzbarsky Feb 16, 2026
d3be387
Rewrite process_wrapper_bootstrap to cc
dzbarsky Feb 18, 2026
ebbe420
Attempt to fix CopyFile for windows
dzbarsky Feb 18, 2026
c1da6c2
Apply lint config in exec configuration (#2)
isaacparker0 Feb 20, 2026
ea615ed
Fix up rules_rust bzl_library targets
dzbarsky Feb 20, 2026
9c2d0e1
rust-analyzer: include Bazel package dir in crate source include_dirs…
isaacparker0 Feb 20, 2026
605c86c
Improve proc_macro_deps ergonomics
dzbarsky Sep 9, 2025
b64afd8
Always use param file for process wrapper
dzbarsky Feb 25, 2026
eaa7e35
Avoid hashing RustAnalyzerInfo in rust_analyzer alias mapping
dzbarsky Feb 26, 2026
6e1a59e
Convert wrappers to symbolic macros
dzbarsky Feb 26, 2026
d5c2ff1
Handle toolchain registration when not registered as a bazel_dep
dzbarsky Feb 28, 2026
a9b914a
Replace the --rustc-quit-on-rmeta / .rmeta approach with Buck2-style …
walter-zeromatter Feb 26, 2026
c2f9a70
Cleanup some process_wrapper code
dzbarsky Mar 2, 2026
3174cf1
Fix prost to be compatible with multiplatform
dzbarsky Mar 13, 2026
fef1244
Improve toolchain make var env expansion
dzbarsky Apr 5, 2026
3d5a362
Improve rust compilation messages
dzbarsky Apr 9, 2026
339841f
Add rust_test sharding support (#13)
bolinfest Apr 15, 2026
8590f9a
Add per-crate rustc flag trimming
dzbarsky Apr 26, 2026
8272624
Fix Windows GNU staticlib output naming
dzbarsky Apr 26, 2026
ed245ee
Move processwrapper to rust toolchain
dzbarsky Dec 19, 2025
aa2e566
Capture process wrapper exit codes
dzbarsky Apr 26, 2026
db485c4
Provision hermetic SDKROOT
dzbarsky Apr 27, 2026
c1974fd
Internalize macos SDK dep
dzbarsky Apr 30, 2026
271adbd
rustdoc_test should not do compilation at test time
dzbarsky May 2, 2026
17cddc0
Fix CcInfo collection through CrateGroupInfo
dzbarsky May 3, 2026
244e420
Expose macOS SDK from llvm module
dzbarsky May 3, 2026
b2d02ae
Loongarch64 and sparc support
dzbarsky May 3, 2026
d3f78f8
Avoid vendored crates for rust-analyzer binary
dzbarsky Apr 1, 2026
6e2f911
Don't force passing proc_macro_deps via macro
dzbarsky May 4, 2026
38ab88d
Remove cargo build script rundir support
dzbarsky May 5, 2026
15e0d2d
Shorten cargo build script manifest runfiles paths
dzbarsky May 5, 2026
89d142f
Simplify prost/pyo3 setup
dzbarsky May 5, 2026
e56d122
Fix dynamic_runtime_libs support in dylibs
dzbarsky May 5, 2026
1745fc2
Separate build script data from compile_data (#21)
michaelm-openai May 8, 2026
4fbd9f4
Add RUSTC_BOOTSTRAP guardrail for -Zno-codegen pipelining (#19)
walter-zeromatter May 8, 2026
16ad2f4
Add direct_pyi_files and transitive_pyi_files to py_pyo3_library PyIn…
dillydill123 May 9, 2026
110235f
Fix tests
dzbarsky May 9, 2026
c6ee357
Add CI configs
dzbarsky May 9, 2026
20fd6a9
More CI sanitization
dzbarsky May 10, 2026
85ea40c
Windows runtime lib linkage test expectation fixes
dzbarsky May 11, 2026
ab83273
Cleanup tool_path arg to construct_arguments
dzbarsky May 11, 2026
f218840
Include tool runfiles in Rust toolchains
dzbarsky May 11, 2026
36d9e75
Generalize captured-output-test-runner
dzbarsky May 12, 2026
c2047a0
Expose injectable rustc compile helper
dzbarsky May 12, 2026
c8f7350
Fix oso_prefix
dzbarsky May 14, 2026
6ab6ddc
Better wasm-bindgen support
dzbarsky May 16, 2026
e8731e6
Bump rules_rs for tests
dzbarsky May 17, 2026
20d93f2
vscode test workspace CI fixes
dzbarsky May 17, 2026
eecfa30
BPF linker support
dzbarsky Jun 5, 2026
905e289
Bootstrap processwrapper should expand SDKROOT
dzbarsky Jun 6, 2026
b734ee6
Backpressure non-hermetic build script paths
dzbarsky Jun 7, 2026
17a8684
Remove cargo build script fallback C++ tools
dzbarsky Jun 7, 2026
340c028
Do not silently remove $AR when it is libtool
dzbarsky Jun 7, 2026
539ae9a
Add cc_runtime_linkage attribute for static C++ runtime in shared lib…
walter-zeromatter Jun 10, 2026
7936a64
Only default SDKROOT if cc toolchain doesn't set one
dzbarsky Jun 12, 2026
4882db9
Avoid bazel crash with apple_support toolchain
dzbarsky Jun 13, 2026
1ab2acb
Better libtool error handling
dzbarsky Jun 13, 2026
7499bd5
Add distributed ThinLTO support
dzbarsky Jun 13, 2026
80e423a
Fix cross-platform Bazel Test failures (#26)
dzbarsky Jun 13, 2026
dc8df1f
Fix path-mapped action arguments after rebase
dzbarsky Jun 14, 2026
b98015e
Omit unused private LTO arguments
dzbarsky Jun 14, 2026
3fd994a
Another AR fixup
dzbarsky Jun 15, 2026
e7f7414
Improve pdb support when using cc_common.link
dzbarsky Jun 17, 2026
e0f1a05
Only reject existing non-hermetic build script paths
dzbarsky Jun 17, 2026
3dd8c7f
Check non-hermetic path list components
dzbarsky Jun 17, 2026
f723c54
Test public Starlark dependencies
dzbarsky Jun 17, 2026
b352c90
Use target compilation mode for Cargo build scripts (#24)
dzbarsky Jun 22, 2026
846f8b0
Declare apple_support Starlark dependency
dzbarsky Jul 7, 2026
5f56c32
Use rules_cc fission helper
dzbarsky Jul 7, 2026
59defc6
Use rules_cc debug context helper
dzbarsky Jul 7, 2026
6c96bfd
Export rust-analyzer library sources
dzbarsky Jul 7, 2026
dad92ae
Include build-script tools in action inputs
dzbarsky Jul 23, 2026
9ce85b9
Configure rust-analyzer setup runfile paths (#34)
isaacparker0 Aug 1, 2026
b084d0c
Publish commit-addressed rules_rust source archives
dzbarsky Aug 4, 2026
947f986
Reject embedded sandbox paths in Rust compiler outputs (#36)
dzbarsky Aug 6, 2026
165fbcf
rustc: stage cc dynamic libraries in test runfiles (#37)
walter-zeromatter Aug 12, 2026
b632fa3
Preserve fork behavior after rebasing onto rules_rust 0.73.0
dzbarsky Aug 14, 2026
d72d40c
Preserve repository-independent constraints and remap native build paths
dzbarsky Aug 15, 2026
a6963b5
Fix Windows GNU staticlib output naming (#40)
cerisier Aug 15, 2026
d92cbb3
Preserve staticlib final-link requirements (#41)
cerisier Aug 17, 2026
93b7265
Add hermetic macOS SDKROOT setting (#42)
dzbarsky Aug 17, 2026
b03f1b0
Narrow C++ toolchain inputs for Rust compilation (#43)
finn-ball Aug 18, 2026
ae58477
Add path-mappable rustc environment paths
finn-ball Aug 19, 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