You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<a href="https://blog.rust-lang.org/2022/05/19/Rust-1.61.0.html"><img alt="Rustc Version 1.61.0+" src="https://img.shields.io/badge/rustc-1.61.0%2B-lightgrey.svg"/></a>
7
-
<a href="https://discord.gg/d7NkDKm"><img alt="Chat on Discord" src="https://img.shields.io/discord/753336465005608961?logo=discord"></a>
4
+
<ahref="https://github.com/bitcoindevkit/bdk-ffi/blob/master/LICENSE"><imgalt="MIT or Apache-2.0 Licensed"src="https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg"/></a>
5
+
<ahref="https://discord.gg/d7NkDKm"><imgalt="Chat on Discord"src="https://img.shields.io/discord/753336465005608961?logo=discord"></a>
8
6
</p>
9
7
10
-
## Readme
8
+
The code in this repository creates a library ready for export to other languages using [uniffi-rs] for the Rust-based [bdk_wallet] library from the [Bitcoin Dev Kit] project.
11
9
12
-
The workspace in this repository creates the `libbdkffi` multi-language library for the Rust-based
13
-
[bdk] library from the [Bitcoin Dev Kit] project.
14
-
15
-
Each supported language and the platform(s) it's packaged for has its own directory. The Rust code in this project is in the bdk-ffi directory and is a wrapper around the [bdk] library to expose its APIs in a uniform way using the [mozilla/uniffi-rs] bindings generator for each supported target language.
10
+
Each supported language (Kotlin for Android and Swift for iOS) and the platforms it's packaged for has its own directory. The Rust code in this project is in the bdk-ffi directory and is a wrapper around the [bdk_wallet] library to expose its APIs in a uniform way using the [mozilla/uniffi-rs] bindings generator for each supported target language.
16
11
17
12
## Supported target languages and platforms
18
13
19
-
The below directories (a separate repository in the case of bdk-swift) include instructions for using, building, and publishing the native language binding for [bdk] supported by this project.
14
+
The below directories include instructions for building and using the language binding for [bdk_wallet] supported by this project.
20
15
21
16
| Language | Platform | Published Package | Building Documentation | API Docs |
| Kotlin | JVM |[bdk-jvm]|[Readme bdk-jvm]|[Kotlin JVM API Docs]|
24
18
| Kotlin | Android |[bdk-android]|[Readme bdk-android]|[Android API Docs]|
25
19
| Swift | iOS, macOS |[bdk-swift]|[Readme bdk-swift]||
26
20
27
21
## Other supported languages maintained in separate repositories
28
22
29
23
The `bdk-ffi` codebase in this repository can be used to produce language bindings for more than Swift and Kotlin. Some of these require the use of uniffi 3rd party plugins and some not. Below are some of the libraries that use the bdk-ffi API, but are maintained separately. Refer to their individual READMEs for information on their state of production-readiness.
30
24
31
-
| Language | Platform | Published Package | Building Documentation | API Docs |
| Python | Linux, macOS, Windows |[bdk-python (PyPI)]|[bdk-python]||
34
29
35
30
## Building and testing the libraries
36
31
37
-
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](https://just.systems/) 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 `justfile`s, for example:
32
+
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](https://just.systems/) 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:
33
+
38
34
```sh
39
35
cd bdk-android
40
-
41
36
just build
42
-
just offlinetests
43
-
just publishlocal
37
+
just test
38
+
just publish-local
44
39
```
45
40
46
-
## Minimum Supported Rust Version (MSRV)
47
-
48
-
This library should compile with any combination of features with Rust 1.85.1.
49
-
50
41
## Contributing
51
42
52
43
To add new structs and functions, see the [UniFFI User Guide](https://mozilla.github.io/uniffi-rs/) and the [uniffi-examples](https://thunderbiscuit.github.io/uniffi-examples/) repository.
@@ -59,48 +50,6 @@ To add new structs and functions, see the [UniFFI User Guide](https://mozilla.gi
_Note:_ We also publish snapshot versions of bdk-jvm and bdk-android. See the specific readmes for instructions on how to use those.
89
-
90
-
### bdkpython
91
-
92
-
```shell
93
-
pip3 install bdkpython
94
-
```
95
-
96
-
### BitcoinDevKit (Swift)
97
-
98
-
Add `BitcoinDevKit` to your dependencies in XCode.
99
-
100
-
## Developing language bindings using uniffi-rs
101
-
102
-
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](https://github.com/thunderbiscuit/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.
103
-
104
53
## Verifying Signatures
105
54
106
55
Both libraries and all their corresponding artifacts are signed with a PGP key you can find in the
0 commit comments