Bumped MSRV to 1.56.1 and added some documentation about semver (#218)

Also fixed benchmark build
This commit is contained in:
Michael Rosenberg 2022-10-16 18:51:26 -04:00 committed by GitHub
parent 9638ab40a5
commit 8319adbff4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 20 deletions

View file

@ -101,14 +101,14 @@ jobs:
args: --features "batch_deterministic"
msrv:
name: Current MSRV is 1.41
name: Current MSRV is 1.56.1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.41
toolchain: 1.56.1
override: true
- uses: actions-rs/cargo@v1
with:
@ -128,4 +128,4 @@ jobs:
with:
command: bench
# This filter selects no benchmarks, so we don't run any, only build them.
args: --features "batch" "DONTRUNBENCHMARKS"
args: --features "batch" "nonexistentbenchmark"

11
CHANGELOG.md Normal file
View file

@ -0,0 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Changes
* Bumped MSRV from 1.41 to 1.56.1
* Removed `ExpandedSecretKey` API ((#205)[https://github.com/dalek-cryptography/ed25519-dalek/pull/205])

View file

@ -1,7 +1,7 @@
[package]
name = "ed25519-dalek"
version = "1.0.1"
edition = "2018"
edition = "2021"
authors = ["isis lovecruft <isis@patternsinthevoid.net>"]
readme = "README.md"
license = "BSD-3-Clause"
@ -30,7 +30,7 @@ rand_core = { version = "0.5", default-features = false, optional = true }
serde_crate = { package = "serde", version = "1.0", default-features = false, optional = true }
serde_bytes = { version = "0.11", optional = true }
sha2 = { version = "0.9", default-features = false }
zeroize = { version = "~1.3", default-features = false }
zeroize = { version = "1", default-features = false }
[dev-dependencies]
hex = "^0.4"

View file

@ -11,10 +11,15 @@ Documentation is available [here](https://docs.rs/ed25519-dalek).
To install, add the following to your project's `Cargo.toml`:
```toml
[dependencies.ed25519-dalek]
version = "1"
```
# Minimum Supported Rust Version
This crate requires Rust 1.56.1 at a minimum. 1.x releases of this crate supported an MSRV of 1.41.
In the future, MSRV changes will be accompanied by a minor version bump.
# Changelog
See [CHANGELOG.md](CHANGELOG.md) for a list of changes made in past version of this crate.
# Benchmarks

View file

@ -21,9 +21,8 @@ mod ed25519_benches {
use ed25519_dalek::PublicKey;
use ed25519_dalek::Signature;
use ed25519_dalek::Signer;
use ed25519_dalek::verify_batch;
use rand::thread_rng;
use rand::prelude::ThreadRng;
use rand::thread_rng;
fn sign(c: &mut Criterion) {
let mut csprng: ThreadRng = thread_rng();
@ -38,9 +37,9 @@ mod ed25519_benches {
let keypair: Keypair = Keypair::generate(&mut csprng);
let msg: &[u8] = b"";
let sig: Signature = keypair.sign(msg);
c.bench_function("Ed25519 signature verification", move |b| {
b.iter(| | keypair.verify(msg, &sig))
b.iter(|| keypair.verify(msg, &sig))
});
}
@ -51,7 +50,7 @@ mod ed25519_benches {
let sig: Signature = keypair.sign(msg);
c.bench_function("Ed25519 strict signature verification", move |b| {
b.iter(| | keypair.verify_strict(msg, &sig))
b.iter(|| keypair.verify_strict(msg, &sig))
});
}
@ -62,7 +61,8 @@ mod ed25519_benches {
"Ed25519 batch signature verification",
|b, &&size| {
let mut csprng: ThreadRng = thread_rng();
let keypairs: Vec<Keypair> = (0..size).map(|_| Keypair::generate(&mut csprng)).collect();
let keypairs: Vec<Keypair> =
(0..size).map(|_| Keypair::generate(&mut csprng)).collect();
let msg: &[u8] = b"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
let messages: Vec<&[u8]> = (0..size).map(|_| msg).collect();
let signatures: Vec<Signature> =
@ -80,11 +80,11 @@ mod ed25519_benches {
let mut csprng: ThreadRng = thread_rng();
c.bench_function("Ed25519 keypair generation", move |b| {
b.iter(| | Keypair::generate(&mut csprng))
b.iter(|| Keypair::generate(&mut csprng))
});
}
criterion_group!{
criterion_group! {
name = ed25519_benches;
config = Criterion::default();
targets =
@ -96,6 +96,4 @@ mod ed25519_benches {
}
}
criterion_main!(
ed25519_benches::ed25519_benches,
);
criterion_main!(ed25519_benches::ed25519_benches);