Skip to content

Commit aab05e6

Browse files
committed
signature: Rust 2021 edition upgrade; MSRV 1.56
Since we have PRs that demand an MSRV bump (#1080), bumps the crate's edition to the latest, which requires MSRV 1.56.
1 parent 6af5706 commit aab05e6

File tree

10 files changed

+34
-81
lines changed

10 files changed

+34
-81
lines changed

.github/workflows/signature.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
rust:
25-
- 1.41.0 # MSRV
25+
- 1.56.0 # MSRV
2626
- stable
2727
target:
2828
- thumbv7em-none-eabi
@@ -36,8 +36,6 @@ jobs:
3636
target: ${{ matrix.target }}
3737
override: true
3838
profile: minimal
39-
# Isolate this crate from workspace which is otherwise MSRV 1.56 due to 2021 edition crates
40-
- run: rm ../Cargo.toml
4139
- run: cargo build --no-default-features --release --target ${{ matrix.target }}
4240

4341
minimal-versions:
@@ -50,7 +48,7 @@ jobs:
5048
strategy:
5149
matrix:
5250
rust:
53-
- 1.41.0 # MSRV
51+
- 1.56.0 # MSRV
5452
- stable
5553
steps:
5654
- uses: actions/checkout@v2
@@ -60,8 +58,6 @@ jobs:
6058
toolchain: ${{ matrix.rust }}
6159
override: true
6260
profile: minimal
63-
# Isolate this crate from workspace which is otherwise MSRV 1.56 due to 2021 edition crates
64-
- run: rm ../Cargo.toml
6561
- run: cargo check --all-features
6662
- run: cargo test --no-default-features --release
6763
- run: cargo test --release

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crypto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cipher = { version = "0.4", optional = true }
2323
digest = { version = "0.10", optional = true, features = ["mac"] }
2424
elliptic-curve = { version = "0.12", optional = true, path = "../elliptic-curve" }
2525
password-hash = { version = "0.4", optional = true, path = "../password-hash" }
26-
signature = { version = "1.5", optional = true, default-features = false, path = "../signature" }
26+
signature = { version = "=1.6.0-pre", optional = true, default-features = false, path = "../signature" }
2727
universal-hash = { version = "0.5", optional = true, path = "../universal-hash" }
2828

2929
[features]

signature/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[package]
22
name = "signature"
33
description = "Traits for cryptographic signature algorithms (e.g. ECDSA, Ed25519)"
4-
version = "1.5.0" # Also update html_root_url in lib.rs when bumping this
4+
version = "1.6.0-pre"
55
authors = ["RustCrypto Developers"]
66
license = "Apache-2.0 OR MIT"
77
documentation = "https://docs.rs/signature"
88
repository = "https://github.com/RustCrypto/traits/tree/master/signature"
99
readme = "README.md"
10-
edition = "2018"
10+
edition = "2021"
11+
rust-version = "1.56"
1112
keywords = ["crypto", "ecdsa", "ed25519", "signature", "signing"]
1213
categories = ["cryptography", "no-std"]
1314

signature/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
[![crate][crate-image]][crate-link]
44
[![Docs][docs-image]][docs-link]
5+
[![Build Status][build-image]][build-link]
56
![Apache2/MIT licensed][license-image]
67
![Rust Version][rustc-image]
78
[![Project Chat][chat-image]][chat-link]
8-
[![Build Status][build-image]][build-link]
99

1010
This crate contains traits which provide generic, object-safe APIs for
1111
generating and verifying [digital signatures][1].
1212

1313
Used by the [`ecdsa`][2] and [`ed25519`][3] crates, with forthcoming support
1414
in the [`rsa`][4] crate.
1515

16-
See also the [Signatory][5] project for trait wrappers for using these traits
16+
See also the [Signatory][5] crate for trait wrappers for using these traits
1717
with many popular Rust cryptography crates, including `ed25519-dalek`, *ring*,
1818
`secp256k1-rs`, and `sodiumoxide`.
1919

2020
[Documentation][docs-link]
2121

2222
## Minimum Supported Rust Version
2323

24-
Rust **1.41** or higher.
24+
Rust **1.56** or higher.
2525

2626
Minimum supported Rust version can be changed in the future, but it will be
2727
done with a minor version bump.
@@ -52,16 +52,16 @@ dual licensed as above, without any additional terms or conditions.
5252

5353
[//]: # (badges)
5454

55-
[crate-image]: https://img.shields.io/crates/v/signature.svg
55+
[crate-image]: https://buildstats.info/crate/signature
5656
[crate-link]: https://crates.io/crates/signature
5757
[docs-image]: https://docs.rs/signature/badge.svg
5858
[docs-link]: https://docs.rs/signature/
59+
[build-image]: https://github.com/RustCrypto/traits/actions/workflows/signature.yml/badge.svg
60+
[build-link]: https://github.com/RustCrypto/traits/actions/workflows/signature.yml
5961
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
60-
[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
62+
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
6163
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
6264
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260048-signatures
63-
[build-image]: https://github.com/RustCrypto/traits/workflows/signature/badge.svg?branch=master&event=push
64-
[build-link]: https://github.com/RustCrypto/traits/actions?query=workflow%3Asignature
6565

6666
[//]: # (general links)
6767

signature/async/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "async-signature"
33
description = "Traits for cryptographic signature algorithms (e.g. ECDSA, Ed25519)"
4-
version = "0.2.0-pre" # Also update html_root_url in lib.rs when bumping this
4+
version = "0.2.0-pre"
55
authors = ["RustCrypto Developers"]
66
license = "Apache-2.0 OR MIT"
77
documentation = "https://docs.rs/async-signature"
@@ -14,7 +14,7 @@ rust-version = "1.56"
1414

1515
[dependencies]
1616
async-trait = "0.1.9"
17-
signature = { version = "1.5", path = ".." }
17+
signature = { version = "=1.6.0-pre", path = ".." }
1818

1919
[features]
2020
digest = ["signature/digest-preview"]

signature/async/src/lib.rs

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
1-
//! RustCrypto: `async-signature` crate.
2-
//!
3-
//! This is an experimental crate containing `async` versions of select traits
4-
//! from the [`signature`] crate, namely [`AsyncSigner`] and when the `digest`
5-
//! feature is enabled, [`AsyncDigestSigner`].
6-
//!
7-
//! Traits are implemented using [`async-trait`], which rewrites the traits to
8-
//! use `Box`-ed futures.
9-
//!
10-
//! The longer-term goal is to move these traits into the [`signature`] crate
11-
//! itself, however before doing so we'd like to remove the [`async-trait`]
12-
//! dependency in order to enable use in `no_std` environments. This crate
13-
//! is a stopgap until that happens.
14-
//!
15-
//! For more information, see:
16-
//! <https://github.com/RustCrypto/traits/issues/304>
17-
//!
18-
//! [`async-trait`]: https://docs.rs/async-trait
19-
20-
#![cfg_attr(docsrs, feature(doc_cfg))]
1+
#![doc = include_str!("../README.md")]
212
#![doc(
223
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
23-
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
24-
html_root_url = "https://docs.rs/async-signature/0.2.0-pre"
4+
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
255
)]
6+
#![cfg_attr(docsrs, feature(doc_cfg))]
267
#![forbid(unsafe_code)]
278
#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
289

signature/derive/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ description = "Custom derive support for the 'signature' crate"
77
documentation = "https://docs.rs/signature"
88
repository = "https://github.com/RustCrypto/traits/tree/master/signature/derive"
99
readme = "README.md"
10-
edition = "2018"
10+
edition = "2021"
11+
rust-version = "1.56"
1112
keywords = ["crypto", "ecdsa", "ed25519", "signature", "signing"]
1213
categories = ["cryptography", "no-std"]
1314

signature/derive/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
//! Custom derive support for the `signature` crate.
2-
//!
3-
//! This crate can be used to derive `Signer` and `Verifier` impls for
4-
//! types that impl `DigestSigner` or `DigestVerifier` respectively.
5-
61
#![crate_type = "proc-macro"]
2+
#![doc = include_str!("../README.md")]
73
#![deny(warnings, unused_import_braces, unused_qualifications)]
84
#![forbid(unsafe_code)]
95

signature/src/lib.rs

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
1-
//! RustCrypto: `signature` crate.
2-
//!
3-
//! Traits which provide generic, object-safe APIs for generating and verifying
4-
//! digital signatures, i.e. message authentication using public-key cryptography.
5-
//!
6-
//! ## Minimum Supported Rust Version
7-
//!
8-
//! Rust **1.41** or higher.
9-
//!
10-
//! Minimum supported Rust version may be changed in the future, but such
11-
//! changes will be accompanied with a minor version bump.
12-
//!
13-
//! ## SemVer policy
14-
//!
15-
//! - MSRV is considered exempt from SemVer as noted above
16-
//! - All on-by-default features of this library are covered by SemVer
17-
//! - Off-by-default features ending in `*-preview` (e.g. `derive-preview`,
18-
//! `digest-preview`) are unstable "preview" features which are also
19-
//! considered exempt from SemVer (typically because they rely on pre-1.0
20-
//! crates as dependencies). However, breaking changes to these features
21-
//! will, like MSRV, also be accompanied by a minor version bump.
22-
//!
1+
#![no_std]
2+
#![doc = include_str!("../README.md")]
3+
#![doc(
4+
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
5+
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
6+
)]
7+
#![cfg_attr(docsrs, feature(doc_cfg))]
8+
#![forbid(unsafe_code)]
9+
#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
10+
2311
//! # Design
2412
//!
2513
//! This crate provides a common set of traits for signing and verifying
@@ -155,16 +143,6 @@
155143
//! [`Digest`]: https://docs.rs/digest/latest/digest/trait.Digest.html
156144
//! [Fiat-Shamir heuristic]: https://en.wikipedia.org/wiki/Fiat%E2%80%93Shamir_heuristic
157145
158-
#![no_std]
159-
#![cfg_attr(docsrs, feature(doc_cfg))]
160-
#![doc(
161-
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
162-
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
163-
html_root_url = "https://docs.rs/signature/1.5.0"
164-
)]
165-
#![forbid(unsafe_code)]
166-
#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
167-
168146
#[cfg(feature = "std")]
169147
extern crate std;
170148

0 commit comments

Comments
 (0)