Inspiration
I love writing in Rust, but user interfaces are best built with native toolkits. With BDK and FFI we can have the best of both worlds.
Thunderbiscuit's BDK talk yesterday demonstrated his Android Bitcoin wallet based on BDK's original FFI bindings. Unfortunately, the iOS version is far behind on aesthetics and functionality.
What it does
Our wallet brings the iOS wallet to aesthetic parity and near feature-parity with the Android version. We also beat Thunderbiscuit to adding QR code scanning functionality.
How we built it
BDK is a "A modern, lightweight, descriptor-based wallet library written in Rust!" with a whole toolset for writing an industrial grade Bitcoin wallet in Rust.
The project has some new almost-ready-for-the-public FFI bindings that expose a huge portion of the library to developers writing in languages like Swift and Kotlin (and eventually Python as well) which makes iOS and Android development possible.
@futurepaul was responsible for rebuilding Thunderbiscuit's Android UI in SwiftUI. @konjoinfinity was responsible for QR code scanning and display, and integration / compilation of the project
Challenges we ran into
Because the FFI bindings aren't quite ready, we ran into some frustrating build issues, especially on M1 Macs. We communicated with BDK maintainers about these problems which they're aware of. Smoothing out some of these build issues will be a big part of making BDK (a somewhat obscure Rust library) into an easy-to-use library for Swift developers without them needing to learn all about Rust build systems.
Accomplishments that we're proud of
@futurepaul learned SwiftUI for this project. @konjoinfinity transferring Javascript skills over to native Swift development
Our proudest accomplishment is that this work turned into a pretty nice pull request into the BDK FFI project.
What we learned
Patience with compilers.
What's next for BDK Wallet for iOS
@konjoinfinity hopes the BDK team can use this contribution as a jumping off point @futurepaul looks forward to working with more of the BDK / Swift logic instead of just staying at the UI level
Log in or sign up for Devpost to join the conversation.