Skip to content

Comments

(draft)fix: swift bindings ffi setup#33

Closed
reez wants to merge 1 commit intobitcoindevkit:masterfrom
reez:bind
Closed

(draft)fix: swift bindings ffi setup#33
reez wants to merge 1 commit intobitcoindevkit:masterfrom
reez:bind

Conversation

@reez
Copy link
Collaborator

@reez reez commented May 1, 2025

Description

A bunch of changes since #25 that were awesome but swift bindings needed to catch up to them.

#28 solved getting framework to build.

This PR hopefully solves making the framework usable in iOS app again and clean up any unnecessary lines of code.

Tested in iOS app project

Screenshot 2025-05-01 at 10 19 00 AM

Notes to the reviewers

Add --features uniffi to cargo build commands:
Enables the uniffi feature during compilation of each static library to ensure the necessary FFI shim functions defined via #[uniffi::export] are included, fixing linker errors.

Use --manifest-path in uniffi-bindgen:
Generates Swift bindings directly from the Rust crate's Cargo.toml and source code, instead of inspecting a pre-compiled library artifact.

Remove mv commands for headers:
Deletes outdated commands that failed because they tried to move header files based on the previous .udl setup, which are no longer needed as xcodebuild finds the headers correctly elsewhere.

Changelog notice

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@reez reez changed the title fix: swift bindings ffi setup (draft)fix: swift bindings ffi setup May 1, 2025
@reez reez closed this May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant