From 75263c2cf7d49777e7e5d398b53f1604b4686433 Mon Sep 17 00:00:00 2001 From: amackillop Date: Tue, 26 May 2026 07:47:09 -0700 Subject: [PATCH 1/2] Update ldk-node and bpi --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0f15387..d62c9e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,11 +14,11 @@ tikv-jemallocator = { version = "0.6", features = ["disable_initial_exec_tls"] } # Branch: https://github.com/moneydevkit/bitcoin-payment-instructions/tree/2025-12-ldk-node-base # Pinned to the same git rev as ldk-node's transitive pull to avoid duplicate # crate compilation. Verify with `cargo tree -d | grep bitcoin-payment-instructions`. -bitcoin-payment-instructions = { git = "https://github.com/moneydevkit/bitcoin-payment-instructions", rev = "bc7d03f", default-features = false, features = [ +bitcoin-payment-instructions = { git = "https://github.com/moneydevkit/bitcoin-payment-instructions", rev = "bdcef061488bcc619142010a2a69cd49462d8843", default-features = false, features = [ "http", ] } # Branch: https://github.com/moneydevkit/ldk-node/commits/lsp-0.7.0_accept-underpaying-htlcs_with_timing_logs -ldk-node = { default-features = false, git = "https://github.com/moneydevkit/ldk-node.git", rev = "5616db4ed0db15534d6d92356fef8c5bad79acb1" } +ldk-node = { default-features = false, git = "https://github.com/moneydevkit/ldk-node.git", rev = "f13fcead7e02ef4b77489a83854f204de11e902b" } #ldk-node = { path = "../ldk-node" } napi = { version = "2", features = ["napi4"] } From 0c3ccd998e11b944cb5b1c97fd0c55d6d3040dbb Mon Sep 17 00:00:00 2001 From: amackillop Date: Wed, 27 May 2026 06:49:25 -0700 Subject: [PATCH 2/2] Unblock aws-lc-sys cross-compile in CI The new bpi rev pulled reqwest 0.13, whose `rustls` feature forces aws-lc-rs as the rustls crypto provider via cargo feature unification. aws-lc-sys then has to cross-compile its bundled C, which conflicts with the napi-rs docker images on the two gnu Linux targets: - x86_64-unknown-linux-gnu: aws-lc-sys passes `-fuse-ld=lld` to the compiler unconditionally. The image's custom `x86_64-unknown-linux-gnu-gcc` does not recognize the flag, but the image's clang (already CC=clang) does once lld is installed. - aarch64-unknown-linux-gnu: the image's custom cross toolchain at /usr/aarch64-unknown-linux-gnu has a sysroot missing stdatomic.h. Debian's gcc-aarch64-linux-gnu plus libc6-dev-arm64-cross provides the C11 atomics header. The catch is that aws-lc-sys reads TARGET_CC ahead of CC_ and CC. The image pre-sets TARGET_CC to its custom gcc, so any CC_ exports were ignored until we unset TARGET_CC (and TARGET_CXX, TARGET_AR) first. Same story for CFLAGS on aarch64, which the image pre-sets to the broken sysroot. The alternative was patching bpi to use reqwest's `rustls-no-provider` plus an explicit ring provider, which would have required a runtime CryptoProvider::install_default() call and another upstream fork bump. Keeping rustls's default provider was preferred since the CI fix is self-contained. Musl targets were not failing in the latest run. If they break later the same TARGET_CC unset trick should apply. --- .github/workflows/CI.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4e96563..bcb3bf7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -71,6 +71,16 @@ jobs: target: x86_64-unknown-linux-gnu docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian build: | + set -e + apt-get update + apt-get install -y lld + # The napi-rs image pre-sets TARGET_CC/TARGET_CXX to a custom gcc + # that does not understand `-fuse-ld=lld`, which aws-lc-sys passes + # unconditionally for x86_64. aws-lc-sys reads TARGET_CC ahead of + # CC_ and CC, so we unset it so CC=clang (already in the + # image) takes effect; clang supports -fuse-ld=lld with lld + # installed. + unset TARGET_CC TARGET_CXX TARGET_AR rustup install $RUST_VERSION rustup default $RUST_VERSION rustup target add x86_64-unknown-linux-gnu @@ -94,7 +104,17 @@ jobs: build: | set -e apt-get update - apt-get install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross + apt-get install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross lld + # The napi-rs docker image pre-sets TARGET_CC and CFLAGS pointing + # to its custom cross-toolchain at /usr/aarch64-unknown-linux-gnu, + # whose sysroot lacks stdatomic.h. aws-lc-sys reads TARGET_CC + # ahead of CC_, so unset both and re-export the Debian + # cross-toolchain values below. + unset TARGET_CC TARGET_CXX TARGET_AR + unset CFLAGS + unset CC_aarch64_unknown_linux_gnu + unset CXX_aarch64_unknown_linux_gnu + unset AR_aarch64_unknown_linux_gnu export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ export AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar