1.41.0,
# 1.45.2 is MSRV for lightning-net-tokio, lightning-block-sync, and coverage generation
1.45.2,
- # 1.47.0 will be the MSRV for no_std builds using hashbrown once core2 is updated
+ # 1.47.0 will be the MSRV for no-std builds using hashbrown once core2 is updated
1.47.0]
include:
- toolchain: stable
- name: Test on Rust ${{ matrix.toolchain }} with net-tokio and full code-linking for coverage generation
if: matrix.coverage
run: RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always
- - name: Test on no_std bullds Rust ${{ matrix.toolchain }}
+ - name: Test on no-std bullds Rust ${{ matrix.toolchain }}
if: "matrix.build-no-std && !matrix.coverage"
run: |
cd lightning
- cargo test --verbose --color always --no-default-features --features no_std
- # check if there is a conflict between no_std and the default std feature
- cargo test --verbose --color always --features no_std
+ cargo test --verbose --color always --no-default-features --features no-std
+ # check if there is a conflict between no-std and the default std feature
+ cargo test --verbose --color always --features no-std
cd ..
- - name: Test on no_std bullds Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
+ - name: Test on no-std builds Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
if: "matrix.build-no-std && matrix.coverage"
run: |
cd lightning
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --no-default-features --features no_std
+ RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --no-default-features --features no-std
cd ..
- name: Test on Rust ${{ matrix.toolchain }}
if: "! matrix.build-net-tokio"
cargo doc
cargo doc --document-private-items
cd fuzz && cargo check --features=stdin_fuzz
-cd ../lightning && cargo check --no-default-features --features=no_std
+cd ../lightning && cargo check --no-default-features --features=no-std
unsafe_revoked_tx_signing = []
unstable = []
-no_std = ["hashbrown", "bitcoin/no-std", "core2/alloc"]
+no-std = ["hashbrown", "bitcoin/no-std", "core2/alloc"]
std = ["bitcoin/std"]
default = ["std"]
[dependencies]
bitcoin = { version = "0.27", default-features = false, features = ["secp-recovery"] }
-# TODO maybe bitcoin no-std should pull in this feature?
+# TODO remove this once rust-bitcoin PR #637 is released
secp256k1 = { version = "0.20.2", default-features = false, features = ["alloc"] }
hashbrown = { version = "0.11", optional = true }
[dev-dependencies]
hex = "0.3"
regex = "0.1.80"
+# TODO remove this once rust-bitcoin PR #637 is released
secp256k1 = { version = "0.20.2", default-features = false, features = ["alloc"] }
[dev-dependencies.bitcoin]
#![cfg_attr(all(any(test, feature = "_test_utils"), feature = "unstable"), feature(test))]
#[cfg(all(any(test, feature = "_test_utils"), feature = "unstable"))] extern crate test;
-#[cfg(not(any(feature = "std", feature = "no_std")))]
-compile_error!("at least one of the `std` or `no_std` features must be enabled");
+#[cfg(not(any(feature = "std", feature = "no-std")))]
+compile_error!("at least one of the `std` or `no-std` features must be enabled");
#[macro_use]
extern crate alloc;
}
}
- #[cfg(not(feature = "no_std"))]
+ #[cfg(not(feature = "no-std"))]
pub(super) fn random_init_seed() -> u64 {
// Because the default HashMap in std pulls OS randomness, we can use it as a (bad) RNG.
use core::hash::{BuildHasher, Hasher};
println!("Using seed of {}", seed);
seed
}
- #[cfg(not(feature = "no_std"))]
+ #[cfg(not(feature = "no-std"))]
use util::ser::Readable;
#[test]
- #[cfg(not(feature = "no_std"))]
+ #[cfg(not(feature = "no-std"))]
fn generate_routes() {
let mut d = match super::test_utils::get_route_file() {
Ok(f) => f,
}
#[test]
- #[cfg(not(feature = "no_std"))]
+ #[cfg(not(feature = "no-std"))]
fn generate_routes_mpp() {
let mut d = match super::test_utils::get_route_file() {
Ok(f) => f,
}
}
-#[cfg(all(test, not(feature = "no_std")))]
+#[cfg(all(test, not(feature = "no-std")))]
pub(crate) mod test_utils {
use std::fs::File;
/// Tries to open a network graph file, or panics with a URL to fetch it.
}
}
-#[cfg(all(test, feature = "unstable", not(feature = "no_std")))]
+#[cfg(all(test, feature = "unstable", not(feature = "no-std")))]
mod benches {
use super::*;
use util::logger::{Logger, Record};