Skip to content

Conversation

@reez
Copy link
Collaborator

@reez reez commented Oct 14, 2025

Description

Testing uniffi 0.30.0

Two changes:
0. bumping to 0.30.0

  1. export Ord trait so swift and kotlin now treat them as comparable value types

Notes to the reviewers

Tested out this other thing along the way but didn't work
2. (breaking! but potentially awesome) convert HashableOutPoint from an object to a record "Enums and Records can have methods" compiles but exporting our own methods on a record fails in bindgen step

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 deps(experimental): uniffi 0.30.0 (draft)deps(experimental): uniffi 0.30.0 Oct 14, 2025
@reez
Copy link
Collaborator Author

reez commented Oct 14, 2025

@thunderbiscuit + @ItoroD this is just a draft/experiment on 2 new things in uniffi 0.30.0

@reez reez mentioned this pull request Oct 21, 2025
@thunderbiscuit
Copy link
Member

thunderbiscuit commented Nov 12, 2025

We can probably do this bump to 0.30.0 now that 2.2.0 is released. It just needs a rebase and a clear vision for the Ord + Hashable stuff.

We can then figure out if the new Display on the Errors is a breaking change (I don't actually think it is?), but that can come in a separate PR.

@reez reez changed the title (draft)deps(experimental): uniffi 0.30.0 deps: uniffi 0.30.0 Nov 12, 2025
@reez
Copy link
Collaborator Author

reez commented Nov 12, 2025

We can probably do this bump to 0.30.0 now that 2.2.0 is released. It just needs a rebase and a clear vision for the Ord + Hashable stuff.

We can then figure out if the new Display on the Errors is a breaking change (I don't actually think it is?), but that can come in a separate PR.

ok so 2 commits now, one just bumping to 0.30.0, and the other (which we can keep in this pr or spin out into another pr, whatever is cool w me) is relating to the ord+hashable stuff.

in that second commit 9fa0fa0 I'm applying it for BlockHash, Txid, Wtxid, DescriptorId, and TxMerkleNode

Before this BDK iOS app would have had to compare txids indirectly lhs.outpoint.txid.description < rhs.outpoint.txid.description or doing a manual Comparable extension, (id assume Kotilin is somewhat "comparable" to swift).

But after this change the generated Swift bindings now declare those types as Comparable, so i can sort UTXOs directly with lhs.outpoint.txid < rhs.outpoint.txid https://github.com/bitcoindevkit/BDKSwiftExampleWallet/pull/334/files#diff-53a4180956cd49d7d1972a362feac43ba63abe4268a7d5aa6d99456554c64662 (I used locally generated swift bindings form this branch to test) without the string/hex workaround which tidy's up the code.

Copy link
Member

@thunderbiscuit thunderbiscuit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9fa0fa0.

@reez reez merged commit 94d9a3f into bitcoindevkit:master Nov 13, 2025
6 checks passed
@reez reez deleted the thirty branch November 13, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants