Skip to content

build(release): build prebuilt tools in the release workflow - #4217

Open
rickeylev wants to merge 1 commit into
bazel-contrib:mainfrom
rickeylev:build_rust_exe_artifacts
Open

rickeylev wants to merge 1 commit into
bazel-contrib:mainfrom
rickeylev:build_rust_exe_artifacts

Conversation

@rickeylev

@rickeylev rickeylev commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

This makes the release workflow build the exe zip maker tool as
part of releases. Because more plumbing is needed to integrate
prebuilt binaries, they are just built, but not actually
included into the final release. For that same reason, failures
to build are ignored for now.

This provides some basic verification of the overall flow and will
give an idea of how expensive it is to build them.

The binaries are built to be fully statically linked to minimize
system dependencies.

Work towards #4216

rules_rust is only a dev dependency, so users can't build Rust tools
like `exe_zip_maker` themselves; the tools must ship prebuilt. Before
attaching them to releases, the release workflow should show that
they build on each target platform.

`//dev/release_artifacts:artifacts_for_release` builds its files with
release settings through a transition: optimized, with glibc (Linux)
or the C runtime (Windows) linked statically, and macOS 11 as the
minimum. Presubmit's bzlmod `//...` builds now cover these settings
too; under WORKSPACE, where rules_rust is a stub, the target is
manual. The target also lists the files' paths, so scripts don't need
`bazel cquery`.

The release workflow now calls a reusable workflow that natively
builds the target on Linux, macOS, and Windows (x86_64 and aarch64),
with `--stamp` and the release tag as `--embed_label`, checks the
Linux and macOS binaries' OS requirements, and uploads the binaries
as workflow artifacts. Nothing is attached to the release yet, so a
failed `bazel build` only adds a warning to the run. The workflow can
also be run manually to try it before a release.
@rickeylev
rickeylev marked this pull request as ready for review October 5, 2026 15:43
@rickeylev
rickeylev requested a review from aignas as a code owner October 5, 2026 15:43
@rickeylev
rickeylev requested a review from jvolkman October 5, 2026 15:44
@rickeylev

Copy link
Copy Markdown
Collaborator Author

Ready for review.

I'm not familiar with building rust stuff. The special flags to statically link glibc I find a bit strange, but 🤷 . I'd also prefer to cross build, but not sure what platforms we can cross-build do with rust. Google's rules_ml_toolchain has crossbuild for linux->{windows,mac} for c++, so i suspect its possible with rust, too, somehow. The AI seemed to prefer host-based builds, though, which I'm OK with doing, at least to get started.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant