lightningdevkit / rust-lightning

A highly modular Bitcoin Lightning library written in Rust. It's rust-lightning, not Rusty's Lightning!
Other
1.16k stars 367 forks source link

Add `lightning-macros` crate and drop `bdk_macros` dependency #3330

Closed tnull closed 1 month ago

tnull commented 1 month ago

Previously, we used the bdk_macros dependency for some simple proc macros in lightning-transaction-sync. However, post-1.0 BDK doesn't further maintain this crate and will at some point probably yank it together with the old bdk crate that was split up.

Here, we create a new crate for utility proc macros and steal add what we currently use (slightly modified for the latest syn version's API though). In the future we may want to expand this crate, e.g., for some further changes to the maybe_async macros in the context of an async KVStore implementation.

tnull commented 1 month ago

Now pushed a fixup that removes the async trait functionality. While I think there is no real harm in having the original code around, happy to go this way, too. Let me know if I should squash or revert.

TheBlueMatt commented 1 month ago

Feel free to squash, then LGTM.

tnull commented 1 month ago

Feel free to squash, then LGTM.

Squashed fixup without further changes.

TheBlueMatt commented 1 month ago

Oops, the async-trait removal got squashed into the wrong commit :/

tnull commented 1 month ago

Oops, the async-trait removal got squashed into the wrong commit :/

Grr🤦‍♂️

Fixed.