projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0dfcacd
)
Rename no_std feature to no-std
author
Devrandom
<c1.devrandom@niftybox.net>
Tue, 3 Aug 2021 07:38:44 +0000
(09:38 +0200)
committer
Devrandom
<c1.devrandom@niftybox.net>
Tue, 3 Aug 2021 16:53:33 +0000
(18:53 +0200)
matches rust-bitcoin
.github/workflows/build.yml
patch
|
blob
|
history
ci/check-compiles.sh
patch
|
blob
|
history
lightning/Cargo.toml
patch
|
blob
|
history
lightning/src/lib.rs
patch
|
blob
|
history
lightning/src/routing/router.rs
patch
|
blob
|
history
diff --git
a/.github/workflows/build.yml
b/.github/workflows/build.yml
index 5b886e19bff5d440cdabb8441b4e4a9d17077fdb..f18f3f64d78eda3c96ec61b56f42ea506dc463d2 100644
(file)
--- a/
.github/workflows/build.yml
+++ b/
.github/workflows/build.yml
@@
-16,7
+16,7
@@
jobs:
1.41.0,
# 1.45.2 is MSRV for lightning-net-tokio, lightning-block-sync, and coverage generation
1.45.2,
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
1.47.0]
include:
- toolchain: stable
@@
-87,19
+87,19
@@
jobs:
- 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 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
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 ..
cd ..
- - name: Test on no
_std bul
lds Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
+ - name: Test on no
-std bui
lds Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
if: "matrix.build-no-std && matrix.coverage"
run: |
cd lightning
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"
cd ..
- name: Test on Rust ${{ matrix.toolchain }}
if: "! matrix.build-net-tokio"
diff --git
a/ci/check-compiles.sh
b/ci/check-compiles.sh
index 79c2d92b761ce409cc31fda64d3667bc29bf1cfe..2bc31007b6b7463bfe9df5bd46d4b76bcc36901f 100755
(executable)
--- a/
ci/check-compiles.sh
+++ b/
ci/check-compiles.sh
@@
-6,4
+6,4
@@
cargo check
cargo doc
cargo doc --document-private-items
cd fuzz && cargo check --features=stdin_fuzz
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
diff --git
a/lightning/Cargo.toml
b/lightning/Cargo.toml
index 8bbdfe95a3ebdc138916e435bae85a1f0a3380e7..8580a53a3f88bf87bc698de0fed906a881dfa376 100644
(file)
--- a/
lightning/Cargo.toml
+++ b/
lightning/Cargo.toml
@@
-26,14
+26,14
@@
max_level_debug = []
unsafe_revoked_tx_signing = []
unstable = []
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"] }
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 }
secp256k1 = { version = "0.20.2", default-features = false, features = ["alloc"] }
hashbrown = { version = "0.11", optional = true }
@@
-45,6
+45,7
@@
core2 = { version = "0.3.0", optional = true, default-features = false }
[dev-dependencies]
hex = "0.3"
regex = "0.1.80"
[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]
secp256k1 = { version = "0.20.2", default-features = false, features = ["alloc"] }
[dev-dependencies.bitcoin]
diff --git
a/lightning/src/lib.rs
b/lightning/src/lib.rs
index e1ae9433e23495c70bb0db99953debf0b4104e8d..e6ecd1f3563c6a312a5e22ffe017a7ea011d7186 100644
(file)
--- a/
lightning/src/lib.rs
+++ b/
lightning/src/lib.rs
@@
-33,8
+33,8
@@
#![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_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;
#[macro_use]
extern crate alloc;
diff --git
a/lightning/src/routing/router.rs
b/lightning/src/routing/router.rs
index 1d4234d9db4f0f6154d801d06f90f892d7f21730..13356cc1c74334193fed69be42a05b718d2ab89d 100644
(file)
--- a/
lightning/src/routing/router.rs
+++ b/
lightning/src/routing/router.rs
@@
-3831,7
+3831,7
@@
mod tests {
}
}
}
}
- #[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};
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};
@@
-3839,11
+3839,11
@@
mod tests {
println!("Using seed of {}", seed);
seed
}
println!("Using seed of {}", seed);
seed
}
- #[cfg(not(feature = "no
_
std"))]
+ #[cfg(not(feature = "no
-
std"))]
use util::ser::Readable;
#[test]
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,
fn generate_routes() {
let mut d = match super::test_utils::get_route_file() {
Ok(f) => f,
@@
-3871,7
+3871,7
@@
mod tests {
}
#[test]
}
#[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,
fn generate_routes_mpp() {
let mut d = match super::test_utils::get_route_file() {
Ok(f) => f,
@@
-3899,7
+3899,7
@@
mod tests {
}
}
}
}
-#[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.
pub(crate) mod test_utils {
use std::fs::File;
/// Tries to open a network graph file, or panics with a URL to fetch it.
@@
-3926,7
+3926,7
@@
pub(crate) mod test_utils {
}
}
}
}
-#[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};
mod benches {
use super::*;
use util::logger::{Logger, Record};