bitcoindevkit / bdk-ffi

Please consider this project *experimental*.
Other
94 stars 45 forks source link

LDK Node + BDK #620

Open reez opened 2 weeks ago

reez commented 2 weeks ago

Describe the bug

i've just updated to v0.4.1 in my swift app but my project won't build, xcode complains 'RustBuffer::capacity' from module 'LDKNodeFFI.LDKNodeFFI' is not present in definition of 'struct RustBuffer' in module 'bdkFFI.bdkFFI'
ldknodebdk

To Reproduce
Import BDK and LDK Node into the same project.

Expected behavior
Project should build.

Build environment

Additional context

reez commented 2 weeks ago

It could be that LDK node and BDK are currently incompatible due to re-exporting the same types with different UniFFI versions

reez commented 2 weeks ago

I was unable to reproduce with this setup Xcode 16.1:

I chose that setup to test pre-1.0 and post-1.0 in combination with the referenced ldk-node 0.4.1.

post_1-0 pre_1-0
tnull commented 2 weeks ago

Btw, likely unrelated, but we didn't release Swift bindings for LDK Node 0.4.1 only then for the newest 0.4.2.

reez commented 2 weeks ago

Btw, likely unrelated, but we didn't release Swift bindings for LDK Node 0.4.1 only then for the newest 0.4.2.

Good additional note on reproducing the issue that was reported by a user, Swift bindings for LDK Node 0.4.1 are actually just 0.4.0, so if user was pulling in 0.4.1 it would have just used 0.4.0. I'm still unable to reproduce the issue reported by the user who mentioned they were using LDK Node 0.4.1 and BDK, but maybe I haven't tried the same BDK version they are using.

Adding screenshot of 0.4.1 having Package.swift tag 0.4.0:

Screenshot 2024-11-06 at 6 50 32 AM
tnull commented 2 weeks ago

Good additional note on reproducing the issue that was reported by a user, Swift bindings for LDK Node 0.4.1 are actually just 0.4.0

Yes, as said above, we didn't release 0.4.1 for Swift as by the time we came around to do so, we had to push out a fix with 0.4.2 so didn't make sense to do a release for a known-to-be-buggy version.

reez commented 2 weeks ago

Good additional note on reproducing the issue that was reported by a user, Swift bindings for LDK Node 0.4.1 are actually just 0.4.0

Yes, as said above, we didn't release 0.4.1 for Swift as by the time we came around to do so, we had to push out a fix with 0.4.2 so didn't make sense to do a release for a known-to-be-buggy version.

Makes sense