mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
fixup ci: unsafe usage on nightly and bump ed25519's MSRV (#753)
* ed25519-dalek: bump MSRV to 1.81
base64ct now requires rustc 1.81
* nightly and stable disagree on usage of unsafe
```
error: unnecessary `unsafe` block
492
--> curve25519-dalek/src/backend/vector/avx2/field.rs:479:28
493
|
494
479 | let c9_19: u32x8 = unsafe {
495
| ^^^^^^ unnecessary `unsafe` block
```
This would only happen on nightly.
This commit is contained in:
parent
fbf1fb5339
commit
773a0646ce
7 changed files with 18 additions and 11 deletions
4
.github/workflows/ed25519-dalek.yml
vendored
4
.github/workflows/ed25519-dalek.yml
vendored
|
|
@ -20,7 +20,7 @@ env:
|
|||
jobs:
|
||||
|
||||
msrv:
|
||||
name: Current MSRV is 1.60.0
|
||||
name: Current MSRV is 1.81.0
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
@ -29,5 +29,5 @@ jobs:
|
|||
- run: cargo update -Z minimal-versions
|
||||
# Now check that `cargo build` works with respect to the oldest possible
|
||||
# deps and the stated MSRV
|
||||
- uses: dtolnay/rust-toolchain@1.60.0
|
||||
- uses: dtolnay/rust-toolchain@1.81.0
|
||||
- run: cargo build
|
||||
|
|
|
|||
2
.github/workflows/workspace.yml
vendored
2
.github/workflows/workspace.yml
vendored
|
|
@ -85,7 +85,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@1.73.0
|
||||
- uses: dtolnay/rust-toolchain@1.81.0
|
||||
with:
|
||||
components: clippy
|
||||
- run: cargo clippy --target x86_64-unknown-linux-gnu --all-features
|
||||
|
|
|
|||
|
|
@ -81,14 +81,7 @@ to build out more elaborate abstractions it starts to become painful to use.
|
|||
This crate exposes an `#[unsafe_target_feature]` macro which works just like `#[target_feature]` except
|
||||
it moves the `unsafe` from the function prototype into the macro name, and can be used on safe functions.
|
||||
|
||||
```rust,compile_fail
|
||||
// ERROR: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
||||
#[target_feature(enable = "avx2")]
|
||||
fn func() {}
|
||||
```
|
||||
|
||||
```rust
|
||||
// It works, but must be `unsafe`
|
||||
# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||
#[target_feature(enable = "avx2")]
|
||||
unsafe fn func() {}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@
|
|||
// - isis agora lovecruft <isis@patternsinthevoid.net>
|
||||
// - Henry de Valence <hdevalence@hdevalence.ca>
|
||||
|
||||
// Nightly and stable currently disagree on the requirement of unsafe blocks when `unsafe_target_feature`
|
||||
// gets used.
|
||||
// See: https://github.com/rust-lang/rust/issues/132856
|
||||
#![allow(unused_unsafe)]
|
||||
|
||||
//! An implementation of 4-way vectorized 32bit field arithmetic using
|
||||
//! AVX2.
|
||||
//!
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@
|
|||
// - isis agora lovecruft <isis@patternsinthevoid.net>
|
||||
// - Henry de Valence <hdevalence@hdevalence.ca>
|
||||
|
||||
// Nightly and stable currently disagree on the requirement of unsafe blocks when `unsafe_target_feature`
|
||||
// gets used.
|
||||
// See: https://github.com/rust-lang/rust/issues/132856
|
||||
#![allow(unused_unsafe)]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use crate::backend::vector::packed_simd::u64x4;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@
|
|||
// This file is part of curve25519-dalek.
|
||||
// See LICENSE for licensing information.
|
||||
|
||||
// Nightly and stable currently disagree on the requirement of unsafe blocks when `unsafe_target_feature`
|
||||
// gets used.
|
||||
// See: https://github.com/rust-lang/rust/issues/132856
|
||||
#![allow(unused_unsafe)]
|
||||
|
||||
//! This module defines wrappers over platform-specific SIMD types to make them
|
||||
//! more convenient to use.
|
||||
//!
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ keywords = ["cryptography", "ed25519", "curve25519", "signature", "ECC"]
|
|||
categories = ["cryptography", "no-std"]
|
||||
description = "Fast and efficient ed25519 EdDSA key generations, signing, and verification in pure Rust."
|
||||
exclude = [ ".gitignore", "TESTVECTORS", "VALIDATIONVECTORS", "res/*" ]
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.81"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue