diff --git a/bdk-jvm/scripts/build-linux-x86_64.sh b/bdk-jvm/scripts/build-linux-x86_64.sh new file mode 100644 index 00000000..da39f042 --- /dev/null +++ b/bdk-jvm/scripts/build-linux-x86_64.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Move to the Rust library directory +cd ../bdk-ffi/ || exit + +# Build the Rust library +rustup default 1.77.1 +rustup target add x86_64-unknown-linux-gnu +cargo build --profile release-smaller --target x86_64-unknown-linux-gnu + +# Generate Kotlin bindings using uniffi-bindgen +cargo run --bin uniffi-bindgen generate --library ./target/aarch64-apple-darwin/release-smaller/libbdkffi.dylib --language kotlin --out-dir ../bdk-jvm/lib/src/main/kotlin/ --no-format + +# Copy the binary to the resources directory +cp ./target/aarch64-apple-darwin/release-smaller/libbdkffi.dylib ../bdk-jvm/lib/src/main/resources/darwin-aarch64/libbdkffi.dylib diff --git a/bdk-jvm/scripts/build-macos-aarch64.sh b/bdk-jvm/scripts/build-macos-aarch64.sh new file mode 100644 index 00000000..103757d8 --- /dev/null +++ b/bdk-jvm/scripts/build-macos-aarch64.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Move to the Rust library directory +cd ../bdk-ffi/ || exit + +# Build the Rust library +rustup default 1.77.1 +rustup target add aarch64-apple-darwin +cargo build --profile release-smaller --target aarch64-apple-darwin + +# Generate Kotlin bindings using uniffi-bindgen +cargo run --bin uniffi-bindgen generate --library ./target/aarch64-apple-darwin/release-smaller/libbdkffi.dylib --language kotlin --out-dir ../bdk-jvm/lib/src/main/kotlin/ --no-format + +# Copy the binary to the resources directory +cp ./target/aarch64-apple-darwin/release-smaller/libbdkffi.dylib ../bdk-jvm/lib/src/main/resources/darwin-aarch64/libbdkffi.dylib diff --git a/bdk-jvm/scripts/build-macos-x86_64.sh b/bdk-jvm/scripts/build-macos-x86_64.sh new file mode 100644 index 00000000..9a5fae3a --- /dev/null +++ b/bdk-jvm/scripts/build-macos-x86_64.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Move to the Rust library directory +cd ../bdk-ffi/ || exit + +# Build the Rust library +rustup default 1.77.1 +rustup target add x86_64-apple-darwin +cargo build --profile release-smaller --target x86_64-apple-darwin + +# Generate Kotlin bindings using uniffi-bindgen +cargo run --bin uniffi-bindgen generate --library ./target/x86_64-apple-darwin/release-smaller/libbdkffi.dylib --language kotlin --out-dir ../bdk-jvm/lib/src/main/kotlin/ --no-format + +# Copy the binary to the resources directory +cp ./target/x86_64-apple-darwin/release-smaller/libbdkffi.dylib ../bdk-jvm/lib/src/main/resources/darwin-x86_64/libbdkffi.dylib diff --git a/bdk-jvm/scripts/build-windows-x86_64.sh b/bdk-jvm/scripts/build-windows-x86_64.sh new file mode 100644 index 00000000..da39f042 --- /dev/null +++ b/bdk-jvm/scripts/build-windows-x86_64.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Move to the Rust library directory +cd ../bdk-ffi/ || exit + +# Build the Rust library +rustup default 1.77.1 +rustup target add x86_64-unknown-linux-gnu +cargo build --profile release-smaller --target x86_64-unknown-linux-gnu + +# Generate Kotlin bindings using uniffi-bindgen +cargo run --bin uniffi-bindgen generate --library ./target/aarch64-apple-darwin/release-smaller/libbdkffi.dylib --language kotlin --out-dir ../bdk-jvm/lib/src/main/kotlin/ --no-format + +# Copy the binary to the resources directory +cp ./target/aarch64-apple-darwin/release-smaller/libbdkffi.dylib ../bdk-jvm/lib/src/main/resources/darwin-aarch64/libbdkffi.dylib