mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
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.
17 lines
781 B
TOML
17 lines
781 B
TOML
[package]
|
|
name = "no-std-check"
|
|
version = "0.1.0"
|
|
edition = "2018"
|
|
|
|
[features]
|
|
default = ["lightning/no-std", "lightning-invoice/no-std", "lightning-rapid-gossip-sync/no-std"]
|
|
|
|
[dependencies]
|
|
lightning = { path = "../lightning", default-features = false }
|
|
lightning-invoice = { path = "../lightning-invoice", default-features = false }
|
|
lightning-rapid-gossip-sync = { path = "../lightning-rapid-gossip-sync", default-features = false }
|
|
lightning-background-processor = { path = "../lightning-background-processor", features = ["futures"], default-features = false }
|
|
|
|
# Obviously lightning-transaction-sync doesn't support no-std, but it should build
|
|
# even if lightning is built with no-std.
|
|
lightning-transaction-sync = { path = "../lightning-transaction-sync", optional = true }
|