Bump MSRV to 1.48.1

As per discussion [0] bump our MSRV for all crates in `rust-bitcoin`
repo to 1.48.1 [1].

[0] https://github.com/rust-bitcoin/rust-bitcoin/discussions/1329
[1] https://blog.rust-lang.org/2020/11/19/Rust-1.48.html
This commit is contained in:
Tobin C. Harding 2023-03-22 13:52:20 +11:00
parent dda3cb6fe2
commit 71fa9e81e7
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
4 changed files with 7 additions and 28 deletions

View File

@ -66,7 +66,7 @@ jobs:
run: ./contrib/test.sh run: ./contrib/test.sh
MSRV: MSRV:
name: Test - 1.41.1 toolchain name: Test - 1.48.0 toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@ -74,24 +74,10 @@ jobs:
- name: Checkout Crate - name: Checkout Crate
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Checkout Toolchain - name: Checkout Toolchain
uses: dtolnay/rust-toolchain@1.41.1 uses: dtolnay/rust-toolchain@1.48.0
- name: Running test script - name: Running test script
env: env:
DO_FEATURE_MATRIX: true DO_FEATURE_MATRIX: true
run: ./contrib/test.sh
NoStd:
name: Test - 1.47 toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@1.47
- name: Running test script
env:
DO_NO_STD: true DO_NO_STD: true
run: ./contrib/test.sh run: ./contrib/test.sh

View File

@ -12,7 +12,7 @@
<a href="https://github.com/rust-bitcoin/rust-bitcoin/blob/master/LICENSE"><img alt="CC0 1.0 Universal Licensed" src="https://img.shields.io/badge/license-CC0--1.0-blue.svg"/></a> <a href="https://github.com/rust-bitcoin/rust-bitcoin/blob/master/LICENSE"><img alt="CC0 1.0 Universal Licensed" src="https://img.shields.io/badge/license-CC0--1.0-blue.svg"/></a>
<a href="https://github.com/rust-bitcoin/rust-bitcoin/actions?query=workflow%3AContinuous%20integration"><img alt="CI Status" src="https://github.com/rust-bitcoin/rust-bitcoin/workflows/Continuous%20integration/badge.svg"></a> <a href="https://github.com/rust-bitcoin/rust-bitcoin/actions?query=workflow%3AContinuous%20integration"><img alt="CI Status" src="https://github.com/rust-bitcoin/rust-bitcoin/workflows/Continuous%20integration/badge.svg"></a>
<a href="https://docs.rs/bitcoin"><img alt="API Docs" src="https://img.shields.io/badge/docs.rs-bitcoin-green"/></a> <a href="https://docs.rs/bitcoin"><img alt="API Docs" src="https://img.shields.io/badge/docs.rs-bitcoin-green"/></a>
<a href="https://blog.rust-lang.org/2020/02/27/Rust-1.41.1.html"><img alt="Rustc Version 1.41.1+" src="https://img.shields.io/badge/rustc-1.41.1%2B-lightgrey.svg"/></a> <a href="https://blog.rust-lang.org/2020/02/27/Rust-1.48.0.html"><img alt="Rustc Version 1.48.0+" src="https://img.shields.io/badge/rustc-1.48.0%2B-lightgrey.svg"/></a>
<a href="https://gnusha.org/bitcoin-rust/"><img alt="Chat on IRC" src="https://img.shields.io/badge/irc-%23bitcoin--rust%20on%20libera.chat-blue"></a> <a href="https://gnusha.org/bitcoin-rust/"><img alt="Chat on IRC" src="https://img.shields.io/badge/irc-%23bitcoin--rust%20on%20libera.chat-blue"></a>
<a href="https://github.com/model-checking/kani"><imp alt="kani" src="https://github.com/rust-bitcoin/rust-bitcoin/actions/workflows/kani.yaml/badge.svg"></a> <a href="https://github.com/model-checking/kani"><imp alt="kani" src="https://github.com/rust-bitcoin/rust-bitcoin/actions/workflows/kani.yaml/badge.svg"></a>
<img alt="Lines of code" src="https://img.shields.io/tokei/lines/github/rust-bitcoin/rust-bitcoin"> <img alt="Lines of code" src="https://img.shields.io/tokei/lines/github/rust-bitcoin/rust-bitcoin">
@ -76,10 +76,9 @@ For more information please see `./CONTRIBUTING.md`.
## Minimum Supported Rust Version (MSRV) ## Minimum Supported Rust Version (MSRV)
This library should always compile with any combination of features (minus This library should always compile with any combination of features on **Rust 1.48.0**.
`no-std`) on **Rust 1.41.1** or **Rust 1.47** with `no-std`.
To build with the MSRV you will need to pin some dependencies (also for `no-std`): To build with the MSRV you will need to pin some dependencies:
``` ```
cargo update -p serde --precise 1.0.156 cargo update -p serde --precise 1.0.156
cargo update -p syn --precise 1.0.107 cargo update -p syn --precise 1.0.107

View File

@ -24,19 +24,13 @@ if cargo --version | grep beta; then
fi fi
# Pin dependencies as required if we are using MSRV toolchain. # Pin dependencies as required if we are using MSRV toolchain.
if cargo --version | grep "1\.41"; then if cargo --version | grep "1\.48"; then
# 1.0.157 uses syn 2.0 which requires edition 2018 # 1.0.157 uses syn 2.0 which requires edition 2018
cargo update -p serde --precise 1.0.156 cargo update -p serde --precise 1.0.156
# 1.0.108 uses `matches!` macro so does not work with Rust 1.41.1, bad `syn` no biscuit. # 1.0.108 uses `matches!` macro so does not work with Rust 1.41.1, bad `syn` no biscuit.
cargo update -p syn --precise 1.0.107 cargo update -p syn --precise 1.0.107
fi fi
# Pin dependencies as above (required for no-std tests that use Rust 1.47 toolchain).
if cargo --version | grep "1\.47"; then
cargo update -p serde --precise 1.0.156
cargo update -p syn --precise 1.0.107
fi
# We should not have any duplicate dependencies. This catches mistakes made upgrading dependencies # We should not have any duplicate dependencies. This catches mistakes made upgrading dependencies
# in one crate and not in another (e.g. upgrade bitcoin_hashes in bitcoin but not in secp). # in one crate and not in another (e.g. upgrade bitcoin_hashes in bitcoin but not in secp).
duplicate_dependencies=$( duplicate_dependencies=$(

View File

@ -11,7 +11,7 @@ since these are needed to display hashes anway.
## Minimum Supported Rust Version (MSRV) ## Minimum Supported Rust Version (MSRV)
This library should always compile with any combination of features on **Rust 1.41.1**. This library should always compile with any combination of features on **Rust 1.48.0**.
## Contributions ## Contributions