(draft)deps(experimental): uniffi 0.30.0
Description
Testing uniffi 0.30.0
Two changes:
- export Ord trait so swift and kotlin now treat them as comparable value types
- ~(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
Notes to the reviewers
Changelog notice
Checklists
All Submissions:
- [x] I've signed all my commits
- [x] I followed the contribution guidelines
- [ ] I ran
cargo fmtandcargo clippybefore 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
@thunderbiscuit + @ItoroD this is just a draft/experiment on 2 new things in uniffi 0.30.0
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.
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 9fa0fa0f7de34378623e24284cae85e6c77a5946 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.