-
Notifications
You must be signed in to change notification settings - Fork 2
/
compile_rust_ios.sh
executable file
·33 lines (23 loc) · 1.11 KB
/
compile_rust_ios.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
BINARIES_DIR=Binaries
HEADERS_DIR=include
rm -rf $BINARIES_DIR
# RELEASE
cargo build --lib --release --target aarch64-apple-ios --target-dir $BINARIES_DIR
cargo build --lib --release --target aarch64-apple-ios-sim --target-dir $BINARIES_DIR
rm -rf $BINARIES_DIR/release
xcodebuild -create-xcframework \
-library $BINARIES_DIR/aarch64-apple-ios/release/libbls12381.a -headers $HEADERS_DIR \
-library $BINARIES_DIR/aarch64-apple-ios-sim/release/libbls12381.a -headers $HEADERS_DIR \
-output $BINARIES_DIR/Bls12381.xcframework
rm -rf $BINARIES_DIR/aarch64-apple-ios
rm -rf $BINARIES_DIR/aarch64-apple-ios-sim
rm $BINARIES_DIR/CACHEDIR.TAG
# DEBUG
#cargo build --target aarch64-apple-ios --target-dir $BINARIES_DIR
#cargo build --target aarch64-apple-ios-sim --target-dir $BINARIES_DIR
#rm -rf $BINARIES_DIR/debug
#xcodebuild -create-xcframework \
# -library $BINARIES_DIR/aarch64-apple-ios/debug/libbls12381.a -headers $HEADERS_DIR \
# -library $BINARIES_DIR/aarch64-apple-ios-sim/debug/libbls12381.a -headers $HEADERS_DIR \
# -output $BINARIES_DIR/xcframeworks/Bls12381.debug.xcframework