Do not auto-select the lightning `std` feature from tx-sync crate 2023-03-no-tx-sync-auto-std
authorMatt Corallo <git@bluematt.me>
Fri, 3 Mar 2023 05:14:04 +0000 (05:14 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 3 Mar 2023 19:26:14 +0000 (19:26 +0000)
commit1a18b881bbef9bea0e8348e52b7948c4f75c6a47
tree7e4f0328558adf376dd253e5db50bd5b0c5b2259
parent6ddf69c93b1c3e418251ed7a898efd943e47bc30
Do not auto-select the lightning `std` feature from tx-sync crate

We have some downstream folks who are using LDK in wasm compiled
via the normal rust wasm path. To ensure nothing breaks they want
to use `no-std` on the lightning crate, disabling time calls as
those panic. However, the HTTP logic in
`lightning-transaction-sync` gets automatically stubbed out by the
HTTP client crates when targeting wasm via `wasm_bindgen`, so it
works fine despite the std restrictions.

In order to make both work, `lightning-transaction-sync` can remain
`std`, but needs to not automatically enable the `std` flag on the
`lightning` crate, ie by setting `default-features = false`. We do
so here.
.github/workflows/build.yml
lightning-transaction-sync/Cargo.toml
no-std-check/Cargo.toml