bitcoindevkit / bitcoindevkit/bdk-ffi
Write `Display` and `Debug` traits for uniffi Records and Enums
- Dominant language
- Rust
- Stars
- 127
- Forks
- 81
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 5
Description
This is now available as of uniffi-rs 0.30.0.
Note that it doesn't work on pure enums, and only on enums that hold data (the ones that get transformed into sealed classes in Kotlin).
Notes:
- Both Debug and Display will generate the `toString()` method in Kotlin, with the Display taking precedence over Debug if it exists.
- The Debug will generate the `__repr__` and the Display will generate `__str__` methods in Python.
- Swift? I need to test.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by checking the uniffi-rs 0.30.0 behavior described in the issue for Records and data-holding Enums. Verify generated Kotlin toString(), Python __repr__ and __str__, and Swift output; done would require confirming the expected trait precedence and determining whether pure enums remain unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, python, rust, swift
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100