diff --git a/libs/Cargo.lock b/libs/Cargo.lock index a9c8393ec..b3d07dd46 100644 --- a/libs/Cargo.lock +++ b/libs/Cargo.lock @@ -112,6 +112,54 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.79" @@ -135,24 +183,28 @@ checksum = "5b8a30a44e99a1c83ccb2a6298c563c888952a1c9134953db26876528f84c93a" [[package]] name = "askama" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb98f10f371286b177db5eeb9a6e5396609555686a35e1d4f7b9a9c6d8af0139" +checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28" dependencies = [ "askama_derive", "askama_escape", - "askama_shared", ] [[package]] name = "askama_derive" -version = "0.11.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87bf87e6e8b47264efa9bde63d6225c6276a52e05e91bf37eaa8afd0032d6b71" +checksum = "19fe8d6cb13c4714962c072ea496f3392015f0989b1a2847bb4b2d9effd71d83" dependencies = [ - "askama_shared", + "askama_parser", + "basic-toml", + "mime", + "mime_guess", "proc-macro2", - "syn 1.0.109", + "quote", + "serde", + "syn 2.0.48", ] [[package]] @@ -162,20 +214,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" [[package]] -name = "askama_shared" -version = "0.12.2" +name = "askama_parser" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf722b94118a07fcbc6640190f247334027685d4e218b794dbfe17c32bf38ed0" +checksum = "acb1161c6b64d1c3d83108213c2a2533a342ac225aabd0bda218278c2ddb00c0" dependencies = [ - "askama_escape", - "mime", - "mime_guess", "nom", - "proc-macro2", - "quote", - "serde", - "syn 1.0.109", - "toml", ] [[package]] @@ -355,6 +399,15 @@ version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +[[package]] +name = "basic-toml" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" +dependencies = [ + "serde", +] + [[package]] name = "bech32" version = "0.9.1" @@ -571,10 +624,8 @@ dependencies = [ "tokio", "tonic", "uniffi", - "uniffi-kotlin-multiplatform", "uniffi_bindgen", - "uniffi_build", - "uniffi_macros", + "uniffi_bindgen_kotlin_multiplatform", ] [[package]] @@ -715,42 +766,43 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.25" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ - "atty", - "bitflags 1.3.2", + "clap_builder", "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", "clap_lex", - "indexmap 1.9.3", - "once_cell", - "strsim", - "termcolor", - "textwrap", + "strsim 0.11.1", ] [[package]] name = "clap_derive" -version = "3.2.25" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ - "heck", - "proc-macro-error", + "heck 0.5.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "cln-grpc" @@ -767,6 +819,12 @@ dependencies = [ "tonic-build", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "colored" version = "2.0.4" @@ -879,7 +937,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", "syn 2.0.48", ] @@ -1411,6 +1469,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -2018,6 +2082,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[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.0" @@ -2078,12 +2148,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - [[package]] name = "parking_lot" version = "0.12.1" @@ -2272,30 +2336,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" version = "1.0.78" @@ -2322,7 +2362,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools", "lazy_static", "log", @@ -2790,9 +2830,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.193" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -2822,9 +2862,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", @@ -2988,6 +3028,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.25.0" @@ -3000,7 +3046,7 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -3081,12 +3127,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.56" @@ -3469,63 +3509,65 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "uniffi" -version = "0.23.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71cc01459bc34cfe43fabf32b39f1228709bc6db1b3a664a92940af3d062376" +checksum = "21345172d31092fd48c47fd56c53d4ae9e41c4b1f559fb8c38c1ab1685fd919f" dependencies = [ "anyhow", "camino", "clap", "uniffi_bindgen", + "uniffi_build", "uniffi_core", "uniffi_macros", ] [[package]] -name = "uniffi-kotlin-multiplatform" -version = "0.1.0" -source = "git+https://gitlab.com/trixnity/uniffi-kotlin-multiplatform-bindings?rev=bf48c5fcb153856e3055025a3cbfa56fbf213188#bf48c5fcb153856e3055025a3cbfa56fbf213188" +name = "uniffi_bindgen" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd992f2929a053829d5875af1eff2ee3d7a7001cb3b9a46cc7895f2caede6940" dependencies = [ "anyhow", "askama", "camino", - "heck", - "include_dir", + "cargo_metadata", + "clap", + "fs-err", + "glob", + "goblin", + "heck 0.4.1", + "once_cell", "paste", "serde", "toml", - "uniffi_bindgen", + "uniffi_meta", + "uniffi_testing", + "uniffi_udl", ] [[package]] -name = "uniffi_bindgen" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbbba5103051c18f10b22f80a74439ddf7100273f217a547005d2735b2498994" +name = "uniffi_bindgen_kotlin_multiplatform" +version = "0.1.0" +source = "git+https://gitlab.com/trixnity/uniffi-kotlin-multiplatform-bindings?rev=7e77634ceaa653716b85a1ea2a5283ebf72c9a92#7e77634ceaa653716b85a1ea2a5283ebf72c9a92" dependencies = [ "anyhow", "askama", - "bincode", "camino", - "fs-err", - "glob", - "goblin", - "heck", - "once_cell", + "clap", + "heck 0.4.1", + "include_dir", "paste", "serde", - "serde_json", "toml", - "uniffi_meta", - "uniffi_testing", - "weedle2", + "uniffi_bindgen", ] [[package]] name = "uniffi_build" -version = "0.23.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1a28368ff3d83717e3d3e2e15a66269c43488c3f036914131bb68892f29fb" +checksum = "001964dd3682d600084b3aaf75acf9c3426699bc27b65e96bb32d175a31c74e9" dependencies = [ "anyhow", "camino", @@ -3534,35 +3576,35 @@ dependencies = [ [[package]] name = "uniffi_checksum_derive" -version = "0.23.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03de61393a42b4ad4984a3763c0600594ac3e57e5aaa1d05cede933958987c03" +checksum = "55137c122f712d9330fd985d66fa61bdc381752e89c35708c13ce63049a3002c" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "uniffi_core" -version = "0.23.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2b4852d638d74ca2d70e450475efb6d91fe6d54a7cd8d6bd80ad2ee6cd7daa" +checksum = "6121a127a3af1665cd90d12dd2b3683c2643c5103281d0fed5838324ca1fad5b" dependencies = [ "anyhow", "bytes", "camino", - "cargo_metadata", "log", "once_cell", + "oneshot-uniffi", "paste", "static_assertions", ] [[package]] name = "uniffi_macros" -version = "0.23.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa03394de21e759e0022f1ea8d992d2e39290d735b9ed52b1f74b20a684f794e" +checksum = "11cf7a58f101fcedafa5b77ea037999b88748607f0ef3a33eaa0efc5392e92e4" dependencies = [ "bincode", "camino", @@ -3571,7 +3613,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 1.0.109", + "syn 2.0.48", "toml", "uniffi_build", "uniffi_meta", @@ -3579,28 +3621,39 @@ dependencies = [ [[package]] name = "uniffi_meta" -version = "0.23.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fdab2c436aed7a6391bec64204ec33948bfed9b11b303235740771f85c4ea6" +checksum = "71dc8573a7b1ac4b71643d6da34888273ebfc03440c525121f1b3634ad3417a2" dependencies = [ - "serde", + "anyhow", + "bytes", "siphasher", "uniffi_checksum_derive", ] [[package]] name = "uniffi_testing" -version = "0.23.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92b0570953ec41d97ce23e3b92161ac18231670a1f97523258a6d2ab76d7f76c" +checksum = "118448debffcb676ddbe8c5305fb933ab7e0123753e659a71dc4a693f8d9f23c" dependencies = [ "anyhow", "camino", "cargo_metadata", "fs-err", "once_cell", - "serde", - "serde_json", +] + +[[package]] +name = "uniffi_udl" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "889edb7109c6078abe0e53e9b4070cf74a6b3468d141bdf5ef1bd4d1dc24a1c3" +dependencies = [ + "anyhow", + "uniffi_meta", + "uniffi_testing", + "weedle2", ] [[package]] @@ -3636,6 +3689,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "1.6.1" diff --git a/libs/Cargo.toml b/libs/Cargo.toml index ecdc33448..6ccbf07b0 100644 --- a/libs/Cargo.toml +++ b/libs/Cargo.toml @@ -16,5 +16,5 @@ resolver = "2" version = "0.3.2" [workspace.dependencies] -uniffi = "0.23.0" -uniffi_macros = "0.23.0" \ No newline at end of file +uniffi = "0.25.0" +uniffi_bindgen = "0.25.0" \ No newline at end of file diff --git a/libs/sdk-bindings/Cargo.toml b/libs/sdk-bindings/Cargo.toml index 0fbecaf69..0ae8c4ca0 100644 --- a/libs/sdk-bindings/Cargo.toml +++ b/libs/sdk-bindings/Cargo.toml @@ -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 = "*" @@ -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"] } diff --git a/libs/sdk-bindings/build.rs b/libs/sdk-bindings/build.rs index f33f22504..972c6d6ea 100644 --- a/libs/sdk-bindings/build.rs +++ b/libs/sdk-bindings/build.rs @@ -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(()) } diff --git a/libs/sdk-bindings/makefile b/libs/sdk-bindings/makefile index 26a578390..8a653629a 100644 --- a/libs/sdk-bindings/makefile +++ b/libs/sdk-bindings/makefile @@ -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 diff --git a/libs/sdk-bindings/src/lib.rs b/libs/sdk-bindings/src/lib.rs index 0a9192514..4bd2a3603 100644 --- a/libs/sdk-bindings/src/lib.rs +++ b/libs/sdk-bindings/src/lib.rs @@ -1 +1,3 @@ -pub mod uniffi_binding; +mod uniffi_binding; + +use crate::uniffi_binding::*; diff --git a/libs/sdk-bindings/src/uniffi_binding.rs b/libs/sdk-bindings/src/uniffi_binding.rs index a9bcf30bb..4ff88ec29 100644 --- a/libs/sdk-bindings/src/uniffi_binding.rs +++ b/libs/sdk-bindings/src/uniffi_binding.rs @@ -389,4 +389,4 @@ fn rt() -> &'static tokio::runtime::Runtime { &RT } -uniffi_macros::include_scaffolding!("breez_sdk"); +uniffi::include_scaffolding!("breez_sdk"); diff --git a/libs/sdk-bindings/uniffi-bindgen.rs b/libs/sdk-bindings/uniffi-bindgen.rs index 4676052a9..2a535399d 100644 --- a/libs/sdk-bindings/uniffi-bindgen.rs +++ b/libs/sdk-bindings/uniffi-bindgen.rs @@ -1,5 +1,5 @@ use camino::Utf8Path; -use uniffi_kotlin_multiplatform::KotlinBindingGenerator; +use uniffi_bindgen_kotlin_multiplatform::KotlinBindingGenerator; fn main() { uniffi::uniffi_bindgen_main(); @@ -13,6 +13,8 @@ fn main() { // None::<&Utf8Path>, Some(config), Some(out_dir), + None::<&Utf8Path>, + None, ) .unwrap(); }