Skip to content

iOS/MacOS and Android bindings for BBQr library using uniFFI

License

Notifications You must be signed in to change notification settings

bitcoinppl/bbqr-ffi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Native language bindings for BBQr

Apache-2.0 Licensed

Readme

The workspace in this repository creates the libbbqrffi multi-language library for the Rust-based bbqr library.

Each supported language and the platform(s) it's packaged for has its own directory. The Rust code in this project is in the bbqr-ffi directory and is a wrapper around the bbqr library to expose its APIs in a uniform way using the mozilla/uniffi-rs bindings generator for each supported target language.

Supported target languages and platforms

The below directories (a separate repository in the case of bdk-swift) include instructions for using, building, and publishing the native language binding for bbqr.

Language Platform Published Package Building Documentation API Docs
Swift iOS, macOS bbqr-swift (GitHub) README bbqr-swift
Kotlin Android bbqr-android (Central Maven) README bbqr-android

Example Apps:

Building and Testing the Libraries

If you are familiar with the build tools for the specific languages you wish to build the libraries for, you can use their normal build/test workflows. We also include some just files to simplify the work across different languages. If you have the just tool installed on your system, you can simply call the commands defined in the justfiles, for example:

cd bbqr-swift
just build

Minimum Supported Rust Version (MSRV)

This library should compile with any combination of features with Rust 1.78.0.

Contributing

To add new structs and functions, see the UniFFI User Guide and the uniffi-examples repository.

Developing language bindings using uniffi-rs

If you are interested in better understanding the base structure we use here in order to build your own Rust-to-Kotlin/Swift/Python language bindings, check out the uniffi-bindings-template repository. We maintain it as an example and starting point for other projects that wish to leverage the tech stack used in producing the BDK language bindings.

Thanks