lightningdevkit / ldk-node

A ready-to-go node implementation built using LDK.
Other
140 stars 72 forks source link

Uniffi bindings template #32

Closed thunderbiscuit closed 1 year ago

thunderbiscuit commented 1 year ago

I was working on extracting out a core/basic template for a uniffi-based bindings library last week and figured you might find it useful if you are still planning on using uniffi-rs to build bindings for ldk-lite (not sure if you already have your uniffi-rs base yet or not, so totally disregard this message if you do). I was explaining the architecture to another dev and realized that our bdk-ffi repo has a decent amount of structure that's specific to us and our code, and it would have been great to have an empty template that still contained all the helpers, plugins, etc. to get started quickly.

The uniffi-bindings-template repository is a template that has all the moving parts (including our own custom Gradle plugin, and our own simple bindgen tool) to create an android library using uniffi-rs. My goal was to create a structure where a dev can simply add to the udl file and the lib.rs files, recompile, and get a working bindings library.

tnull commented 1 year ago

Ah, thank you for the pointer and excuse the late reply! Will definitely have a look, especially regarding the gradle plugin! The basic binding generation are kinda working (see #25), but I'll still need some boilerplate to create the packages etc. Closing the issue for now, but will def. come back to it.