Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scripts/build-linux-x86_64.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash
set -euo pipefail

COMPILATION_TARGET="x86_64-unknown-linux-gnu"
TARGET_DIR="target/x86_64-unknown-linux-gnu/release-smaller"
RESOURCE_DIR="resources/linux-x86-64"
LIB_NAME="libbdkffi.so"

printf "\nSubmodule check...\n"
if [[ "$1" != "--skip-submodule-update" ]]; then
if [[ "${1:-}" != "--skip-submodule-update" ]]; then
git submodule update --init
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
else
Expand All @@ -19,7 +20,7 @@ cd ./bdk-ffi/bdk-ffi/ || exit

# Build the Rust library
rustup target add $COMPILATION_TARGET
cargo build --profile release-smaller --target $COMPILATION_TARGET
cargo build --locked --profile release-smaller --target $COMPILATION_TARGET

# Generate Kotlin bindings using uniffi-bindgen
cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format
Expand Down
5 changes: 3 additions & 2 deletions scripts/build-macos-aarch64.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash
set -euo pipefail

COMPILATION_TARGET="aarch64-apple-darwin"
TARGET_DIR="target/$COMPILATION_TARGET/release-smaller"
RESOURCE_DIR="resources/darwin-aarch64"
LIB_NAME="libbdkffi.dylib"

printf "\nSubmodule check...\n"
if [[ "$1" != "--skip-submodule-update" ]]; then
if [[ "${1:-}" != "--skip-submodule-update" ]]; then
git submodule update --init
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
else
Expand All @@ -19,7 +20,7 @@ cd ./bdk-ffi/bdk-ffi/ || exit

# Build the Rust library
rustup target add $COMPILATION_TARGET
cargo build --profile release-smaller --target $COMPILATION_TARGET
cargo build --locked --profile release-smaller --target $COMPILATION_TARGET

# Generate Kotlin bindings using uniffi-bindgen
cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format
Expand Down
5 changes: 3 additions & 2 deletions scripts/build-macos-x86_64.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash
set -euo pipefail

COMPILATION_TARGET="x86_64-apple-darwin"
TARGET_DIR="target/x86_64-apple-darwin/release-smaller"
RESOURCE_DIR="resources/darwin-x86-64"
LIB_NAME="libbdkffi.dylib"

printf "\nSubmodule check...\n"
if [[ "$1" != "--skip-submodule-update" ]]; then
if [[ "${1:-}" != "--skip-submodule-update" ]]; then
git submodule update --init
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
else
Expand All @@ -19,7 +20,7 @@ cd ./bdk-ffi/bdk-ffi/ || exit

# Build the Rust library
rustup target add $COMPILATION_TARGET
cargo build --profile release-smaller --target $COMPILATION_TARGET
cargo build --locked --profile release-smaller --target $COMPILATION_TARGET

# Generate Kotlin bindings using uniffi-bindgen
cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format
Expand Down
5 changes: 3 additions & 2 deletions scripts/build-windows-x86_64.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash
set -euo pipefail

COMPILATION_TARGET="x86_64-pc-windows-msvc"
TARGET_DIR="target/x86_64-pc-windows-msvc/release-smaller"
RESOURCE_DIR="resources/win32-x86-64"
LIB_NAME="bdkffi.dll"

printf "\nSubmodule check...\n"
if [[ "$1" != "--skip-submodule-update" ]]; then
if [[ "${1:-}" != "--skip-submodule-update" ]]; then
git submodule update --init
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
else
Expand All @@ -19,7 +20,7 @@ cd ./bdk-ffi/bdk-ffi/ || exit

# Build the Rust library
rustup target add $COMPILATION_TARGET
cargo build --profile release-smaller --target $COMPILATION_TARGET
cargo build --locked --profile release-smaller --target $COMPILATION_TARGET

# Generate Kotlin bindings using uniffi-bindgen
cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format
Expand Down
Loading