feat: add iOS cross-compilation targets for barretenberg-rs static libraries#20106
Merged
johnathan79717 merged 15 commits intomerge-train/barretenbergfrom Feb 4, 2026
Merged
Conversation
Collaborator
|
we should make a workflow that runs with the mac runners to test this |
Contributor
Author
I recycled publish-bb-mac.yml for this. |
02bfa80 to
a7c903f
Compare
cc5dfe8 to
78010b7
Compare
- Package barretenberg-static-amd64-darwin.tar.gz and barretenberg-static-arm64-darwin.tar.gz in release - Update build.rs to support macOS targets (x86_64-apple-darwin, aarch64-apple-darwin) - Use libc++ instead of libstdc++ on macOS - Update README with new supported targets
- Add ios.toolchain.cmake from leetal/ios-cmake project - Add iOS presets (ios-arm64, ios-sim-arm64) to CMakePresets.json - Add build_ios function to bootstrap.sh for macOS runners - Add iOS packaging to build_release_dir - Update build.rs to support iOS targets (aarch64-apple-ios, aarch64-apple-ios-sim) - Update README with iOS supported targets
- Re-enable tag trigger for v* releases - Replace macOS bb builds with iOS static library builds - Build ios-arm64 (device) and ios-sim-arm64 (simulator) presets - Package and upload barretenberg-static-arm64-ios.tar.gz artifacts
LMDB's ExternalProject_Add doesn't inherit iOS toolchain flags, causing build failures. Add MOBILE option to exclude LMDB, world_state, vm2, ipc, and nodejs_module for mobile builds.
- Update iOS deployment target from 14.0 to 16.3 for std::format support - Fix CMake 4.0 compatibility: replace deprecated PATH with DIRECTORY in ios.toolchain.cmake - Add MOBILE flag check to exclude lmdb_repo dependencies on iOS builds - Fix missing field initializers for strict compiler warnings (-Wmissing-field-initializers): - AcirProgram witness field in multiple files - ShpleminiVerifierOutput consistency_checked field - Replace variable-length arrays with std::vector for C++ compliance: - keccak.cpp: input_buffer - polynomial_arithmetic.cpp: numerator_polynomial, roots_and_denominators, temp_src, temp_dest - Fix iOS-specific includes: use unistd.h with extern getentropy declaration on iOS These changes enable building the bb-external static library target for iOS arm64 devices with CMake 4.0 and Xcode 26.2 on macOS.
The -Wdeprecated-literal-operator warning is only available in Clang 18+. Apple Clang doesn't support it, so add -Wunknown-warning-option first.
Adds a build-bb-ios job that runs when ci-barretenberg or ci-barretenberg-full labels are present. This cross-compiles bb-external for iOS devices (ios-arm64) and simulators (ios-sim-arm64) to catch iOS build issues before release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add download support for amd64-darwin, arm64-darwin, arm64-ios, arm64-ios-sim - Fix C++ stdlib linking: use c++ for Apple targets, stdc++ for Linux 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
78010b7 to
c2b9d2f
Compare
Collaborator
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
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
Adds iOS cross-compilation support for the barretenberg-rs FFI backend:
ios.toolchain.cmakefrom leetal/ios-cmake project for iOS cross-compilationios-arm64for device,ios-sim-arm64for simulator)build_iosfunction to bootstrap.sh for macOS runnersbuild_release_dirbuild.rsto support iOS targets (aarch64-apple-ios,aarch64-apple-ios-sim)publish-bb-mac.ymlworkflow to build and release iOS static libraries on tag pushSupported iOS Targets
aarch64-apple-ios- iOS device (arm64)aarch64-apple-ios-sim- iOS Simulator on Apple Silicon MacsHow it works
iOS builds cannot be cross-compiled from Linux (requires Xcode/iOS SDK). The
publish-bb-mac.ymlworkflow:v*tag push (includingci-release-prtest tags)macos-14runner with Xcodebb-externaltarget for both iOS presetsbarretenberg-static-arm64-ios.tar.gzandbarretenberg-static-arm64-ios-sim.tar.gzto GitHub releaseThe main Linux release (ci3.yml) handles Linux and macOS (via zig cross-compile). iOS is handled separately by this workflow.
Notes
iOS builds are configured to:
Test plan
ci-release-prlabel to trigger test releasepublish-bb-mac.ymlworkflow runs on macOS runnerbarretenberg-static-arm64-ios.tar.gzandbarretenberg-static-arm64-ios-sim.tar.gzare uploaded to the test release