f3c6d97d818788abf562d116745effca3c734c9b Add license files (Steve Myers) d17ea4b90c015c9a6cf5d2cf2f77e901d93fd089 Bump version to 0.3.0 (Steve Myers) 76fa9b95219945c8b92186c860e83270d0e95842 Add CHANGELOG.md (Steve Myers) Pull request description: This issue is based on https://github.com/bitcoindevkit/bdk/issues/301, to be clear we should add license files to all our repositories. If you're on the below list and agree with this change please add a comment with "I hereby license my previous contributions to BDK under [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/) and [MIT](https://choosealicense.com/licenses/mit/) licenses." - [x] @artfuldev - [x] @notmandatory - [x] @afilini - [x] @thunderbiscuit Top commit has no ACKs. Tree-SHA512: 7e0f2c7bf93d1cdb28cec979330790e00c1efd3ce80986e9084bc371fa73eda6413014e3ad8e598ca6ce1f797622dbfbe8339453de8d7ebefbb27fd5204bc4c6
Native language bindings for BDK
This repository contains source code for generating native language bindings for the rust based bdk library which is the central artifact of the Bitcoin Dev Kit project.
Each supported language has it's own repository that includes this project as a git submodule. The rust code in this project is a wrapper around the bdk library to expose it's APIs in a uniform way using the mozilla/uniffi-rs bindings generator for each supported target language.
Supported target languages and platforms
The below repositories include instructions for using, building, and publishing the native language binding for bdk supported by this project.
Language | Platform | Repository |
---|---|---|
Kotlin | jvm | bdk-kotlin |
Kotlin | android | bdk-kotlin |
Swift | iOS, macOS | bdk-swift |
Python | linux, macOS | bdk-python |
Contributing
Install uniffi-bindgen cli tool
Install the uniffi-bindgen binary on your system using:
cargo install uniffi_bindgen
The version must be the same as the uniffi
dependency in Cargo.toml
.
Adding new structs and functions
See the UniFFI User Guide
For pass by value objects
- create new rust struct with only fields that are supported UniFFI types
- update mapping
bdk.udl
file with newdictionary
For pass by reference values
- create wrapper rust struct/impl with only fields that are
Sync + Send
- update mapping
bdk.udl
file with newinterface
Goals
- Language bindings should feel idiomatic in target languages/platforms
- Adding new targets should be easy
- Getting up and running should be easy
- Contributing should be easy
- Get it right, then automate
Thanks
This project is made possible thanks to the wonderful work by the mozilla/uniffi-rs team.