Update Kotlin Multiplatform bindgen to uniffi 0.28

This commit is contained in:
Ross Savage
2025-05-20 16:27:17 +02:00
parent e090c858bf
commit af8e9d61ff
21 changed files with 120 additions and 561 deletions

View File

@@ -21,35 +21,14 @@ on:
required: false
type: boolean
default: false
uniffi-25:
description: 'If true, builds additional bindings for Uniffi 0.25'
required: false
type: boolean
default: false
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- id: set-matrix
run: |
if [ ${{ inputs.uniffi-25 }} == true ]; then
echo "::set-output name=matrix::['', '-uniffi-25']"
else
echo "::set-output name=matrix::['']"
fi
outputs:
uniffi-matrix: ${{ steps.set-matrix.outputs.matrix }}
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build ${{ matrix.target }}${{ matrix.uniffi }}
needs: setup
name: build ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
aarch64-linux-android,
armv7-linux-androideabi,
@@ -78,19 +57,12 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.uniffi }}
workspaces: lib
- name: Build bindings
if: matrix.uniffi != '-uniffi-25'
working-directory: lib/bindings
run: cargo ndk -t ${{ matrix.target }} build --release
- name: Build bindings Uniffi 0.25
if: matrix.uniffi == '-uniffi-25'
working-directory: lib/bindings
run: cargo ndk -t ${{ matrix.target }} build --no-default-features --features=uniffi-25 --release
- name: Copy build output
run: |
mkdir -p dist
@@ -107,53 +79,46 @@ jobs:
- name: Archive release
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: dist/*
jnilibs:
needs:
- setup
- build
needs: build
runs-on: ubuntu-latest
name: build jniLibs${{ matrix.uniffi }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
name: build jniLibs
steps:
- uses: actions/download-artifact@v4
with:
name: bindings-aarch64-linux-android${{ matrix.uniffi }}
name: bindings-aarch64-linux-android
path: arm64-v8a
- uses: actions/download-artifact@v4
with:
name: bindings-armv7-linux-androideabi${{ matrix.uniffi }}
name: bindings-armv7-linux-androideabi
path: armeabi-v7a
- uses: actions/download-artifact@v4
with:
name: bindings-i686-linux-android${{ matrix.uniffi }}
name: bindings-i686-linux-android
path: x86
- uses: actions/download-artifact@v4
with:
name: bindings-x86_64-linux-android${{ matrix.uniffi }}
name: bindings-x86_64-linux-android
path: x86_64
- name: Archive jniLibs
uses: actions/upload-artifact@v4
with:
name: bindings-android-jniLibs${{ matrix.uniffi }}
name: bindings-android-jniLibs
path: ./*
build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build dummies ${{ matrix.target }}${{ matrix.uniffi }}
needs: setup
name: build dummies ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
aarch64-linux-android,
armv7-linux-androideabi,
@@ -169,41 +134,36 @@ jobs:
- name: Upload dummy Android ${{ matrix.target }} artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: ./*
jnilibs-dummy:
needs:
- setup
- build-dummies
needs: build-dummies
runs-on: ubuntu-latest
name: build jniLibs dummy ${{ matrix.uniffi }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
name: build jniLibs dummy
steps:
- uses: actions/download-artifact@v4
with:
name: bindings-aarch64-linux-android${{ matrix.uniffi }}
name: bindings-aarch64-linux-android
path: arm64-v8a
- uses: actions/download-artifact@v4
with:
name: bindings-armv7-linux-androideabi${{ matrix.uniffi }}
name: bindings-armv7-linux-androideabi
path: armeabi-v7a
- uses: actions/download-artifact@v4
with:
name: bindings-i686-linux-android${{ matrix.uniffi }}
name: bindings-i686-linux-android
path: x86
- uses: actions/download-artifact@v4
with:
name: bindings-x86_64-linux-android${{ matrix.uniffi }}
name: bindings-x86_64-linux-android
path: x86_64
- name: Archive jniLibs
uses: actions/upload-artifact@v4
with:
name: bindings-android-jniLibs${{ matrix.uniffi }}
name: bindings-android-jniLibs
path: ./*

View File

@@ -21,35 +21,14 @@ on:
required: false
type: boolean
default: false
uniffi-25:
description: 'If true, builds additional bindings for Uniffi 0.25'
required: false
type: boolean
default: false
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- id: set-matrix
run: |
if [ ${{ inputs.uniffi-25 }} == true ]; then
echo "::set-output name=matrix::['', '-uniffi-25']"
else
echo "::set-output name=matrix::['']"
fi
outputs:
uniffi-matrix: ${{ steps.set-matrix.outputs.matrix }}
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: macOS-latest
name: build ${{ matrix.target }}${{ matrix.uniffi }}
needs: setup
name: build ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
aarch64-apple-darwin,
x86_64-apple-darwin,
@@ -76,45 +55,33 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.uniffi }}
workspaces: lib
- name: Build bindings
if: matrix.uniffi != '-uniffi-25'
working-directory: lib/bindings
run: cargo lipo --release --targets ${{ matrix.target }}
- name: Build bindings Uniffi 0.25
if: matrix.uniffi == '-uniffi-25'
working-directory: lib/bindings
run: cargo lipo --no-default-features --features=uniffi-25 --release --targets ${{ matrix.target }}
- name: Archive release
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: |
lib/target/${{ matrix.target }}/release/libbreez_sdk_liquid_bindings.dylib
lib/target/${{ matrix.target }}/release/libbreez_sdk_liquid_bindings.a
merge:
runs-on: macOS-latest
needs:
- setup
- build
name: build darwin-universal${{ matrix.uniffi }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
needs: build
name: build darwin-universal
steps:
- uses: actions/download-artifact@v4
with:
name: bindings-aarch64-apple-darwin${{ matrix.uniffi }}
name: bindings-aarch64-apple-darwin
path: aarch64-apple-darwin
- uses: actions/download-artifact@v4
with:
name: bindings-x86_64-apple-darwin${{ matrix.uniffi }}
name: bindings-x86_64-apple-darwin
path: x86_64-apple-darwin
- name: Build Darwin universal
@@ -126,7 +93,7 @@ jobs:
- name: Archive release
uses: actions/upload-artifact@v4
with:
name: bindings-darwin-universal${{ matrix.uniffi }}
name: bindings-darwin-universal
path: |
darwin-universal/libbreez_sdk_liquid_bindings.dylib
darwin-universal/libbreez_sdk_liquid_bindings.a
@@ -134,12 +101,9 @@ jobs:
build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build dummies ${{ matrix.target }}${{ matrix.uniffi }}
needs:
- setup
name: build dummies ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
aarch64-apple-darwin,
x86_64-apple-darwin,
@@ -154,5 +118,5 @@ jobs:
- name: Upload dummy darwin ${{ matrix.target }} artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: ./*

View File

@@ -21,35 +21,14 @@ on:
required: false
type: boolean
default: false
uniffi-25:
description: 'If true, builds additional bindings for Uniffi 0.25'
required: false
type: boolean
default: false
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- id: set-matrix
run: |
if [ ${{ inputs.uniffi-25 }} == true ]; then
echo "::set-output name=matrix::['', '-uniffi-25']"
else
echo "::set-output name=matrix::['']"
fi
outputs:
uniffi-matrix: ${{ steps.set-matrix.outputs.matrix }}
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: macOS-latest
name: build ${{ matrix.target }}${{ matrix.uniffi }}
needs: setup
name: build ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
aarch64-apple-ios,
x86_64-apple-ios,
@@ -79,7 +58,6 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.uniffi }}
workspaces: lib
- name: Install xcode
@@ -88,44 +66,33 @@ jobs:
xcode-version: latest-stable
- name: Build bindings
if: matrix.uniffi != '-uniffi-25'
working-directory: lib/bindings
run: cargo build --release --target ${{ matrix.target }}
- name: Build bindings Uniffi 0.25
if: matrix.uniffi == '-uniffi-25'
working-directory: lib/bindings
run: cargo build --no-default-features --features=uniffi-25 --release --target ${{ matrix.target }}
- name: Archive release
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: lib/target/${{ matrix.target }}/release/libbreez_sdk_liquid_bindings.a
merge:
runs-on: macOS-latest
needs:
- setup
- build
name: build ios-universal${{ matrix.uniffi }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
needs: build
name: build ios-universal
steps:
- uses: actions/download-artifact@v4
with:
name: bindings-aarch64-apple-ios${{ matrix.uniffi }}
name: bindings-aarch64-apple-ios
path: aarch64-apple-ios
- uses: actions/download-artifact@v4
with:
name: bindings-x86_64-apple-ios${{ matrix.uniffi }}
name: bindings-x86_64-apple-ios
path: x86_64-apple-ios
- uses: actions/download-artifact@v4
with:
name: bindings-aarch64-apple-ios-sim${{ matrix.uniffi }}
name: bindings-aarch64-apple-ios-sim
path: aarch64-apple-ios-sim
- name: Build ios-universal
@@ -141,23 +108,21 @@ jobs:
- name: Archive ios-universal
uses: actions/upload-artifact@v4
with:
name: bindings-ios-universal${{ matrix.uniffi }}
name: bindings-ios-universal
path: ios-universal/libbreez_sdk_liquid_bindings.a
- name: Archive ios-universal-sim
uses: actions/upload-artifact@v4
with:
name: bindings-ios-universal-sim${{ matrix.uniffi }}
name: bindings-ios-universal-sim
path: ios-universal-sim/libbreez_sdk_liquid_bindings.a
build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build dummies ${{ matrix.target }}${{ matrix.uniffi }}
needs: setup
name: build dummies ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
aarch64-apple-ios,
x86_64-apple-ios,
@@ -173,5 +138,5 @@ jobs:
- name: Upload dummy ios ${{ matrix.target }} artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: ./*

View File

@@ -21,35 +21,14 @@ on:
required: false
type: boolean
default: false
uniffi-25:
description: 'If true, builds additional bindings for Uniffi 0.25'
required: false
type: boolean
default: false
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- id: set-matrix
run: |
if [ ${{ inputs.uniffi-25 }} == true ]; then
echo "::set-output name=matrix::['', '-uniffi-25']"
else
echo "::set-output name=matrix::['']"
fi
outputs:
uniffi-matrix: ${{ steps.set-matrix.outputs.matrix }}
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: ubuntu-22.04
name: build ${{ matrix.target }}${{ matrix.uniffi }}
needs: setup
name: build ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
aarch64-unknown-linux-gnu,
x86_64-unknown-linux-gnu,
@@ -87,39 +66,27 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.uniffi }}
workspaces: lib
- name: Build bindings
if: matrix.uniffi != '-uniffi-25'
working-directory: lib/bindings
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: /usr/bin/aarch64-linux-gnu-gcc
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: /usr/bin/x86_64-linux-gnu-gcc
run: cargo build --release --target ${{ matrix.target }}
- name: Build bindings Uniffi 0.25
if: matrix.uniffi == '-uniffi-25'
working-directory: lib/bindings
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: /usr/bin/aarch64-linux-gnu-gcc
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: /usr/bin/x86_64-linux-gnu-gcc
run: cargo build --no-default-features --features=uniffi-25 --release --target ${{ matrix.target }}
- name: Archive release
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: lib/target/${{ matrix.target }}/release/libbreez_sdk_liquid_bindings.so
build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build dummies ${{ matrix.target }}${{ matrix.uniffi }}
needs: setup
name: build dummies ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
aarch64-unknown-linux-gnu,
x86_64-unknown-linux-gnu,
@@ -132,5 +99,5 @@ jobs:
- name: Upload dummy linux ${{ matrix.target }} artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: ./*

View File

@@ -21,35 +21,14 @@ on:
required: false
type: boolean
default: false
uniffi-25:
description: 'If true, builds additional bindings for Uniffi 0.25'
required: false
type: boolean
default: false
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- id: set-matrix
run: |
if [ ${{ inputs.uniffi-25 }} == true ]; then
echo "::set-output name=matrix::['', '-uniffi-25']"
else
echo "::set-output name=matrix::['']"
fi
outputs:
uniffi-matrix: ${{ steps.set-matrix.outputs.matrix }}
build:
if: ${{ !inputs.use-dummy-binaries }}
runs-on: windows-latest
name: build ${{ matrix.target }}${{ matrix.uniffi }}
needs: setup
name: build ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
i686-pc-windows-msvc,
x86_64-pc-windows-msvc,
@@ -75,33 +54,24 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.uniffi }}
workspaces: lib
- name: Build bindings
if: matrix.uniffi != '-uniffi-25'
working-directory: lib/bindings
run: cargo build --release --target ${{ matrix.target }}
- name: Build bindings Uniffi 0.25
if: matrix.uniffi == '-uniffi-25'
working-directory: lib/bindings
run: cargo build --no-default-features --features=uniffi-25 --release --target ${{ matrix.target }}
- name: Archive release
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: lib/target/${{ matrix.target }}/release/breez_sdk_liquid_bindings.dll
build-dummies:
if: ${{ inputs.use-dummy-binaries }}
runs-on: ubuntu-latest
name: build dummies ${{ matrix.target }}${{ matrix.uniffi }}
needs: setup
name: build dummies ${{ matrix.target }}
strategy:
matrix:
uniffi: ${{ fromJson(needs.setup.outputs.uniffi-matrix) }}
target: [
i686-pc-windows-msvc,
x86_64-pc-windows-msvc,
@@ -114,5 +84,5 @@ jobs:
- name: Upload dummy windows ${{ matrix.target }} artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}${{ matrix.uniffi }}
name: bindings-${{ matrix.target }}
path: ./*

View File

@@ -60,7 +60,7 @@ on:
jobs:
build-language-bindings:
runs-on: ubuntu-latest
if: ${{ inputs.swift || inputs.python || inputs.csharp || inputs.golang }}
if: ${{ inputs.csharp || inputs.golang || inputs.kotlin || inputs.python || inputs.swift }}
steps:
- name: Checkout breez-sdk-liquid repo
uses: actions/checkout@v4
@@ -124,6 +124,33 @@ jobs:
name: bindings-csharp
path: lib/bindings/ffi/csharp/breez_sdk_liquid.cs
- name: Build Kotlin binding
if: ${{ inputs.kotlin }}
working-directory: lib/bindings
run: |
cargo run --bin uniffi-bindgen generate src/breez_sdk_liquid.udl --language kotlin -o ffi/kotlin
- name: Archive Kotlin binding
if: ${{ inputs.kotlin }}
uses: actions/upload-artifact@v4
with:
name: bindings-kotlin
path: lib/bindings/ffi/kotlin/breez_sdk_liquid/breez_sdk_liquid.kt
- name: Build Kotlin multiplatform binding
if: ${{ inputs.kotlin }}
working-directory: lib/bindings
run: |
cargo install gobley-uniffi-bindgen --git https://github.com/gobley/gobley --tag v0.2.0
gobley-uniffi-bindgen -c ./uniffi.toml -o ffi/kmp src/breez_sdk_liquid.udl
- name: Archive Kotlin multiplatform binding
if: ${{ inputs.kotlin }}
uses: actions/upload-artifact@v4
with:
name: bindings-kotlin-multiplatform
path: lib/bindings/ffi/kmp/*
- name: Build golang binding
if: ${{ inputs.golang }}
working-directory: lib/bindings
@@ -137,49 +164,3 @@ jobs:
with:
name: bindings-golang
path: lib/bindings/ffi/golang/breez_sdk_liquid/breez_sdk_liquid.*
build-language-bindings-uniffi-25:
runs-on: ubuntu-latest
if: ${{ inputs.kotlin }}
steps:
- name: Checkout breez-sdk-liquid repo
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "27.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
key: uniffi-25
workspaces: lib
- name: Build Kotlin binding
if: ${{ inputs.kotlin }}
working-directory: lib/bindings
run: |
cargo run --no-default-features --features=uniffi-25 --bin uniffi-bindgen generate src/breez_sdk_liquid.udl --language kotlin -o ffi/kotlin
- name: Archive Kotlin binding
if: ${{ inputs.kotlin }}
uses: actions/upload-artifact@v4
with:
name: bindings-kotlin
path: lib/bindings/ffi/kotlin/breez_sdk_liquid/breez_sdk_liquid.kt
- name: Archive Kotlin multiplatform binding
if: ${{ inputs.kotlin }}
uses: actions/upload-artifact@v4
with:
name: bindings-kotlin-multiplatform
path: lib/bindings/ffi/kmp/*

View File

@@ -397,7 +397,7 @@ jobs:
- name: Build Android bindings
working-directory: lib/bindings
run: |
cargo run --no-default-features --features=uniffi-25 --bin uniffi-bindgen generate src/breez_sdk_liquid.udl --no-format --language kotlin -o langs/android/lib/src/main/kotlin
cargo run --bin uniffi-bindgen generate src/breez_sdk_liquid.udl --no-format --language kotlin -o langs/android/lib/src/main/kotlin
- name: Run Android build
working-directory: lib/bindings/langs/android

View File

@@ -125,7 +125,6 @@ jobs:
wasm-package-version: ${{ needs.pre-setup.outputs.wasm-package-version || '0.0.2' }}
publish: ${{ needs.pre-setup.outputs.publish }}
use-dummy-binaries: ${{ needs.pre-setup.outputs.use-dummy-binaries }}
uniffi-25: ${{ !!needs.pre-setup.outputs.kotlin-multiplatform-package-version || !!needs.pre-setup.outputs.maven-package-version }}
steps:
- run: echo "set setup output variables"
@@ -137,7 +136,6 @@ jobs:
repository: ${{ needs.setup.outputs.repository }}
ref: ${{ needs.setup.outputs.ref }}
use-dummy-binaries: ${{ needs.setup.outputs.use-dummy-binaries == 'true' }}
uniffi-25: ${{ needs.setup.outputs.uniffi-25 == 'true' }}
build-bindings-darwin:
needs: setup
@@ -147,7 +145,6 @@ jobs:
repository: ${{ needs.setup.outputs.repository }}
ref: ${{ needs.setup.outputs.ref }}
use-dummy-binaries: ${{ needs.setup.outputs.use-dummy-binaries == 'true' }}
uniffi-25: ${{ needs.setup.outputs.uniffi-25 == 'true' }}
build-bindings-linux:
needs: setup
@@ -157,7 +154,6 @@ jobs:
repository: ${{ needs.setup.outputs.repository }}
ref: ${{ needs.setup.outputs.ref }}
use-dummy-binaries: ${{ needs.setup.outputs.use-dummy-binaries == 'true' }}
uniffi-25: ${{ needs.setup.outputs.uniffi-25 == 'true' }}
build-bindings-android:
needs: setup
@@ -167,7 +163,6 @@ jobs:
repository: ${{ needs.setup.outputs.repository }}
ref: ${{ needs.setup.outputs.ref }}
use-dummy-binaries: ${{ needs.setup.outputs.use-dummy-binaries == 'true' }}
uniffi-25: ${{ needs.setup.outputs.uniffi-25 == 'true' }}
build-bindings-ios:
needs: setup
@@ -177,7 +172,6 @@ jobs:
repository: ${{ needs.setup.outputs.repository }}
ref: ${{ needs.setup.outputs.ref }}
use-dummy-binaries: ${{ needs.setup.outputs.use-dummy-binaries == 'true' }}
uniffi-25: ${{ needs.setup.outputs.uniffi-25 == 'true' }}
build-bindings-wasm:
needs: setup

View File

@@ -44,7 +44,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: bindings-android-jniLibs-uniffi-25
name: bindings-android-jniLibs
path: lib/bindings/langs/android/lib/src/main/jniLibs
- uses: actions/download-artifact@v4

View File

@@ -44,7 +44,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: bindings-android-jniLibs-uniffi-25
name: bindings-android-jniLibs
path: lib/bindings/langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/androidMain/jniLibs
- uses: actions/download-artifact@v4
@@ -52,24 +52,32 @@ jobs:
name: bindings-kotlin-multiplatform
path: lib/bindings/langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src
- name: Copy jvmMain
working-directory: lib/bindings
- name: Move files
working-directory: lib/bindings/langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src
run: |
cp -r langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/jvmMain/kotlin langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/androidMain/
mkdir -p androidMain/kotlin/breez_sdk_liquid
mkdir -p commonMain/kotlin/breez_sdk_liquid
mkdir -p jvmMain/kotlin/breez_sdk_liquid
mkdir -p nativeMain/kotlin/breez_sdk_liquid
mv main/kotlin/breez_sdk_liquid/breez_sdk_liquid.android.kt androidMain/kotlin/breez_sdk_liquid/
mv main/kotlin/breez_sdk_liquid/breez_sdk_liquid.common.kt commonMain/kotlin/breez_sdk_liquid/
mv main/kotlin/breez_sdk_liquid/breez_sdk_liquid.jvm.kt jvmMain/kotlin/breez_sdk_liquid/
mv main/kotlin/breez_sdk_liquid/breez_sdk_liquid.native.kt nativeMain/kotlin/breez_sdk_liquid/
rm -r main/kotlin/breez_sdk_liquid
- uses: actions/download-artifact@v4
with:
name: bindings-aarch64-apple-ios-uniffi-25
name: bindings-aarch64-apple-ios
path: lib/bindings/langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/lib/ios-arm64
- uses: actions/download-artifact@v4
with:
name: bindings-aarch64-apple-ios-sim-uniffi-25
name: bindings-aarch64-apple-ios-sim
path: lib/bindings/langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/lib/ios-simulator-arm64
- uses: actions/download-artifact@v4
with:
name: bindings-x86_64-apple-ios-uniffi-25
name: bindings-x86_64-apple-ios
path: lib/bindings/langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/lib/ios-simulator-x64
- name: Build Kotlin Multiplatform project

179
lib/Cargo.lock generated
View File

@@ -857,11 +857,8 @@ dependencies = [
"once_cell",
"thiserror 1.0.69",
"tokio",
"uniffi 0.25.3",
"uniffi 0.28.3",
"uniffi_bindgen 0.25.3",
"uniffi_bindgen 0.28.3",
"uniffi_bindgen_kotlin_multiplatform",
]
[[package]]
@@ -2586,25 +2583,6 @@ dependencies = [
"syn 2.0.101",
]
[[package]]
name = "include_dir"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd"
dependencies = [
"include_dir_macros",
]
[[package]]
name = "include_dir_macros"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75"
dependencies = [
"proc-macro2",
"quote",
]
[[package]]
name = "indexed_db_futures"
version = "0.6.4"
@@ -3374,12 +3352,6 @@ dependencies = [
"once_cell",
]
[[package]]
name = "oneshot-uniffi"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c548d5c78976f6955d72d0ced18c48ca07030f7a1d4024529fedd7c1c01b29c"
[[package]]
name = "opaque-debug"
version = "0.3.1"
@@ -5790,21 +5762,6 @@ dependencies = [
"uniffi_macros 0.23.0",
]
[[package]]
name = "uniffi"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21345172d31092fd48c47fd56c53d4ae9e41c4b1f559fb8c38c1ab1685fd919f"
dependencies = [
"anyhow",
"camino",
"clap 4.5.38",
"uniffi_bindgen 0.25.3",
"uniffi_build 0.25.3",
"uniffi_core 0.25.3",
"uniffi_macros 0.25.3",
]
[[package]]
name = "uniffi"
version = "0.28.3"
@@ -5845,30 +5802,6 @@ dependencies = [
"weedle2 4.0.0",
]
[[package]]
name = "uniffi_bindgen"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd992f2929a053829d5875af1eff2ee3d7a7001cb3b9a46cc7895f2caede6940"
dependencies = [
"anyhow",
"askama 0.12.1",
"camino",
"cargo_metadata",
"clap 4.5.38",
"fs-err",
"glob",
"goblin 0.6.1",
"heck 0.4.1",
"once_cell",
"paste",
"serde",
"toml",
"uniffi_meta 0.25.3",
"uniffi_testing 0.25.3",
"uniffi_udl 0.25.3",
]
[[package]]
name = "uniffi_bindgen"
version = "0.28.3"
@@ -5890,24 +5823,7 @@ dependencies = [
"toml",
"uniffi_meta 0.28.3",
"uniffi_testing 0.28.3",
"uniffi_udl 0.28.3",
]
[[package]]
name = "uniffi_bindgen_kotlin_multiplatform"
version = "0.1.0"
source = "git+https://gitlab.com/trixnity/uniffi-kotlin-multiplatform-bindings?rev=e8e3a88df5b657787c1198425c16008232b26548#e8e3a88df5b657787c1198425c16008232b26548"
dependencies = [
"anyhow",
"askama 0.12.1",
"camino",
"clap 4.5.38",
"heck 0.4.1",
"include_dir",
"paste",
"serde",
"toml",
"uniffi_bindgen 0.25.3",
"uniffi_udl",
]
[[package]]
@@ -5921,17 +5837,6 @@ dependencies = [
"uniffi_bindgen 0.23.0",
]
[[package]]
name = "uniffi_build"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "001964dd3682d600084b3aaf75acf9c3426699bc27b65e96bb32d175a31c74e9"
dependencies = [
"anyhow",
"camino",
"uniffi_bindgen 0.25.3",
]
[[package]]
name = "uniffi_build"
version = "0.28.3"
@@ -5953,16 +5858,6 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "uniffi_checksum_derive"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55137c122f712d9330fd985d66fa61bdc381752e89c35708c13ce63049a3002c"
dependencies = [
"quote",
"syn 2.0.101",
]
[[package]]
name = "uniffi_checksum_derive"
version = "0.28.3"
@@ -5989,22 +5884,6 @@ dependencies = [
"static_assertions",
]
[[package]]
name = "uniffi_core"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6121a127a3af1665cd90d12dd2b3683c2643c5103281d0fed5838324ca1fad5b"
dependencies = [
"anyhow",
"bytes",
"camino",
"log",
"once_cell",
"oneshot-uniffi",
"paste",
"static_assertions",
]
[[package]]
name = "uniffi_core"
version = "0.28.3"
@@ -6038,25 +5917,6 @@ dependencies = [
"uniffi_meta 0.23.0",
]
[[package]]
name = "uniffi_macros"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11cf7a58f101fcedafa5b77ea037999b88748607f0ef3a33eaa0efc5392e92e4"
dependencies = [
"bincode",
"camino",
"fs-err",
"once_cell",
"proc-macro2",
"quote",
"serde",
"syn 2.0.101",
"toml",
"uniffi_build 0.25.3",
"uniffi_meta 0.25.3",
]
[[package]]
name = "uniffi_macros"
version = "0.28.3"
@@ -6086,18 +5946,6 @@ dependencies = [
"uniffi_checksum_derive 0.23.0",
]
[[package]]
name = "uniffi_meta"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71dc8573a7b1ac4b71643d6da34888273ebfc03440c525121f1b3634ad3417a2"
dependencies = [
"anyhow",
"bytes",
"siphasher",
"uniffi_checksum_derive 0.25.3",
]
[[package]]
name = "uniffi_meta"
version = "0.28.3"
@@ -6125,19 +5973,6 @@ dependencies = [
"serde_json",
]
[[package]]
name = "uniffi_testing"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "118448debffcb676ddbe8c5305fb933ab7e0123753e659a71dc4a693f8d9f23c"
dependencies = [
"anyhow",
"camino",
"cargo_metadata",
"fs-err",
"once_cell",
]
[[package]]
name = "uniffi_testing"
version = "0.28.3"
@@ -6151,18 +5986,6 @@ dependencies = [
"once_cell",
]
[[package]]
name = "uniffi_udl"
version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "889edb7109c6078abe0e53e9b4070cf74a6b3468d141bdf5ef1bd4d1dc24a1c3"
dependencies = [
"anyhow",
"uniffi_meta 0.25.3",
"uniffi_testing 0.25.3",
"weedle2 4.0.0",
]
[[package]]
name = "uniffi_udl"
version = "0.28.3"

View File

@@ -11,11 +11,6 @@ path = "uniffi-bindgen.rs"
name = "breez_sdk_liquid_bindings"
crate-type = ["staticlib", "cdylib", "lib"]
[features]
default = ["uniffi-28"]
uniffi-25 = ["uniffi_25", "uniffi_bindgen_25", "uniffi_bindgen_kotlin_multiplatform"]
uniffi-28 = ["uniffi_28", "uniffi_bindgen_28"]
[lints]
workspace = true
@@ -23,17 +18,13 @@ workspace = true
anyhow = { workspace = true }
breez-sdk-liquid = { path = "../core" }
log = { workspace = true }
uniffi_25 = { package = "uniffi", version = "0.25.2", features = [ "bindgen-tests", "cli" ], optional = true }
uniffi_28 = { package = "uniffi", version = "0.28.0", features = [ "bindgen-tests", "cli" ], optional = true }
uniffi_bindgen_25 = { package = "uniffi_bindgen", version = "0.25.2", optional = true }
uniffi_bindgen_28 = { package = "uniffi_bindgen", version = "0.28.0", optional = true }
uniffi_bindgen_kotlin_multiplatform = { git = "https://gitlab.com/trixnity/uniffi-kotlin-multiplatform-bindings", rev = "e8e3a88df5b657787c1198425c16008232b26548", optional = true }
uniffi = { package = "uniffi", version = "0.28.0", features = [ "bindgen-tests", "cli" ] }
uniffi_bindgen = { package = "uniffi_bindgen", version = "0.28.0" }
camino = "1.1.1"
thiserror = { workspace = true }
tokio = { version = "1", features = ["rt"] }
once_cell = { workspace = true }
[build-dependencies]
uniffi_25 = { package = "uniffi", version = "0.25.2", features = [ "build" ], optional = true }
uniffi_28 = { package = "uniffi", version = "0.28.0", features = [ "build" ], optional = true }
uniffi = { package = "uniffi", version = "0.28.0", features = [ "build" ] }
glob = "0.3.1"

View File

@@ -1,8 +1,3 @@
#[cfg(feature = "uniffi-25")]
extern crate uniffi_25 as uniffi;
#[cfg(feature = "uniffi-28")]
extern crate uniffi_28 as uniffi;
use glob::glob;
use std::env;

View File

@@ -73,6 +73,7 @@ kotlin {
dependencies {
implementation("net.java.dev.jna:jna:5.13.0@aar")
implementation("org.jetbrains.kotlinx:atomicfu:0.23.1")
implementation("androidx.annotation:annotation:1.7.1")
}
}
}
@@ -80,7 +81,7 @@ kotlin {
android {
namespace = "technology.breez.liquid"
compileSdk = 33
compileSdk = 34
defaultConfig {
minSdk = 24

View File

@@ -1,7 +1,7 @@
buildscript {
dependencies {
classpath("com.android.tools.build:gradle:8.1.0")
classpath("com.android.tools.build:gradle:8.2.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21")
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.23.1")
}
@@ -9,7 +9,7 @@ buildscript {
plugins {
//trick: for the same plugin versions in all sub-modules
id("com.android.library").version("8.1.0").apply(false)
id("com.android.library").version("8.2.0").apply(false)
kotlin("multiplatform").version("1.9.21").apply(false)
}

View File

@@ -55,26 +55,7 @@ x86_64-linux-android: $(SOURCES) ndk-home
cargo ndk -t x86_64-linux-android -o ffi/kotlin/jniLibs build --release
cp -a $(ANDROID_NDK_HOME)/toolchains/llvm/prebuilt/$(OS_NAME)-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so ffi/kotlin/jniLibs/x86_64/
android-uniffi-25: aarch64-linux-android-uniffi-25 armv7-linux-androideabi-uniffi-25 i686-linux-android-uniffi-25 x86_64-linux-android-uniffi-25
cargo run --no-default-features --features=uniffi-25 --bin uniffi-bindgen generate src/breez_sdk_liquid.udl --no-format --language kotlin -o ffi/kotlin
aarch64-linux-android-uniffi-25: $(SOURCES) ndk-home
cargo ndk -t aarch64-linux-android -o ffi/kotlin/jniLibs build --no-default-features --features=uniffi-25 --release
cp -a $(ANDROID_NDK_HOME)/toolchains/llvm/prebuilt/$(OS_NAME)-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ffi/kotlin/jniLibs/arm64-v8a/
armv7-linux-androideabi-uniffi-25: $(SOURCES) ndk-home
cargo ndk -t armv7-linux-androideabi -o ffi/kotlin/jniLibs build --no-default-features --features=uniffi-25 --release
cp -a $(ANDROID_NDK_HOME)/toolchains/llvm/prebuilt/$(OS_NAME)-x86_64/sysroot/usr/lib/arm-linux-androideabi/libc++_shared.so ffi/kotlin/jniLibs/armeabi-v7a/
i686-linux-android-uniffi-25: $(SOURCES) ndk-home
cargo ndk -t i686-linux-android -o ffi/kotlin/jniLibs build --no-default-features --features=uniffi-25 --release
cp -a $(ANDROID_NDK_HOME)/toolchains/llvm/prebuilt/$(OS_NAME)-x86_64/sysroot/usr/lib/i686-linux-android/libc++_shared.so ffi/kotlin/jniLibs/x86/
x86_64-linux-android-uniffi-25: $(SOURCES) ndk-home
cargo ndk -t x86_64-linux-android -o ffi/kotlin/jniLibs build --no-default-features --features=uniffi-25 --release
cp -a $(ANDROID_NDK_HOME)/toolchains/llvm/prebuilt/$(OS_NAME)-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so ffi/kotlin/jniLibs/x86_64/
bindings-android: android-uniffi-25
bindings-android: android
cp -r ffi/kotlin/jniLibs langs/android/lib/src/main
cp -r ffi/kotlin/breez_sdk_liquid langs/android/lib/src/main/kotlin/
cd langs/android && ./gradlew assemble
@@ -87,12 +68,22 @@ kotlin: $(SOURCES)
cargo build --release --target $(TARGET)
cargo run --bin uniffi-bindgen generate src/breez_sdk_liquid.udl --no-format --language kotlin -o ffi/kotlin
bindings-kotlin-multiplatform: ios-universal-uniffi-25 android-uniffi-25
mkdir -p langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/androidMain
cp -r ffi/kotlin/jniLibs/ langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/androidMain/jniLibs/
cp -r ffi/kmp/* langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/
bindings-kotlin-multiplatform: ios-universal android
cargo install gobley-uniffi-bindgen --git https://github.com/gobley/gobley --tag v0.2.0
gobley-uniffi-bindgen -c ./uniffi.toml -o ffi/kmp src/breez_sdk_liquid.udl
cp -r langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/jvmMain/kotlin langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/androidMain/
mkdir -p langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/androidMain/kotlin/breez_sdk_liquid
mkdir -p langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/commonMain/kotlin/breez_sdk_liquid
mkdir -p langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/jvmMain/kotlin/breez_sdk_liquid
mkdir -p langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/nativeMain/kotlin/breez_sdk_liquid
cp -r ffi/kotlin/jniLibs/ langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/androidMain/jniLibs/
cp -r ffi/kmp/nativeInterop langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/
cp ffi/kmp/main/kotlin/breez_sdk_liquid/breez_sdk_liquid.android.kt langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/androidMain/kotlin/breez_sdk_liquid/
cp ffi/kmp/main/kotlin/breez_sdk_liquid/breez_sdk_liquid.common.kt langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/commonMain/kotlin/breez_sdk_liquid/
cp ffi/kmp/main/kotlin/breez_sdk_liquid/breez_sdk_liquid.jvm.kt langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/jvmMain/kotlin/breez_sdk_liquid/
cp ffi/kmp/main/kotlin/breez_sdk_liquid/breez_sdk_liquid.native.kt langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/nativeMain/kotlin/breez_sdk_liquid/
mkdir -p langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/lib/ios-arm64/
mkdir -p langs/kotlin-multiplatform/breez-sdk-liquid-kmp/src/lib/ios-simulator-arm64/
@@ -115,17 +106,6 @@ ios-universal: $(SOURCES)
# build universal lib for arm sim and x86 sim
lipo -create -output ../target/ios-universal-sim/release/libbreez_sdk_liquid_bindings.a ../target/aarch64-apple-ios-sim/release/libbreez_sdk_liquid_bindings.a ../target/x86_64-apple-ios/release/libbreez_sdk_liquid_bindings.a
ios-universal-uniffi-25: $(SOURCES)
mkdir -p ../target/ios-universal/release
mkdir -p ../target/ios-universal-sim/release
cargo build --no-default-features --features uniffi-25 --release --target aarch64-apple-ios ;\
cargo build --no-default-features --features uniffi-25 --release --target x86_64-apple-ios ;\
cargo build --no-default-features --features uniffi-25 --release --target aarch64-apple-ios-sim ;\
# build universal lib for arm device and x86 sim
lipo -create -output ../target/ios-universal/release/libbreez_sdk_liquid_bindings.a ../target/aarch64-apple-ios/release/libbreez_sdk_liquid_bindings.a ../target/x86_64-apple-ios/release/libbreez_sdk_liquid_bindings.a
# build universal lib for arm sim and x86 sim
lipo -create -output ../target/ios-universal-sim/release/libbreez_sdk_liquid_bindings.a ../target/aarch64-apple-ios-sim/release/libbreez_sdk_liquid_bindings.a ../target/x86_64-apple-ios/release/libbreez_sdk_liquid_bindings.a
darwin-universal: $(SOURCES)
mkdir -p ../target/darwin-universal/release
cargo lipo --release --targets aarch64-apple-darwin
@@ -133,13 +113,6 @@ darwin-universal: $(SOURCES)
lipo -create -output ../target/darwin-universal/release/libbreez_sdk_liquid_bindings.dylib ../target/aarch64-apple-darwin/release/libbreez_sdk_liquid_bindings.dylib ../target/x86_64-apple-darwin/release/libbreez_sdk_liquid_bindings.dylib
lipo -create -output ../target/darwin-universal/release/libbreez_sdk_liquid_bindings.a ../target/aarch64-apple-darwin/release/libbreez_sdk_liquid_bindings.a ../target/x86_64-apple-darwin/release/libbreez_sdk_liquid_bindings.a
darwin-universal-uniffi-25: $(SOURCES)
mkdir -p ../target/darwin-universal/release
cargo lipo --no-default-features --features uniffi-25 --release --targets aarch64-apple-darwin
cargo lipo --no-default-features --features uniffi-25 --release --targets x86_64-apple-darwin
lipo -create -output ../target/darwin-universal/release/libbreez_sdk_liquid_bindings.dylib ../target/aarch64-apple-darwin/release/libbreez_sdk_liquid_bindings.dylib ../target/x86_64-apple-darwin/release/libbreez_sdk_liquid_bindings.dylib
lipo -create -output ../target/darwin-universal/release/libbreez_sdk_liquid_bindings.a ../target/aarch64-apple-darwin/release/libbreez_sdk_liquid_bindings.a ../target/x86_64-apple-darwin/release/libbreez_sdk_liquid_bindings.a
## Swift
swift-ios: ios-universal
cargo run --bin uniffi-bindgen generate src/breez_sdk_liquid.udl -l swift -o ffi/swift-ios

View File

@@ -1,9 +1,3 @@
//! Uniffi bindings
#[cfg(feature = "uniffi-25")]
extern crate uniffi_25 as uniffi;
#[cfg(feature = "uniffi-28")]
extern crate uniffi_28 as uniffi;
use std::sync::Arc;
use anyhow::Result;

View File

@@ -1,4 +1,3 @@
extern crate uniffi_28 as uniffi;
use std::process::Command;
uniffi::build_foreign_language_testcases!(

View File

@@ -1,31 +1,3 @@
#[cfg(feature = "uniffi-25")]
extern crate uniffi_25 as uniffi;
#[cfg(feature = "uniffi-28")]
extern crate uniffi_28 as uniffi;
#[cfg(feature = "uniffi-25")]
extern crate uniffi_bindgen_25 as uniffi_bindgen;
#[cfg(feature = "uniffi-25")]
use camino::Utf8Path;
fn main() {
uniffi::uniffi_bindgen_main();
#[cfg(feature = "uniffi-25")]
build_kmp()
}
#[cfg(feature = "uniffi-25")]
fn build_kmp() {
let udl_file = "./src/breez_sdk_liquid.udl";
let out_dir = Utf8Path::new("ffi/kmp");
let config = Utf8Path::new("uniffi.toml");
uniffi_bindgen::generate_external_bindings(
uniffi_bindgen_kotlin_multiplatform::KotlinBindingGenerator {},
udl_file,
Some(config),
Some(out_dir),
None::<&Utf8Path>,
None,
)
.unwrap();
}

View File

@@ -1,3 +1,8 @@
# Kotlin Multi Platform https://gobley.dev/docs/bindgen#bindgen-configuration
package_name = "breez_sdk_liquid"
kotlin_targets = ["jvm", "android", "native"]
use_pascal_case_enum_class = true
# https://mozilla.github.io/uniffi-rs/swift/configuration.html
[bindings.swift]
cdylib_name = "breez_sdk_liquid_bindings"

View File

@@ -10,9 +10,6 @@ crate-type = ["lib", "cdylib", "staticlib"]
[features]
default = ["frb"]
frb = ["dep:flutter_rust_bridge"]
# Uniffi features required to build using cargo-lipo
uniffi-25 = []
uniffi-28 = []
regtest = [] # Enable regtest tests
browser-tests = [] # Enable browser wasm-pack tests
test-utils = ["sdk-common/test-utils"]