-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathgenerate-macos-arm64.sh
More file actions
27 lines (19 loc) · 918 Bytes
/
generate-macos-arm64.sh
File metadata and controls
27 lines (19 loc) · 918 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
printf "\nSubmodule check...\n"
if [[ "${1:-}" != "--skip-submodule-update" ]]; then
git submodule update --init
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
else
printf "Skipping submodule update, using local changes.\n"
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
fi
cd ./bdk-ffi/bdk-ffi/
rustup target add aarch64-apple-darwin
echo "Generating native binaries..."
cargo build --locked --profile release-smaller --target aarch64-apple-darwin
echo "Generating bdk.py..."
cargo run --bin uniffi-bindgen generate --library ./target/aarch64-apple-darwin/release-smaller/libbdkffi.dylib --language python --out-dir ../../src/bdkpython/ --no-format
echo "Copying libraries libbdkffi.dylib..."
cp ./target/aarch64-apple-darwin/release-smaller/libbdkffi.dylib ../../src/bdkpython/libbdkffi.dylib
echo "All done!"