Skip to content

Commit 023ad67

Browse files
committed
Drop the no-std feature from lightning-rapid-gossip-sync
Now that we don't have to have everything in our entire ecosystem use the same `std`/`no-std` feature combinations we should start by untangling our own features a bit. This takes another step by removing the `no-std` feature entirely from the `lightning-rapid-gossip-sync` crate and removing all feature implications on dependencies from the remaining `std` feature.
1 parent b1c47f0 commit 023ad67

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

ci/ci-tests.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,20 @@ grep '^max_level_' lightning/Cargo.toml | awk '{ print $1 }'| while read -r FEAT
7575
done
7676

7777
echo -e "\n\nTesting no-std builds"
78-
for DIR in lightning-invoice lightning-background-processor; do
78+
for DIR in lightning-invoice lightning-background-processor lightning-rapid-gossip-sync; do
7979
cargo test -p $DIR --verbose --color always --no-default-features
8080
# check if there is a conflict between no-std and the c_bindings cfg
8181
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features
8282
done
8383

8484
echo -e "\n\nTesting no-std flags in various combinations"
85-
for DIR in lightning lightning-rapid-gossip-sync; do
85+
for DIR in lightning; do
8686
cargo test -p $DIR --verbose --color always --no-default-features --features no-std
8787
# check if there is a conflict between no-std and the default std feature
8888
cargo test -p $DIR --verbose --color always --features no-std
8989
done
9090

91-
for DIR in lightning lightning-rapid-gossip-sync; do
91+
for DIR in lightning; do
9292
# check if there is a conflict between no-std and the c_bindings cfg
9393
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features --features=no-std
9494
done

lightning-rapid-gossip-sync/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ Utility to process gossip routing data from Rapid Gossip Sync Server.
1111

1212
[features]
1313
default = ["std"]
14-
no-std = ["lightning/no-std"]
15-
std = ["lightning/std"]
14+
std = []
1615

1716
[dependencies]
1817
lightning = { version = "0.0.123-beta", default-features = false }

lightning-rapid-gossip-sync/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ where
143143
///
144144
/// `sync_path`: Path to the file where the gossip update data is located
145145
///
146-
#[cfg(all(feature = "std", not(feature = "no-std")))]
146+
#[cfg(feature = "std")]
147147
pub fn sync_network_graph_with_file_path(
148148
&self, sync_path: &str,
149149
) -> Result<u32, GraphSyncError> {
@@ -191,7 +191,7 @@ where
191191
}
192192
}
193193

194-
#[cfg(all(feature = "std", not(feature = "no-std")))]
194+
#[cfg(feature = "std")]
195195
#[cfg(test)]
196196
mod tests {
197197
use std::fs;

no-std-check/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2021"
55

66
[features]
7-
default = ["lightning/no-std", "lightning-rapid-gossip-sync/no-std"]
7+
default = ["lightning/no-std"]
88

99
[dependencies]
1010
lightning = { path = "../lightning", default-features = false }

0 commit comments

Comments
 (0)