Add build script

This commit is contained in:
thunderbiscuit 2021-12-07 10:18:14 -05:00
parent f898bc0351
commit 45cdd6911a
No known key found for this signature in database
GPG Key ID: 88253696EB836462

19
build.sh Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
#set -euo pipefail
#pushd bdk-ffi
echo "Confirm bdk-ffi rust library builds"
cargo build --manifest-path ./bdk-ffi/Cargo.toml --release
echo "Generate bdk-ffi Python bindings"
# clean solution once uniffi-bindgen 0.15.3 is released
# uniffi-bindgen generate src/bdk.udl --no-format --out-dir ../src/bdkpython/ --language python
# in the meantime, set UNIFFI_BINDGEN environment variable to a local, latest version of uniffi-rs/uniffi_bindgen/Cargo.toml
# and the BDK_PYTHON environment variable to the current directory
#cd $UNIFFI_BINDGEN/
#cargo run -- generate $BDK_PYTHON/src/bdk.udl --no-format --out-dir ./src/bdkpython/ --language python
#cd -
cargo run --manifest-path $UNIFFI_BINDGEN -- generate ./bdk-ffi/src/bdk.udl --no-format --out-dir ./src/bdkpython/ --language python
cp ./bdk-ffi/target/release/libbdkffi.dylib ./src/bdkpython/