Skip to content

Commit be24841

Browse files
authored
Merge pull request lightningdevkit#4002 from tnull/2025-08-bump-msrv-to-1.85
Bump MSRV to 1.75.0
2 parents 8501afa + 165a6b3 commit be24841

File tree

37 files changed

+94
-135
lines changed

37 files changed

+94
-135
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
platform: [ self-hosted, windows-latest, macos-latest ]
34-
toolchain: [ stable, beta, 1.63.0 ] # 1.63.0 is the MSRV for all crates but `lightning-transaction-sync`.
34+
toolchain: [ stable, beta, 1.75.0 ] # 1.75.0 is the MSRV for all crates
3535
exclude:
3636
- platform: windows-latest
37-
toolchain: 1.63.0
37+
toolchain: 1.75.0
3838
- platform: windows-latest
3939
toolchain: beta
4040
- platform: macos-latest
@@ -60,7 +60,7 @@ jobs:
6060
shellcheck ci/*.sh -aP ci
6161
shellcheck contrib/*.sh -aP contrib
6262
- name: Set RUSTFLAGS to deny warnings
63-
if: "matrix.toolchain == '1.63.0'"
63+
if: "matrix.toolchain == '1.75.0'"
6464
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
6565
- name: Run CI script
6666
shell: bash # Default on Winblows is powershell
@@ -71,7 +71,7 @@ jobs:
7171
fail-fast: false
7272
matrix:
7373
platform: [ ubuntu-latest, macos-latest ]
74-
toolchain: [ stable, beta, 1.75.0 ] # 1.75.0 is the MSRV for `lightning-transaction-sync`.
74+
toolchain: [ stable, beta, 1.75.0 ]
7575
runs-on: ${{ matrix.platform }}
7676
steps:
7777
- name: Checkout source code
@@ -254,17 +254,13 @@ jobs:
254254
fuzz:
255255
runs-on: self-hosted
256256
env:
257-
TOOLCHAIN: 1.63
257+
TOOLCHAIN: 1.75
258258
steps:
259259
- name: Checkout source code
260260
uses: actions/checkout@v4
261261
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
262262
run: |
263263
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
264-
- name: Pin the regex dependency
265-
run: |
266-
cd fuzz && cargo update -p regex --precise "1.9.6" --verbose
267-
cd write-seeds && cargo update -p regex --precise "1.9.6" --verbose
268264
- name: Sanity check fuzz targets on Rust ${{ env.TOOLCHAIN }}
269265
run: |
270266
cd fuzz
@@ -293,7 +289,7 @@ jobs:
293289
rustfmt:
294290
runs-on: ubuntu-latest
295291
env:
296-
TOOLCHAIN: 1.63.0
292+
TOOLCHAIN: 1.75.0
297293
steps:
298294
- name: Checkout source code
299295
uses: actions/checkout@v4

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ be covered by functional tests.
8888
When refactoring, structure your PR to make it easy to review and don't
8989
hesitate to split it into multiple small, focused PRs.
9090

91-
The Minimum Supported Rust Version (MSRV) currently is 1.63.0 (enforced by
91+
The Minimum Supported Rust Version (MSRV) currently is 1.75.0 (enforced by
9292
our GitHub Actions). We support reading serialized LDK objects written by any
9393
version of LDK 0.0.99 and above. We support LDK versions 0.0.113 and above
9494
reading serialized LDK objects written by modern LDK. Any expected issues with
@@ -124,7 +124,7 @@ display fine at any tab-length display setting. We use `rustfmt` to establish
124124
uniform coding standards throughout the codebase. Please run
125125

126126
```bash
127-
cargo +1.63.0 fmt
127+
cargo +1.75.0 fmt
128128
```
129129

130130
before committing and pushing any changes, as compliance will also be checked

ci/check-lint.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ CLIPPY() {
4747
-A clippy::len_without_is_empty \
4848
-A clippy::len_zero \
4949
-A clippy::let_and_return \
50-
-A clippy::manual_div_ceil `# to be removed once we hit MSRV 1.73.0` \
5150
-A clippy::manual_filter \
5251
-A clippy::manual_map \
5352
-A clippy::manual_memcpy \
@@ -106,9 +105,7 @@ CLIPPY() {
106105
-A clippy::unnecessary_unwrap \
107106
-A clippy::unused_unit \
108107
-A clippy::useless_conversion \
109-
-A clippy::unnecessary_map_or `# to be removed once we hit MSRV 1.70` \
110108
-A clippy::manual_repeat_n `# to be removed once we hit MSRV 1.86` \
111-
-A clippy::io_other_error `# to be removed once we hit MSRV 1.74` \
112109
-A clippy::manual_is_multiple_of `# to be removed once we hit MSRV 1.87` \
113110
-A clippy::uninlined-format-args
114111
}

ci/ci-tests.sh

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,20 @@
22
#shellcheck disable=SC2002,SC2207
33
set -eox pipefail
44

5-
RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
5+
# Currently unused as we don't have to pin anything for MSRV:
6+
#RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
67

78
# Some crates require pinning to meet our MSRV even for our downstream users,
89
# which we do here.
910
# Further crates which appear only as dev-dependencies are pinned further down.
1011
function PIN_RELEASE_DEPS {
11-
# Starting with version 1.39.0, the `tokio` crate has an MSRV of rustc 1.70.0
12-
[ "$RUSTC_MINOR_VERSION" -lt 70 ] && cargo update -p tokio --precise "1.38.1" --verbose
13-
1412
return 0 # Don't fail the script if our rustc is higher than the last check
1513
}
1614

1715
PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
1816

19-
# Starting with version 1.10.0, the `regex` crate has an MSRV of rustc 1.65.0.
20-
[ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p regex --precise "1.9.6" --verbose
21-
22-
# The addr2line v0.21 crate (a dependency of `backtrace` starting with 0.3.69) relies on rustc 1.65
23-
[ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p backtrace --precise "0.3.68" --verbose
24-
25-
# The once_cell v1.21.0 crate (a dependency of `proptest`) relies on rustc 1.70
26-
[ "$RUSTC_MINOR_VERSION" -lt 70 ] && cargo update -p once_cell --precise "1.20.3" --verbose
27-
28-
# proptest 1.3.0 requires rustc 1.64.0
29-
[ "$RUSTC_MINOR_VERSION" -lt 64 ] && cargo update -p proptest --precise "1.2.0" --verbose
30-
31-
# parking_lot 0.12.4 requires rustc 1.64.0
32-
[ "$RUSTC_MINOR_VERSION" -lt 64 ] && cargo update -p parking_lot --precise "0.12.3" --verbose
33-
34-
# parking_lot_core 0.9.11 requires rustc 1.64.0
35-
[ "$RUSTC_MINOR_VERSION" -lt 64 ] && cargo update -p parking_lot_core --precise "0.9.10" --verbose
36-
37-
# lock_api 0.4.13 requires rustc 1.64.0
38-
[ "$RUSTC_MINOR_VERSION" -lt 64 ] && cargo update -p lock_api --precise "0.4.12" --verbose
17+
# The backtrace v0.3.75 crate relies on rustc 1.82
18+
[ "$RUSTC_MINOR_VERSION" -lt 82 ] && cargo update -p backtrace --precise "0.3.74" --verbose
3919

4020
export RUST_BACKTRACE=1
4121

@@ -49,7 +29,6 @@ cargo test --verbose --color always
4929

5030
echo -e "\n\nTesting upgrade from prior versions of LDK"
5131
pushd lightning-tests
52-
[ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p regex --precise "1.9.6" --verbose
5332
cargo test
5433
popd
5534

lightning-background-processor/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description = """
88
Utilities to perform required background tasks for Rust Lightning.
99
"""
1010
edition = "2021"
11+
rust-version = "1.75"
1112

1213
[package.metadata.docs.rs]
1314
all-features = true

lightning-block-sync/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description = """
88
Utilities to fetch the chain data from a block source and feed them into Rust Lightning.
99
"""
1010
edition = "2021"
11+
rust-version = "1.75"
1112

1213
[package.metadata.docs.rs]
1314
all-features = true

lightning-custom-message/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description = """
88
Utilities for supporting custom peer-to-peer messages in LDK.
99
"""
1010
edition = "2021"
11+
rust-version = "1.75"
1112

1213
[package.metadata.docs.rs]
1314
all-features = true

lightning-dns-resolver/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ license = "MIT OR Apache-2.0"
66
repository = "https://github.com/lightningdevkit/rust-lightning/"
77
description = "A crate which implements DNSSEC resolution for lightning clients over bLIP 32 using `tokio` and the `dnssec-prover` crate."
88
edition = "2021"
9+
rust-version = "1.75"
910

1011
[dependencies]
1112
lightning = { version = "0.2.0", path = "../lightning", default-features = false }

lightning-invoice/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ keywords = [ "lightning", "bitcoin", "invoice", "BOLT11" ]
99
readme = "README.md"
1010
repository = "https://github.com/lightningdevkit/rust-lightning/"
1111
edition = "2021"
12+
rust-version = "1.75"
1213

1314
[package.metadata.docs.rs]
1415
all-features = true

lightning-invoice/src/de.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl FromBase32 for Bolt11InvoiceFeatures {
102102
// Carry bits, 0, 1, 2, 3, or 4 bits
103103
let mut carry_bits = 0;
104104
let mut carry = 0u8;
105-
let expected_raw_length = (field_data.len() * 5 + 7) / 8;
105+
let expected_raw_length = (field_data.len() * 5).div_ceil(8);
106106
let mut output = Vec::<u8>::with_capacity(expected_raw_length);
107107

108108
// Iterate over input in reverse

0 commit comments

Comments
 (0)