Support `logger::Record` in C by String-ing the fmt::Arguments 2021-11-c-bindings-tweaks-0.0.103
authorMatt Corallo <git@bluematt.me>
Sun, 21 Nov 2021 22:29:48 +0000 (22:29 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 24 Nov 2021 20:16:44 +0000 (20:16 +0000)
commit14dfc6cc182f16a6a29182199c021293e0f1479d
tree06526920f7fa59d81bc973e6aad50b297539a7ee
parent50b1017fca4c7b73f9dc71ed923e91c6c1da6459
Support `logger::Record` in C by String-ing the fmt::Arguments

This adds a new (non-feature) cfg argument `c_bindings` which will
be set when building C bindings. With this, we can (slightly) tweak
behavior and API based on whether we are being built for Rust or C
users.

Ideally we'd never need this, but as long as we can keep the API
consistent-enough to avoid material code drift, this gives us a
cheap way of doing the "right" thing for both C and Rust when the
two are in tension.

We also move lightning-background-processor to support the same
MSRV as the main lightning crate, instead of only
lightning-net-tokio's MSRV.

This is a backport of 016eb96fc7170bdbab238292d3cc9338c2a66eb9
.github/workflows/build.yml
lightning/src/util/logger.rs