servicepoint/crates/servicepoint_binding_uniffi/generate-bindings.sh

24 lines
966 B
Bash
Raw Normal View History

2024-11-02 23:15:54 +01:00
#!/usr/bin/env bash
2024-11-03 11:12:40 +01:00
set -x
set -e
2024-11-02 23:15:54 +01:00
cargo build --release
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
TARGETPATH="$(realpath $SCRIPTPATH/../../target/release/)"
SERVICEPOINT_SO="$TARGETPATH/libservicepoint_binding_uniffi.so"
CONFIG_TOML="$(realpath $SCRIPTPATH/../uniffi.toml)"
BINDGEN="cargo run --features=uniffi/cli --bin uniffi-bindgen -- "
BINDGEN_CS="cargo run --features=cs --bin uniffi-bindgen-cs -- "
2024-11-03 11:42:37 +01:00
BINDGEN_GO="cargo run --features=go --bin uniffi-bindgen-go -- "
2024-11-02 23:15:54 +01:00
COMMON_ARGS="--library $SERVICEPOINT_SO"
${BINDGEN} generate $COMMON_ARGS --language python --out-dir libraries/python
${BINDGEN} generate $COMMON_ARGS --language kotlin --out-dir libraries/kotlin
${BINDGEN} generate $COMMON_ARGS --language swift --out-dir libraries/swift
2024-11-03 11:42:37 +01:00
${BINDGEN} generate $COMMON_ARGS --language ruby --out-dir libraries/ruby
2024-11-02 23:15:54 +01:00
${BINDGEN_CS} $COMMON_ARGS --out-dir libraries/csharp/ServicePoint
2024-11-03 11:42:37 +01:00
${BINDGEN_GO} $COMMON_ARGS --out-dir libraries/go/