-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use shell scripts to build bdk-jvm
- Loading branch information
1 parent
3454331
commit 841de45
Showing
4 changed files
with
60 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,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 |
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,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 |
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,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 |
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,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 |