lightningdevkit / lightning-liquidity

Other
27 stars 17 forks source link

Make crate `no_std` compatible #53

Closed tnull closed 11 months ago

tnull commented 11 months ago

Fixes #29.

Copying the pattern from the lightning crate, we re-export alloc/hashbrown or std depending on whether the std feature is set. We also copy some sync types from the lightning crate that are no-std compatible.

Moreover, we check no-std compatibility in CI and, since we already touched most of them, reorder and cleanup the use statements in all modules.

One thing we don't tackle in this PR is validating the expiry times of OpeningFeeParams in no-std. This is now tracked separately in https://github.com/lightningdevkit/lightning-liquidity/issues/54.