From eb90491e949be28abef4c9d896abc9ff1f83fffe Mon Sep 17 00:00:00 2001 From: spacebear Date: Thu, 26 Feb 2026 21:38:01 -0500 Subject: [PATCH] Switch to upstream uniffi-bindgen-react-native The upstream repo (jhugman/uniffi-bindgen-react-native) merged uniffi 0.30 support in PR #343, so we no longer need the fork. - Point dependency at upstream main (pinned to 93bed37) - Add uniffi_core 0.30 with wasm-unstable-single-threaded feature to wasm-manifest-patch.toml, since upstream's runtime crate hasn't enabled it yet and uniffi_core 0.30 requires it for wasm32 builds --- payjoin-ffi/javascript/package-lock.json | 4 ++-- payjoin-ffi/javascript/package.json | 2 +- payjoin-ffi/javascript/wasm-manifest-patch.toml | 10 +++++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/payjoin-ffi/javascript/package-lock.json b/payjoin-ffi/javascript/package-lock.json index 914d86a0c..1ce585b0b 100644 --- a/payjoin-ffi/javascript/package-lock.json +++ b/payjoin-ffi/javascript/package-lock.json @@ -11,7 +11,7 @@ "prettier": "^3.6.2", "tsx": "^4.20.6", "typescript": "^5.9.3", - "uniffi-bindgen-react-native": "github:spacebear21/uniffi-bindgen-react-native#update-uniffi-0.30-wasm" + "uniffi-bindgen-react-native": "github:jhugman/uniffi-bindgen-react-native#93bed377c6e0b5cd7afd3fb7ee0d7211d5f294c5" } }, "node_modules/@esbuild/aix-ppc64": { @@ -588,7 +588,7 @@ }, "node_modules/uniffi-bindgen-react-native": { "version": "0.29.3-1", - "resolved": "git+ssh://git@github.com/spacebear21/uniffi-bindgen-react-native.git#e2225d22d9e3246057abba59cc8ca24a038ba01c", + "resolved": "git+ssh://git@github.com/jhugman/uniffi-bindgen-react-native.git#93bed377c6e0b5cd7afd3fb7ee0d7211d5f294c5", "dev": true, "license": "MPL-2.0", "bin": { diff --git a/payjoin-ffi/javascript/package.json b/payjoin-ffi/javascript/package.json index 5b515cc49..9c0d3469e 100644 --- a/payjoin-ffi/javascript/package.json +++ b/payjoin-ffi/javascript/package.json @@ -29,7 +29,7 @@ "prettier": "^3.6.2", "tsx": "^4.20.6", "typescript": "^5.9.3", - "uniffi-bindgen-react-native": "github:spacebear21/uniffi-bindgen-react-native#update-uniffi-0.30-wasm" + "uniffi-bindgen-react-native": "github:jhugman/uniffi-bindgen-react-native#93bed377c6e0b5cd7afd3fb7ee0d7211d5f294c5" }, "repository": { "type": "git", diff --git a/payjoin-ffi/javascript/wasm-manifest-patch.toml b/payjoin-ffi/javascript/wasm-manifest-patch.toml index ee54c449d..cf63fc014 100644 --- a/payjoin-ffi/javascript/wasm-manifest-patch.toml +++ b/payjoin-ffi/javascript/wasm-manifest-patch.toml @@ -9,9 +9,17 @@ # the library and CLI versions causes "unreachable" panics at runtime. wasm-bindgen = "=0.2.108" +# uniffi_core 0.30 requires this feature for wasm32 builds to remove the +# Send bound on futures, which is not applicable in single-threaded WASM. +[dependencies.uniffi_core] +version = "0.30" +default-features = false +features = ["wasm-unstable-single-threaded"] + [patch.crates-io] payjoin = { path = "../../../../payjoin" } payjoin-directory = { path = "../../../../payjoin-directory" } payjoin-test-utils = { path = "../../../../payjoin-test-utils" } -# This patch is required due to the hardcoded 0.29 dependency in uniffi-bindgen-react-native's Cargo.toml. Once they publish the 0.30 package we shouldn't need this anymore. +# uniffi-runtime-javascript is not yet published with uniffi_core 0.30 support. +# This path patch lets cargo resolve it from the installed npm package. uniffi-runtime-javascript = { path = "../../node_modules/uniffi-bindgen-react-native/crates/uniffi-runtime-javascript" }