mirror of
https://github.com/logos-blockchain/sponges.git
synced 2026-07-29 18:13:17 +00:00
Upgrade to Rust 2024 edition; MSRV 1.85 (#89)
This commit is contained in:
parent
13e501fa4e
commit
2bc1c383a4
4
.github/workflows/ascon.yml
vendored
4
.github/workflows/ascon.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
set-msrv:
|
||||
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
|
||||
with:
|
||||
msrv: 1.81.0
|
||||
msrv: 1.85.0
|
||||
|
||||
build:
|
||||
needs: set-msrv
|
||||
@ -46,7 +46,7 @@ jobs:
|
||||
minimal-versions:
|
||||
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
|
||||
with:
|
||||
working-directory: ${{ github.workflow }}
|
||||
working-directory: ${{ github.workflow }}
|
||||
|
||||
test:
|
||||
needs: set-msrv
|
||||
|
||||
8
.github/workflows/keccak.yml
vendored
8
.github/workflows/keccak.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
set-msrv:
|
||||
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
|
||||
with:
|
||||
msrv: 1.81.0
|
||||
msrv: 1.85.0
|
||||
|
||||
build:
|
||||
needs: set-msrv
|
||||
@ -46,8 +46,8 @@ jobs:
|
||||
minimal-versions:
|
||||
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
|
||||
with:
|
||||
working-directory: ${{ github.workflow }}
|
||||
stable-cmd: cargo hack test --release --feature-powerset --skip simd # `simd` requires nightly
|
||||
working-directory: ${{ github.workflow }}
|
||||
stable-cmd: cargo hack test --release --feature-powerset --skip simd # `simd` requires nightly
|
||||
|
||||
test:
|
||||
needs: set-msrv
|
||||
@ -111,7 +111,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
|
||||
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
|
||||
working-directory: .
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
2
.github/workflows/workspace.yml
vendored
2
.github/workflows/workspace.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
- uses: RustCrypto/actions/cargo-cache@master
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: 1.82.0
|
||||
toolchain: 1.85.0
|
||||
components: clippy
|
||||
- run: cargo clippy --all -- -D warnings
|
||||
|
||||
|
||||
@ -13,11 +13,11 @@ repository = "https://github.com/RustCrypto/sponges"
|
||||
keywords = ["Ascon", "crypto", "permutation"]
|
||||
categories = ["cryptography", "no-std"]
|
||||
readme = "README.md"
|
||||
edition = "2021"
|
||||
rust-version = "1.81"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
|
||||
[dependencies]
|
||||
zeroize = { version = "1.6.0", default-features = false, optional=true }
|
||||
zeroize = { version = "1.6.0", default-features = false, optional = true }
|
||||
|
||||
[features]
|
||||
no_unroll = [] # Do not unroll loops for binary size reduction
|
||||
|
||||
@ -29,7 +29,7 @@ portfolio of the [CAESAR competition].
|
||||
|
||||
## Minimum Supported Rust Version
|
||||
|
||||
This crate requires **Rust 1.81** at a minimum.
|
||||
This crate requires **Rust 1.85** at a minimum.
|
||||
|
||||
We may change the MSRV in the future, but it will be accompanied by a minor
|
||||
version bump.
|
||||
@ -58,7 +58,7 @@ dual licensed as above, without any additional terms or conditions.
|
||||
[build-image]: https://github.com/RustCrypto/sponges/actions/workflows/ascon.yml/badge.svg
|
||||
[build-link]: https://github.com/RustCrypto/sponges/actions/workflows/ascon.yml
|
||||
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
|
||||
[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg
|
||||
[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg
|
||||
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
|
||||
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/369879-sponges
|
||||
|
||||
|
||||
@ -6,8 +6,8 @@ authors = [
|
||||
"Sebastian Ramacher <sebastian.ramacher@ait.ac.at>",
|
||||
"RustCrypto Developers",
|
||||
]
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
publish = false
|
||||
|
||||
[workspace]
|
||||
|
||||
@ -13,8 +13,8 @@ repository = "https://github.com/RustCrypto/sponges"
|
||||
keywords = ["crypto", "sponge", "keccak", "keccak-f", "keccak-p"]
|
||||
categories = ["cryptography", "no-std"]
|
||||
readme = "README.md"
|
||||
edition = "2021"
|
||||
rust-version = "1.81"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
|
||||
[features]
|
||||
asm = [] # Use optimized assembly when available (currently only ARMv8)
|
||||
|
||||
@ -22,7 +22,7 @@ is built on this crate.
|
||||
|
||||
## Minimum Supported Rust Version
|
||||
|
||||
Rust **1.81** or higher.
|
||||
Rust **1.85** or higher.
|
||||
|
||||
Minimum supported Rust version can be changed in the future, but it will be
|
||||
done with a minor version bump.
|
||||
@ -56,7 +56,7 @@ dual licensed as above, without any additional terms or conditions.
|
||||
[build-image]: https://github.com/RustCrypto/sponges/actions/workflows/keccak.yml/badge.svg
|
||||
[build-link]: https://github.com/RustCrypto/sponges/actions/workflows/keccak.yml
|
||||
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
|
||||
[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg
|
||||
[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg
|
||||
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
|
||||
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/369879-sponges
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
extern crate keccak;
|
||||
extern crate test;
|
||||
|
||||
use keccak::{f1600, f200, f400, f800, p1600};
|
||||
use keccak::{f200, f400, f800, f1600, p1600};
|
||||
|
||||
macro_rules! impl_bench {
|
||||
($name:ident, $fn:ident, $type:expr) => {
|
||||
|
||||
@ -202,7 +202,7 @@ pub fn f1600(state: &mut [u64; PLEN]) {
|
||||
#[cfg(feature = "simd")]
|
||||
/// SIMD implementations for Keccak-f1600 sponge function
|
||||
pub mod simd {
|
||||
use crate::{keccak_p, LaneSize, PLEN};
|
||||
use crate::{LaneSize, PLEN, keccak_p};
|
||||
pub use core::simd::{u64x2, u64x4, u64x8};
|
||||
|
||||
macro_rules! impl_lanesize_simd_u64xn {
|
||||
@ -289,7 +289,7 @@ pub fn keccak_p<L: LaneSize>(state: &mut [L; PLEN], round_count: usize) {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::{keccak_p, LaneSize, PLEN};
|
||||
use crate::{LaneSize, PLEN, keccak_p};
|
||||
|
||||
fn keccak_f<L: LaneSize>(state_first: [L; PLEN], state_second: [L; PLEN]) {
|
||||
let mut state = [L::default(); PLEN];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user