Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,24 @@ jobs:
RUSTFLAGS: '--cfg=taproot'
RUSTDOCFLAGS: '--cfg=taproot'

check_docs:
runs-on: self-hosted
env:
# While docs.rs builds using a nightly compiler (and we use some nightly features),
# nightly ends up randomly breaking builds occasionally, so we instead use beta
# and set RUSTC_BOOTSTRAP in check-docsrs.sh
TOOLCHAIN: beta
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
- name: Simulate docs.rs build
run: ci/check-docsrs.sh

fuzz:
runs-on: self-hosted
env:
Expand Down
42 changes: 42 additions & 0 deletions ci/check-docsrs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
#shellcheck disable=SC2002,SC2086,SC2207

set -ex

# Attempt to simulate the docsrs builds. Sadly its not entirely trivial as
# docs.rs reads metadata out of Cargo.toml which we don't want to have a whole
# parser for.

WORKSPACE_MEMBERS=( $(cat Cargo.toml | tr '\n' '\r' | sed 's/\r //g' | tr '\r' '\n' | grep '^members =' | sed 's/members.*=.*\[//' | tr -d '"' | tr ',' '\n') )
echo "${WORKSPACE_MEMBERS[@]}"
for CRATE in "${WORKSPACE_MEMBERS[@]}"; do
pushd "$CRATE"
CARGO_ARGS=""
RUSTDOC_ARGS=""
cat Cargo.toml | grep -A 100 '\[package.metadata.docs.rs\]' | tail -n +2 > /tmp/ldk-docsrs-rustdoc-config.txt
while read -r LINE; do
case "$LINE" in
"["*) break;;
"features"*)
OG_IFS="$IFS"
IFS=','
for FEATURE in $(echo "$LINE" | sed 's/features.*=.*\[//g' | tr -d '"] '); do
export CARGO_ARGS="$CARGO_ARGS --features $FEATURE"
done
IFS="$OG_IFS"
;;
"all-features = true")
export CARGO_ARGS="$CARGO_ARGS --all-features"
;;
"rustdoc-args"*)
RUSTDOC_ARGS="$(echo "$LINE" | sed 's/rustdoc-args.*=.*\[//g' | tr -d '"],')"
;;
esac
done < /tmp/ldk-docsrs-rustdoc-config.txt
rm /tmp/ldk-docsrs-rustdoc-config.txt
echo "Building $CRATE with args $CARGO_ARGS and flags $RUSTDOC_ARGS"
# We rely on nightly features but want to use a stable release in CI to avoid
# spurous breakage, thus we set RUSTC_BOOTSTRAP=1 here.
RUSTC_BOOTSTRAP=1 cargo rustdoc $CARGO_ARGS -- $RUSTDOC_ARGS
popd
done
19 changes: 2 additions & 17 deletions ci/ci-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#shellcheck disable=SC2002,SC2207
set -eox pipefail

RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
Expand Down Expand Up @@ -41,23 +42,7 @@ export RUST_BACKTRACE=1
echo -e "\n\nChecking the workspace, except lightning-transaction-sync."
cargo check --verbose --color always

# When the workspace members change, make sure to update the list here as well
# as in `Cargo.toml`.
WORKSPACE_MEMBERS=(
lightning
lightning-types
lightning-block-sync
lightning-invoice
lightning-net-tokio
lightning-persister
lightning-background-processor
lightning-rapid-gossip-sync
lightning-custom-message
lightning-macros
lightning-dns-resolver
lightning-liquidity
possiblyrandom
)
WORKSPACE_MEMBERS=( $(cat Cargo.toml | tr '\n' '\r' | sed 's/\r //g' | tr '\r' '\n' | grep '^members =' | sed 's/members.*=.*\[//' | tr -d '"' | tr ',' ' ') )

echo -e "\n\nTesting the workspace, except lightning-transaction-sync."
cargo test --verbose --color always
Expand Down
16 changes: 8 additions & 8 deletions lightning-background-processor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lightning-background-processor"
version = "0.2.0+git"
version = "0.2.0-beta1"
authors = ["Valentine Wallace <[email protected]>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/lightningdevkit/rust-lightning"
Expand All @@ -22,17 +22,17 @@ std = ["lightning/std", "lightning-liquidity/std", "bitcoin-io/std", "bitcoin_ha
bitcoin = { version = "0.32.2", default-features = false }
bitcoin_hashes = { version = "0.14.0", default-features = false }
bitcoin-io = { version = "0.1.2", default-features = false }
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
lightning-rapid-gossip-sync = { version = "0.2.0", path = "../lightning-rapid-gossip-sync", default-features = false }
lightning-liquidity = { version = "0.2.0", path = "../lightning-liquidity", default-features = false }
lightning = { version = "0.2.0-beta1", path = "../lightning", default-features = false }
lightning-rapid-gossip-sync = { version = "0.2.0-beta1", path = "../lightning-rapid-gossip-sync", default-features = false }
lightning-liquidity = { version = "0.2.0-beta1", path = "../lightning-liquidity", default-features = false }
possiblyrandom = { version = "0.2", path = "../possiblyrandom", default-features = false }

[dev-dependencies]
tokio = { version = "1.35", features = [ "macros", "rt", "rt-multi-thread", "sync", "time" ] }
lightning = { version = "0.2.0", path = "../lightning", features = ["_test_utils"] }
lightning-invoice = { version = "0.34.0", path = "../lightning-invoice" }
lightning-liquidity = { version = "0.2.0", path = "../lightning-liquidity", default-features = false, features = ["_test_utils"] }
lightning-persister = { version = "0.2.0", path = "../lightning-persister" }
lightning = { version = "0.2.0-beta1", path = "../lightning", features = ["_test_utils"] }
lightning-invoice = { version = "0.34.0-beta1", path = "../lightning-invoice" }
lightning-liquidity = { version = "0.2.0-beta1", path = "../lightning-liquidity", default-features = false, features = ["_test_utils"] }
lightning-persister = { version = "0.2.0-beta1", path = "../lightning-persister" }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion lightning-background-processor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(rustdoc::private_intra_doc_links)]
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]

#[cfg(any(test, feature = "std"))]
Expand Down
6 changes: 3 additions & 3 deletions lightning-block-sync/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lightning-block-sync"
version = "0.2.0+git"
version = "0.2.0-beta1"
authors = ["Jeffrey Czyz", "Matt Corallo"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/lightningdevkit/rust-lightning"
Expand All @@ -19,13 +19,13 @@ rpc-client = [ "serde_json", "chunked_transfer" ]

[dependencies]
bitcoin = "0.32.2"
lightning = { version = "0.2.0", path = "../lightning" }
lightning = { version = "0.2.0-beta1", path = "../lightning" }
tokio = { version = "1.35", features = [ "io-util", "net", "time", "rt" ], optional = true }
serde_json = { version = "1.0", optional = true }
chunked_transfer = { version = "1.4", optional = true }

[dev-dependencies]
lightning = { version = "0.2.0", path = "../lightning", features = ["_test_utils"] }
lightning = { version = "0.2.0-beta1", path = "../lightning", features = ["_test_utils"] }
tokio = { version = "1.35", features = [ "macros", "rt" ] }

[lints]
Expand Down
2 changes: 1 addition & 1 deletion lightning-block-sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#![deny(rustdoc::private_intra_doc_links)]
#![deny(missing_docs)]
#![deny(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]

#[cfg(any(feature = "rest-client", feature = "rpc-client"))]
pub mod http;
Expand Down
4 changes: 2 additions & 2 deletions lightning-custom-message/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lightning-custom-message"
version = "0.2.0+git"
version = "0.2.0-beta1"
authors = ["Jeffrey Czyz"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/lightningdevkit/rust-lightning"
Expand All @@ -15,7 +15,7 @@ rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
bitcoin = "0.32.2"
lightning = { version = "0.2.0", path = "../lightning" }
lightning = { version = "0.2.0-beta1", path = "../lightning" }

[lints]
workspace = true
8 changes: 4 additions & 4 deletions lightning-dns-resolver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "lightning-dns-resolver"
version = "0.3.0+git"
version = "0.3.0-beta1"
authors = ["Matt Corallo"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/lightningdevkit/rust-lightning/"
description = "A crate which implements DNSSEC resolution for lightning clients over bLIP 32 using `tokio` and the `dnssec-prover` crate."
edition = "2021"

[dependencies]
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
lightning-types = { version = "0.3.0", path = "../lightning-types", default-features = false }
lightning = { version = "0.2.0-beta1", path = "../lightning", default-features = false }
lightning-types = { version = "0.3.0-beta1", path = "../lightning-types", default-features = false }
dnssec-prover = { version = "0.6", default-features = false, features = [ "std", "tokio" ] }
tokio = { version = "1.0", default-features = false, features = ["rt"] }

[dev-dependencies]
bitcoin = { version = "0.32" }
tokio = { version = "1.0", default-features = false, features = ["macros", "time"] }
lightning = { version = "0.2.0", path = "../lightning", features = ["dnssec", "_test_utils"] }
lightning = { version = "0.2.0-beta1", path = "../lightning", features = ["dnssec", "_test_utils"] }
4 changes: 2 additions & 2 deletions lightning-invoice/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lightning-invoice"
description = "Data structures to parse and serialize BOLT11 lightning invoices"
version = "0.34.0+git"
version = "0.34.0-beta1"
authors = ["Sebastian Geisler <[email protected]>"]
documentation = "https://docs.rs/lightning-invoice/"
license = "MIT OR Apache-2.0"
Expand All @@ -19,7 +19,7 @@ std = []

[dependencies]
bech32 = { version = "0.11.0", default-features = false }
lightning-types = { version = "0.3.0", path = "../lightning-types", default-features = false }
lightning-types = { version = "0.3.0-beta1", path = "../lightning-types", default-features = false }
serde = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
bitcoin = { version = "0.32.2", default-features = false, features = ["secp-recovery"] }

Expand Down
2 changes: 1 addition & 1 deletion lightning-invoice/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#![deny(non_camel_case_types)]
#![deny(non_snake_case)]
#![deny(unused_mut)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]

//! This crate provides data structures to represent
Expand Down
16 changes: 8 additions & 8 deletions lightning-liquidity/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lightning-liquidity"
version = "0.2.0+git"
version = "0.2.0-beta1"
authors = ["John Cantrell <[email protected]>", "Elias Rohrer <[email protected]>"]
homepage = "https://lightningdevkit.org/"
license = "MIT OR Apache-2.0"
Expand All @@ -21,10 +21,10 @@ backtrace = ["dep:backtrace"]
_test_utils = []

[dependencies]
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
lightning-types = { version = "0.3.0", path = "../lightning-types", default-features = false }
lightning-invoice = { version = "0.34.0", path = "../lightning-invoice", default-features = false, features = ["serde"] }
lightning-macros = { version = "0.2", path = "../lightning-macros" }
lightning = { version = "0.2.0-beta1", path = "../lightning", default-features = false }
lightning-types = { version = "0.3.0-beta1", path = "../lightning-types", default-features = false }
lightning-invoice = { version = "0.34.0-beta1", path = "../lightning-invoice", default-features = false, features = ["serde"] }
lightning-macros = { version = "0.2.0-beta1", path = "../lightning-macros" }

bitcoin = { version = "0.32.2", default-features = false, features = ["serde"] }

Expand All @@ -34,9 +34,9 @@ serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
backtrace = { version = "0.3", optional = true }

[dev-dependencies]
lightning = { version = "0.2.0", path = "../lightning", default-features = false, features = ["_test_utils"] }
lightning-invoice = { version = "0.34.0", path = "../lightning-invoice", default-features = false, features = ["serde", "std"] }
lightning-persister = { version = "0.2.0", path = "../lightning-persister", default-features = false }
lightning = { version = "0.2.0-beta1", path = "../lightning", default-features = false, features = ["_test_utils"] }
lightning-invoice = { version = "0.34.0-beta1", path = "../lightning-invoice", default-features = false, features = ["serde", "std"] }
lightning-persister = { version = "0.2.0-beta1", path = "../lightning-persister", default-features = false }

proptest = "1.0.0"
tokio = { version = "1.35", default-features = false, features = [ "rt-multi-thread", "time", "sync", "macros" ] }
Expand Down
2 changes: 1 addition & 1 deletion lightning-liquidity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#![allow(bare_trait_objects)]
#![allow(ellipsis_inclusive_range_patterns)]
#![allow(clippy::drop_non_drop)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(not(any(test, feature = "std")), no_std)]

#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion lightning-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lightning-macros"
version = "0.2.0+git"
version = "0.2.0-beta1"
authors = ["Elias Rohrer"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/lightningdevkit/rust-lightning/"
Expand Down
2 changes: 1 addition & 1 deletion lightning-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#![forbid(unsafe_code)]
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(rustdoc::private_intra_doc_links)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]

extern crate alloc;

Expand Down
6 changes: 3 additions & 3 deletions lightning-net-tokio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lightning-net-tokio"
version = "0.2.0+git"
version = "0.2.0-beta1"
authors = ["Matt Corallo"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/lightningdevkit/rust-lightning/"
Expand All @@ -16,12 +16,12 @@ rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
bitcoin = "0.32.2"
lightning = { version = "0.2.0", path = "../lightning" }
lightning = { version = "0.2.0-beta1", path = "../lightning" }
tokio = { version = "1.35", features = [ "rt", "sync", "net", "time" ] }

[dev-dependencies]
tokio = { version = "1.35", features = [ "macros", "rt", "rt-multi-thread", "sync", "net", "time" ] }
lightning = { version = "0.2.0", path = "../lightning", features = ["_test_utils"] }
lightning = { version = "0.2.0-beta1", path = "../lightning", features = ["_test_utils"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion lightning-net-tokio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(rustdoc::private_intra_doc_links)]
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]

use bitcoin::secp256k1::PublicKey;

Expand Down
6 changes: 3 additions & 3 deletions lightning-persister/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lightning-persister"
version = "0.2.0+git"
version = "0.2.0-beta1"
authors = ["Valentine Wallace", "Matt Corallo"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/lightningdevkit/rust-lightning"
Expand All @@ -18,7 +18,7 @@ tokio = ["dep:tokio"]

[dependencies]
bitcoin = "0.32.2"
lightning = { version = "0.2.0", path = "../lightning" }
lightning = { version = "0.2.0-beta1", path = "../lightning" }
tokio = { version = "1.35", optional = true, default-features = false, features = ["rt-multi-thread"] }

[target.'cfg(windows)'.dependencies]
Expand All @@ -28,7 +28,7 @@ windows-sys = { version = "0.48.0", default-features = false, features = ["Win32
criterion = { version = "0.4", optional = true, default-features = false }

[dev-dependencies]
lightning = { version = "0.2.0", path = "../lightning", features = ["_test_utils"] }
lightning = { version = "0.2.0-beta1", path = "../lightning", features = ["_test_utils"] }
bitcoin = { version = "0.32.2", default-features = false }
tokio = { version = "1.35", default-features = false, features = ["macros"] }

Expand Down
2 changes: 1 addition & 1 deletion lightning-persister/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(rustdoc::private_intra_doc_links)]
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]

#[cfg(ldk_bench)]
extern crate criterion;
Expand Down
6 changes: 3 additions & 3 deletions lightning-rapid-gossip-sync/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lightning-rapid-gossip-sync"
version = "0.2.0+git"
version = "0.2.0-beta1"
authors = ["Arik Sosman <[email protected]>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/lightningdevkit/rust-lightning"
Expand All @@ -14,7 +14,7 @@ default = ["std"]
std = ["bitcoin-io/std", "bitcoin_hashes/std"]

[dependencies]
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
lightning = { version = "0.2.0-beta1", path = "../lightning", default-features = false }
bitcoin = { version = "0.32.2", default-features = false }
bitcoin_hashes = { version = "0.14.0", default-features = false }
bitcoin-io = { version = "0.1.2", default-features = false }
Expand All @@ -23,7 +23,7 @@ bitcoin-io = { version = "0.1.2", default-features = false }
criterion = { version = "0.4", optional = true, default-features = false }

[dev-dependencies]
lightning = { version = "0.2.0", path = "../lightning", features = ["_test_utils"] }
lightning = { version = "0.2.0-beta1", path = "../lightning", features = ["_test_utils"] }

[lints]
workspace = true
Loading