Skip to content

Commit

Permalink
Revert "ffi: remove arg from uniffi::setup_scaffolding macro"
Browse files Browse the repository at this point in the history
Removing the `nostr_sdk` arg from `uniffi::setup_scaffolding` caused issues with Swift Bindings, so revert commit 64c592a

Fixes rust-nostr/nostr-sdk-swift#3

Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
yukibtc committed Nov 16, 2024
1 parent 6ed72cb commit 798f485
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Empty file.
2 changes: 1 addition & 1 deletion bindings/nostr-sdk-ffi/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ darwin-universal: swift-deps
assemble-swift-package:
mkdir -p swift/Sources/NostrSDK
cargo run -p uniffi-bindgen generate --library ../../target/aarch64-apple-ios/release/libnostr_sdk_ffi.a --no-format --language swift --out-dir swift/Sources/NostrSDK
mv swift/Sources/NostrSDK/nostr_sdk_ffi.swift swift/Sources/NostrSDK/NostrSDK.swift
mv swift/Sources/NostrSDK/nostr_sdk.swift swift/Sources/NostrSDK/NostrSDK.swift
cp swift/Sources/NostrSDK/nostr_sdkFFI.h swift/nostr_sdkFFI.xcframework/ios-arm64/nostr_sdkFFI.framework/Headers
cp swift/Sources/NostrSDK/nostr_sdkFFI.h swift/nostr_sdkFFI.xcframework/ios-arm64_x86_64-simulator/nostr_sdkFFI.framework/Headers
cp swift/Sources/NostrSDK/nostr_sdkFFI.h swift/nostr_sdkFFI.xcframework/macos-arm64_x86_64/nostr_sdkFFI.framework/Headers
Expand Down
2 changes: 1 addition & 1 deletion bindings/nostr-sdk-ffi/python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ libnostr_sdk_ffi.dylib

*.swp

src/nostr-sdk/nostr_sdk_ffi.py
src/nostr-sdk/nostr_sdk.py
src/nostr-sdk/*.so
*.whl
build/
Expand Down
4 changes: 2 additions & 2 deletions bindings/nostr-sdk-ffi/python/src/nostr-sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from nostr_sdk.nostr_sdk_ffi import *
from nostr_sdk.nostr_sdk_ffi import uniffi_set_event_loop
from nostr_sdk.nostr_sdk import *
from nostr_sdk.nostr_sdk import uniffi_set_event_loop
4 changes: 3 additions & 1 deletion bindings/nostr-sdk-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ impl NostrLibrary {
}
}

uniffi::setup_scaffolding!();
// Changes to this arg will break binding packages (in particular Swift).
// If this is removed, make sure to update `uniffi.toml`
uniffi::setup_scaffolding!("nostr_sdk");

0 comments on commit 798f485

Please sign in to comment.