Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump uniffi to 0.25.0 #925

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
305 changes: 182 additions & 123 deletions libs/Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions libs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ resolver = "2"
version = "0.3.2"

[workspace.dependencies]
uniffi = "0.23.0"
uniffi_macros = "0.23.0"
uniffi = "0.25.0"
uniffi_bindgen = "0.25.0"
11 changes: 5 additions & 6 deletions libs/sdk-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ breez-sdk-core = { path = "../sdk-core" }
anyhow = { version = "1.0.79", features = ["backtrace"] }
thiserror = "1.0.56"
tokio = { version = "1", features = ["full"] }
uniffi = { version = "0.23.0", features = ["bindgen-tests", "cli"] }
uniffi_bindgen = "0.23.0"
uniffi_macros = "0.23.0"
uniffi-kotlin-multiplatform = { git = "https://gitlab.com/trixnity/uniffi-kotlin-multiplatform-bindings", rev = "bf48c5fcb153856e3055025a3cbfa56fbf213188" }
uniffi = { workspace = true, features = ["bindgen-tests", "cli"] }
uniffi_bindgen = { workspace = true }
uniffi_bindgen_kotlin_multiplatform = { git = "https://gitlab.com/trixnity/uniffi-kotlin-multiplatform-bindings", rev = "7e77634ceaa653716b85a1ea2a5283ebf72c9a92" }
camino = "1.1.1"
log = "*"
once_cell = "*"
Expand All @@ -34,6 +33,6 @@ tonic = { version = "^0.8", features = [
] }

[build-dependencies]
uniffi_build = { version = "0.23.0" }
uniffi_bindgen = "0.23.0"
uniffi = { workspace = true, features = ["build"] }
uniffi_bindgen = { workspace = true }
anyhow = { version = "1.0.79", features = ["backtrace"] }
2 changes: 1 addition & 1 deletion libs/sdk-bindings/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ fn setup_x86_64_android_workaround() {

fn main() -> Result<()> {
setup_x86_64_android_workaround();
uniffi_build::generate_scaffolding("./src/breez_sdk.udl").unwrap();
uniffi::generate_scaffolding("./src/breez_sdk.udl").unwrap();
Ok(())
}
4 changes: 2 additions & 2 deletions libs/sdk-bindings/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ csharp-linux: $(SOURCES)
cp ../target/$(TARGET)/release/libbreez_sdk_bindings.so ffi/csharp

golang-darwin: darwin-universal
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.1.5+v0.23.0
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.1+v0.25.0
uniffi-bindgen-go src/breez_sdk.udl -o ffi/golang -c ./uniffi.toml
cp ../target/darwin-universal/release/libbreez_sdk_bindings.dylib ffi/golang
cp -r ffi/golang/breez/breez_sdk tests/bindings/golang/

TARGET ?= aarch64-unknown-linux-gnu
golang-linux: $(SOURCES)
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.1.5+v0.23.0
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.1+v0.25.0
cargo build --release --target $(TARGET)
uniffi-bindgen-go src/breez_sdk.udl -o ffi/golang -c ./uniffi.toml
cp ../target/$(TARGET)/release/libbreez_sdk_bindings.so ffi/golang
Expand Down
4 changes: 3 additions & 1 deletion libs/sdk-bindings/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pub mod uniffi_binding;
mod uniffi_binding;

use crate::uniffi_binding::*;
2 changes: 1 addition & 1 deletion libs/sdk-bindings/src/uniffi_binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,4 +389,4 @@ fn rt() -> &'static tokio::runtime::Runtime {
&RT
}

uniffi_macros::include_scaffolding!("breez_sdk");
uniffi::include_scaffolding!("breez_sdk");
4 changes: 3 additions & 1 deletion libs/sdk-bindings/uniffi-bindgen.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use camino::Utf8Path;
use uniffi_kotlin_multiplatform::KotlinBindingGenerator;
use uniffi_bindgen_kotlin_multiplatform::KotlinBindingGenerator;

fn main() {
uniffi::uniffi_bindgen_main();
Expand All @@ -13,6 +13,8 @@ fn main() {
// None::<&Utf8Path>,
Some(config),
Some(out_dir),
None::<&Utf8Path>,
None,
)
.unwrap();
}
Loading