Skip to content

Commit

Permalink
(async-)signature: MSRV 1.60 (#1387)
Browse files Browse the repository at this point in the history
To simplify the workspace, which contains weak/namespaced features, this
bumps both `async-signature` and `signature` to MSRV 1.60.

So as for the bump to have some justification, it adds weak feature
activation for `rand_core?/std`, and uses this impl to write a
`From<rand_core::Error>` conversion which can preserve the original
error as the boxed source.
  • Loading branch information
tarcieri authored Nov 12, 2023
1 parent b3313d9 commit c4cd5eb
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 213 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/async-signature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.0 # MSRV
- 1.60.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/signature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.0 # MSRV
- 1.60.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.0 # MSRV
- 1.60.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
Expand All @@ -69,7 +69,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.0 # MSRV
- 1.60.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
Expand Down
49 changes: 48 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ members = [
"elliptic-curve",
"kem",
"password-hash",
"universal-hash",
]
# TODO: re-add to `members` when MSRV has been bumped to 1.60+
exclude = [
"signature",
"signature/async",
"universal-hash",
]

[patch.crates-io]
Expand Down
2 changes: 1 addition & 1 deletion crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cipher = { version = "0.4", optional = true }
digest = { version = "0.10", optional = true, features = ["mac"] }
elliptic-curve = { version = "0.13", optional = true, path = "../elliptic-curve" }
password-hash = { version = "0.5", optional = true, path = "../password-hash" }
signature = { version = "2", optional = true, default-features = false, path = "../signature" }
signature = { version = "2", optional = true, default-features = false }
universal-hash = { version = "0.5", optional = true }

[features]
Expand Down
189 changes: 0 additions & 189 deletions signature/Cargo.lock

This file was deleted.

10 changes: 3 additions & 7 deletions signature/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "signature"
description = "Traits for cryptographic signature algorithms (e.g. ECDSA, Ed25519)"
version = "2.1.0"
version = "2.2.0-pre"
authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
documentation = "https://docs.rs/signature"
Expand All @@ -10,7 +10,7 @@ readme = "README.md"
keywords = ["crypto", "ecdsa", "ed25519", "signature", "signing"]
categories = ["cryptography", "no-std"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.60"

[dependencies]
derive = { package = "signature_derive", version = "2", optional = true, path = "derive" }
Expand All @@ -23,12 +23,8 @@ sha2 = { version = "0.10", default-features = false }

[features]
alloc = []
std = ["alloc"]
std = ["alloc", "rand_core?/std"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

# TODO(tarcieri): remove when these crates are added to toplevel `members`
[workspace]
members = [".", "async"]
4 changes: 2 additions & 2 deletions signature/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the [RustCrypto] organization, as well as [`ed25519-dalek`].

## Minimum Supported Rust Version

Rust **1.56** or higher.
Rust **1.60** or higher.

Minimum supported Rust version can be changed in the future, but it will be
done with a minor version bump.
Expand Down Expand Up @@ -56,7 +56,7 @@ dual licensed as above, without any additional terms or conditions.
[build-image]: https://github.com/RustCrypto/traits/actions/workflows/signature.yml/badge.svg
[build-link]: https://github.com/RustCrypto/traits/actions/workflows/signature.yml
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260048-signatures

Expand Down
6 changes: 3 additions & 3 deletions signature/async/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "async-signature"
description = "Traits for cryptographic signature algorithms (e.g. ECDSA, Ed25519)"
version = "0.3.0"
version = "0.4.0-pre"
authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
documentation = "https://docs.rs/async-signature"
Expand All @@ -10,11 +10,11 @@ readme = "README.md"
keywords = ["crypto", "ecdsa", "ed25519", "signature", "signing"]
categories = ["cryptography", "no-std"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.60"

[dependencies]
async-trait = "0.1.9"
signature = { version = "2.0, <2.2", path = ".." }
signature = { version = "=2.2.0-pre", path = ".." }

[features]
digest = ["signature/digest"]
Expand Down
Loading

0 comments on commit c4cd5eb

Please sign in to comment.