feat: add download functionality to barretenberg-rs build.rs#20105
Merged
johnathan79717 merged 4 commits intomerge-train/barretenbergfrom Feb 3, 2026
Merged
feat: add download functionality to barretenberg-rs build.rs#20105johnathan79717 merged 4 commits intomerge-train/barretenbergfrom
johnathan79717 merged 4 commits intomerge-train/barretenbergfrom
Conversation
ludamad
approved these changes
Feb 2, 2026
52c5916 to
6c54a7b
Compare
6ca375d to
d3f5c10
Compare
…raries - build.rs now downloads libbb-external.a from GitHub releases when local cpp build is not available - Add test_download command to bootstrap.sh to verify download path works - Uses BARRETENBERG_VERSION env var or falls back to crate version - Blocks version 0.0.1 to prevent accidental downloads during development
- Add BB_LOCAL_BUILD env var to force local build and fail with helpful message if libbb-external.a is not found (instead of silently downloading) - Add retry logic (3 attempts) to test_download for network flakiness 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Now the default behavior is to download from GitHub releases. Set BB_LOCAL_BUILD=1 to use local cpp/build/lib instead (for monorepo development). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Instead of BB_LOCAL_BUILD=1, use BB_LIB_DIR=/path/to/lib to specify where libbb-external.a is located. More flexible and explicit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
d3f5c10 to
78cacb1
Compare
johnathan79717
added a commit
that referenced
this pull request
Feb 3, 2026
Re-lands the download functionality from #20105 with the following fixes: - Check for all 0.x.x development versions, not just 0.0.1 - Set BB_LIB_DIR in build function (ffi feature is on by default) The build.rs now properly detects development versions and requires either BARRETENBERG_VERSION to be set to a released version, or BB_LIB_DIR to point to a local build.
johnathan79717
added a commit
that referenced
this pull request
Feb 3, 2026
Re-lands the download functionality from #20105 with the following fixes: - Check for all 0.x.x development versions, not just 0.0.1 - Set BB_LIB_DIR in build function (ffi feature is on by default) The build.rs now properly detects development versions and requires either BARRETENBERG_VERSION to be set to a released version, or BB_LIB_DIR to point to a local build.
johnathan79717
added a commit
that referenced
this pull request
Feb 3, 2026
Re-lands the download functionality from #20105 with the following fixes: - Check for all 0.x.x development versions, not just 0.0.1 - Set BB_LIB_DIR in build function (ffi feature is on by default) The build.rs now properly detects development versions and requires either BARRETENBERG_VERSION to be set to a released version, or BB_LIB_DIR to point to a local build.
johnathan79717
added a commit
that referenced
this pull request
Feb 3, 2026
## Summary Re-lands the download functionality from #20105 with the following fixes: - Check for all 0.x.x development versions, not just 0.0.1 - Set BB_LIB_DIR in build function (ffi feature is on by default) The build.rs now properly detects development versions and requires either BARRETENBERG_VERSION to be set to a released version, or BB_LIB_DIR to point to a local build. ## Test plan - CI will verify the build and tests pass
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 3, 2026
BEGIN_COMMIT_OVERRIDE cherchore: graph tooling audit 0 (#19691) chore: opt sol scope renaming (#20123) feat: add download functionality to barretenberg-rs build.rs (#20105) fix: set BB_LIB_DIR in build function (ffi feature is on by default) Revert barretenberg-rs download functionality feat: re-land barretenberg-rs download functionality with fixes (#20128) fix: skip FFI feature in PipeBackend tests fix: skip FFI feature in PipeBackend tests END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds download functionality to barretenberg-rs
build.rsto fetch pre-built static libraries from GitHub releases.What this PR does:
build.rsnow downloadslibbb-external.afrom GitHub releases when local cpp build is not availabletest_downloadcommand tobootstrap.shto verify download path worksBARRETENBERG_VERSIONenv var or falls back to crate version0.0.1to prevent accidental downloads during developmentDownload logic:
../../cpp/build/lib/libbb-external.a(for development)https://github.com/AztecProtocol/aztec-packages/releases/download/v{version}/barretenberg-static-{arch}-linux.tar.gzOUT_DIRTest command:
Test plan
BARRETENBERG_VERSION=0.0.1-commit.d431d1c ./bootstrap.sh test_download