Skip to content

Conversation

chavic
Copy link

@chavic chavic commented Sep 22, 2025

Work in Progress

Description

This Draft PR tracks the work on introducing Dart bindings and pins the uniffi-dart dependency to the chavic/map-types-fix branch while fixing the generated Dart bindings is still going on. Currently, the generator is dropping types and is still investigating why 🤔

What changed

  • Point uniffi-dart to branch = "chavic/map-types-fix" in bdk-ffi/Cargo.toml for both dependencies and build-dependencies.
  • Update bdk-dart/scripts/generate_bindings.sh to:
    • Write Dart bindings to bdk-dart/lib/
    • Output the macOS fat library to bdk-dart/libbdkffi.dylib
  • Regenerated bindings to confirm the flow; Cargo.lock updated accordingly.

How I tested

  • Ran:
    cd bdk-dart
    ./scripts/generate_bindings.sh
  • Observed:
    • bdk-dart/lib/bdk.dart created and formatted
    • bdk-dart/libbdkffi.dylib built as a macOS universal (fat) binary
    • No build errors;
  • dart test from bdk-dart/ currently failing (work in progress).

Notes to the reviewers

  • This pins to a temporary branch to pick up fixes; once upstream merges/releases, we can point back to a tagged release or default branch.

Changelog notice

  • Changed: Pin uniffi-dart to chavic/map-types-fix to fix Dart types.
  • Changed: Dart bindings and native libs now output to bdk-dart/.

@thunderbiscuit
Copy link
Member

Awesome stuff @chavic! I'm wondering if you know about the new reez/bdk-dart library. This would be the eventual home for bdk-dart (we will not host other languages/libraries than the Swift/Android ones in this particular repository, and are instead promoting separate repos as shown in bdk-jvm and bdk-python. These libraries (including the bdk-dart one) use a submodule for bdk-ffi, so feel free to PR your changes to the bdk-ffi/bdk-ffi directory here and we can merge under a special branch. This would allow you to update the submodule in bdk-dart, and then PR the rest of the code changes here on that repo so it could eventually be merged and tested!

@chavic
Copy link
Author

chavic commented Sep 22, 2025

Awesome stuff @chavic! I'm wondering if you know about the new reez/bdk-dart library. This would be the eventual home for bdk-dart (we will not host other languages/libraries than the Swift/Android ones in this particular repository, and are instead promoting separate repos as shown in bdk-jvm and bdk-python. These libraries (including the bdk-dart one) use a submodule for bdk-ffi, so feel free to PR your changes to the bdk-ffi/bdk-ffi directory here and we can merge under a special branch. This would allow you to update the submodule in bdk-dart, and then PR the rest of the code changes here on that repo so it could eventually be merged and tested!

😅 I found out today... Will be moving my work over to that repo...

@thunderbiscuit
Copy link
Member

Yep sorry man I replied as I was going down my list of notifications but I notice I sort of cross-posted the same stuff explained by @reez on the bdk-flutter repo...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants