forked from AztecProtocol/aztec-packages
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add readme + patcher script for issue with iOS cross-compilation
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# bb.rs | ||
|
||
Rust bindings for Barretenberg C++ codebase. | ||
|
||
## Build | ||
|
||
``` | ||
# Build on your own machine | ||
cargo build -vvvv | ||
# Cross-compile for iOS | ||
cargo build -vvvv --target aarch64-apple-ios | ||
# Cross-compile for Android | ||
cargo build -vvvv --target aarch64-linux-android | ||
``` | ||
|
||
## Known issues | ||
|
||
### Missing `sys/random.h` | ||
|
||
random.h is not available in the iOS SDK includes but it is available in the MacOS SDK includes. So you can copy it from `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys` and paste it in `/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys`. This will work, no compability issues, it's just not there for some reason. | ||
|
||
You can also run `scripts/patcher.sh` to do this (you may need to run it as `sudo`). | ||
|
||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Fix some issues that can only be fixed manually | ||
|
||
# Copy random.h from MacOS to iOS | ||
cp /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/random.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/random.h |