From a2b78f402229607dec1766173a061b5ad5d35e1a Mon Sep 17 00:00:00 2001
From: "Tobin C. Harding"
Date: Wed, 27 Mar 2024 10:20:53 +1100
Subject: [PATCH 1/2] Bump MSRV to 1.56.1
As we have done in other parts of the ecosystem bump the MSRV to Rust
`v1.56.1`.
Done for `secp256k1` and `secp256k1-sys`.
---
.github/workflows/rust.yml | 4 ++--
CHANGELOG.md | 4 ++++
Cargo.toml | 3 ++-
README.md | 4 ++--
clippy.toml | 2 +-
secp256k1-sys/CHANGELOG.md | 4 ++++
secp256k1-sys/Cargo.toml | 3 ++-
secp256k1-sys/README.md | 4 ++--
8 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 56d4838ce..f435fdda7 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -55,7 +55,7 @@ jobs:
run: ./contrib/test.sh
MSRV:
- name: Test - 1.48.0 toolchain
+ name: Test - 1.56.1 toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
@@ -63,7 +63,7 @@ jobs:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
- uses: dtolnay/rust-toolchain@1.48.0
+ uses: dtolnay/rust-toolchain@1.56.1
- name: Running test script
env:
DO_FEATURE_MATRIX: true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index db7cbb266..928049dd1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# Unreleased
+
+* Bump MSRV to Rust `v1.56.1`
+
# 0.28.2 - 2024-01-30
* Implement `Hash` for `Scalar` [#674](https://github.com/rust-bitcoin/rust-secp256k1/pull/674)
diff --git a/Cargo.toml b/Cargo.toml
index 942835bb7..b6e1dcf72 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,8 @@ documentation = "https://docs.rs/secp256k1/"
description = "Rust wrapper library for Pieter Wuille's `libsecp256k1`. Implements ECDSA and BIP 340 signatures for the SECG elliptic curve group secp256k1 and related utilities."
keywords = [ "crypto", "ECDSA", "secp256k1", "libsecp256k1", "bitcoin" ]
readme = "README.md"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56.1"
[package.metadata.docs.rs]
all-features = true
diff --git a/README.md b/README.md
index ca4efa31b..7cb55adf3 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
-
+
@@ -29,7 +29,7 @@ Contributions to this library are welcome. A few guidelines:
* Any breaking changes must have an accompanied entry in CHANGELOG.md
* No new dependencies, please.
* No crypto should be implemented in Rust, with the possible exception of hash functions. Cryptographic contributions should be directed upstream to libsecp256k1.
-* This library should always compile with any combination of features on **Rust 1.48.0**.
+* This library should always compile with any combination of features on **Rust 1.56.1**.
### Githooks
diff --git a/clippy.toml b/clippy.toml
index 11d46a73f..56ce04e44 100644
--- a/clippy.toml
+++ b/clippy.toml
@@ -1 +1 @@
-msrv = "1.48.0"
+msrv = "1.56.1"
diff --git a/secp256k1-sys/CHANGELOG.md b/secp256k1-sys/CHANGELOG.md
index 327792a31..77e84853d 100644
--- a/secp256k1-sys/CHANGELOG.md
+++ b/secp256k1-sys/CHANGELOG.md
@@ -1,3 +1,7 @@
+# Unreleased
+
+* Bump MSRV to Rust `v1.56.1`
+
# 0.9.2 - 2023-12-18
* Fix incorrect FFI binding for `secp256k1_pubkey_combine`
diff --git a/secp256k1-sys/Cargo.toml b/secp256k1-sys/Cargo.toml
index f565c5bd9..2ca55b53d 100644
--- a/secp256k1-sys/Cargo.toml
+++ b/secp256k1-sys/Cargo.toml
@@ -13,7 +13,8 @@ keywords = [ "secp256k1", "libsecp256k1", "ffi" ]
readme = "README.md"
build = "build.rs"
links = "rustsecp256k1_v0_9_2"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56.1"
[package.metadata.docs.rs]
all-features = true
diff --git a/secp256k1-sys/README.md b/secp256k1-sys/README.md
index 3305e2d37..5d4649b7f 100644
--- a/secp256k1-sys/README.md
+++ b/secp256k1-sys/README.md
@@ -5,7 +5,7 @@
-
+
@@ -49,4 +49,4 @@ to your `RUSTFLAGS` variable.
## Minimum Supported Rust Version
-This library should always compile with any combination of features on **Rust 1.48.0**.
+This library should always compile with any combination of features on **Rust 1.56.1**.
From 2d0c7835f153962ca6cacce7532a70c00fda42c4 Mon Sep 17 00:00:00 2001
From: "Tobin C. Harding"
Date: Thu, 28 Mar 2024 10:07:44 +1100
Subject: [PATCH 2/2] Tighten the version grep in vendor script
We just added `rust-version = ` to the `secp256k1-sys` manifest, doing
so causes a grep statement from the vendor script to match this line -
we don't want that.
Tighten up the grep statement by only matching on `version` at the start
of the line.
---
secp256k1-sys/vendor-libsecp.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/secp256k1-sys/vendor-libsecp.sh b/secp256k1-sys/vendor-libsecp.sh
index ed437fc07..735bb0189 100755
--- a/secp256k1-sys/vendor-libsecp.sh
+++ b/secp256k1-sys/vendor-libsecp.sh
@@ -8,7 +8,7 @@ else
SECP_VENDOR_GIT_ROOT="$(realpath "$SECP_VENDOR_GIT_ROOT")"
fi
SECP_SYS="$SECP_VENDOR_GIT_ROOT"/secp256k1-sys
-DEFAULT_VERSION_CODE=$(grep version "$SECP_SYS/Cargo.toml" | sed 's/\./_/g' | sed 's/.*"\(.*\)".*/\1/')
+DEFAULT_VERSION_CODE=$(grep "^version" "$SECP_SYS/Cargo.toml" | sed 's/\./_/g' | sed 's/.*"\(.*\)".*/\1/')
DEFAULT_DEPEND_DIR="$SECP_SYS/depend"
DEFAULT_SECP_REPO=https://github.com/bitcoin-core/secp256k1.git