From 45cdd6911a3a0bb5ee29bd6b2ee330dcfc4b12c4 Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Tue, 7 Dec 2021 10:18:14 -0500 Subject: [PATCH] Add build script --- build.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..afd46bb --- /dev/null +++ b/build.sh @@ -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/