@@ -35,16 +35,15 @@ In order to generate these bindings from scratch, you will need to clone two dep
35
35
36
36
** rust-lightning** , (a specific branch built for bindings compatibility)
37
37
``` shell
38
- git clone --branch 2021-03- java-bindings-base https://github.com/TheBlueMatt/rust-lightning /path/to/rust-lightning
38
+ git clone --branch 2022-06-108- java-bindings https://github.com/TheBlueMatt/rust-lightning /path/to/rust-lightning
39
39
```
40
40
41
41
** ldk-c-bindings**
42
42
``` shell
43
- git clone https://github.com/lightningdevkit/ldk-c-bindings /path/to/ldk-c-bindings
43
+ git clone --branch v0.0.108.2 https://github.com/lightningdevkit/ldk-c-bindings /path/to/ldk-c-bindings
44
44
```
45
45
46
46
Take note of where you clone these directories, it's best you save the absolute path somewhere handy for the rest of the remaining steps.
47
-
48
47
### Generating Rust-to-C-bindings
49
48
50
49
Now, navigate to the ` ldk-c-bindings ` directory and run the ` genbindings.sh ` script:
@@ -93,7 +92,7 @@ Take that commit hash and replace the `xxx` instances with it.
93
92
To generate the Swift files, navigate to the ` ldk-swift ` repository and run the following:
94
93
95
94
``` shell
96
- export LDK_SWIFT_GENERATOR_INPUT_HEADER_PATH=" $( pwd ) /path/to/ldk-c-bindings/lightning-c-bindings/include/lightning.h"
95
+ export LDK_SWIFT_GENERATOR_INPUT_HEADER_PATH=" /path/to/ldk-c-bindings/lightning-c-bindings/include/lightning.h"
97
96
python3 ./
98
97
```
99
98
@@ -102,15 +101,15 @@ Now, the contents of the `bindings/LDK` folder will have been completely regener
102
101
### Configuring Xcode for Framework Compilation
103
102
Go to the ` xcode ` folder and open ` LDKFramework.xcworkspace ` .
104
103
105
- Then, navigate to the "LDKFramework" project and click on the LDKFramework target:
104
+ Then, navigate to the "LDKFramework" project and click on the LDKFramework project target:
106
105
![ ] ( https://user-images.githubusercontent.com/5944973/175575527-97073a18-76fc-4ab0-928f-d40ac643e607.png )
107
106
108
- Search for "LDK_DIRECTORY" :
109
- ![ ] ( https://user-images.githubusercontent.com/5944973/175575621-38224096-4baa-44cc-8345-ec2b871fcbe6 .png )
107
+ Search for ` LDK_C_BINDINGS_BASE ` :
108
+ ![ ] ( https://user-images.githubusercontent.com/5944973/177420117-bcf7fc32-b07d-440f-84d1-fe2d373c355b .png )
110
109
111
- Here, enter the absolute path you to ldk-c-bindings you saved above .
110
+ Here, enter the absolute path, pointing to your ` ldk-c-bindings ` .
112
111
113
- Now, do the same for the "LDKFramework_Mac" target .
112
+ You will now also have to do the same for ` LDK_C_BINDINGS_BINARY_DIRECTORY ` , and enter any directory you wish. We like to use just ` bin/ ` .
114
113
115
114
#### Generating the * .xcframework files
116
115
0 commit comments