-
Notifications
You must be signed in to change notification settings - Fork 587
feat: merge-train/barretenberg #20122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Primary changes: - Replace methods of the form `get_*_gate_connected_component` with `GatePattern` structs that specify the conditions under which each wire is constrained for each gate type - Test correctness of `GatePattern`'s by perturbing relation inputs to empirically check which wires are constrained (`gate_patterns.test.cpp`) - Resolves a few bugs/errors identified by the aforementioned tests (see PR comments) - Use `update_used_witnesses` in `fix_witness` to avoid need for ad-hoc handling in the tooling Cleanup: - Replace use of `block_idx` with reference to `block` in several places for improved clarity --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
52c5916 to
6c54a7b
Compare
. --------- Co-authored-by: iakovenkos <sergey.s.yakovenko@gmail.com>
## Summary This PR adds download functionality to barretenberg-rs `build.rs` to fetch pre-built static libraries from GitHub releases. **What this PR does:** - `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 **Download logic:** 1. First checks for local `../../cpp/build/lib/libbb-external.a` (for development) 2. If not found, downloads from `https://github.com/AztecProtocol/aztec-packages/releases/download/v{version}/barretenberg-static-{arch}-linux.tar.gz` 3. Extracts to cargo's `OUT_DIR` **Test command:** ```bash BARRETENBERG_VERSION=0.0.1-commit.d431d1c ./bootstrap.sh test_download ``` ## Test plan - [x] Tested locally with `BARRETENBERG_VERSION=0.0.1-commit.d431d1c ./bootstrap.sh test_download` - [x] Verified FFI tests pass with downloaded library - [x] Verified local library is restored after test --------- Co-authored-by: Claude <noreply@anthropic.com>
The ffi feature is enabled by default in Cargo.toml, so the build function needs BB_LIB_DIR to point to the local cpp library. Without this, build.rs tries to download from GitHub releases which fails for development versions.
## 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
Collaborator
TypeScript validationAction required: Please fix the docs examples or update them to match the current API. cc @AztecProtocol/devrel |
The ffi feature is enabled by default, so 'cargo test --release' tries to build FFI and fails without BB_LIB_DIR. Use --no-default-features to only run the PipeBackend tests, which spawn the bb binary instead.
The ffi feature is enabled by default, so 'cargo test --release' tries to build FFI and fails without BB_LIB_DIR. Use --no-default-features to only run the PipeBackend tests, which spawn the bb binary instead.
iakovenkos
approved these changes
Feb 3, 2026
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.
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