dalek-cryptography / curve25519-dalek

A pure-Rust implementation of group operations on Ristretto and Curve25519
Other
850 stars 416 forks source link

Use of unstable library feature 'stdsimd' #631

Closed Kofituo closed 4 months ago

Kofituo commented 4 months ago

Hello, I've been working on blockchain project based on substrate for a while now (specifically polkadot 43 branch). Just 4 days ago, I've ran into the following compile error which led me to this crate. Prior to that, I've not faced any errors like this

error[E0658]: use of unstable library feature 'stdsimd'
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.2/src/backend/vector/ifma/field.rs:26:5
   |
26 |     _mm256_madd52lo_epu64(z.into(), x.into(), y.into()).into()
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information
   = help: add `#![feature(stdsimd)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'stdsimd'
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.2/src/backend/vector/ifma/field.rs:25:9
   |
25 |     use core::arch::x86_64::_mm256_madd52lo_epu64;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information
   = help: add `#![feature(stdsimd)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'stdsimd'
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.2/src/backend/vector/ifma/field.rs:34:5
   |
34 |     _mm256_madd52hi_epu64(z.into(), x.into(), y.into()).into()
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information
   = help: add `#![feature(stdsimd)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'stdsimd'
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.2/src/backend/vector/ifma/field.rs:33:9
   |
33 |     use core::arch::x86_64::_mm256_madd52hi_epu64;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information
   = help: add `#![feature(stdsimd)]` to the crate attributes to enable
error[E0635]: unknown feature `stdarch_x86_avx512`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curve25519-dalek-4.1.2/src/lib.rs:19:13
   |
19 |     feature(stdarch_x86_avx512)
   |             ^^^^^^^^^^^^^^^^^^
Some errors have detailed explanations: E0635, E0658.
For more information about an error, try `rustc --explain E0635`.
error: could not compile `curve25519-dalek` (lib) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101. 

Here's my rust-toolchain.toml file

[toolchain]
channel = "nightly-2023-12-24"
components = ["cargo", "clippy", "rustc", "rustfmt", "rust-src"]
targets = ["wasm32-unknown-unknown"]
profile = "minimal"

Is there any workaround for this?

robjtede commented 4 months ago

duplicate of https://github.com/dalek-cryptography/curve25519-dalek/issues/630

shenjackyuanjie commented 4 months ago

@Kofituo try to remove cargo.lock/ run cargo update

tarcieri commented 4 months ago

The issue is likely that your nightly compiler is out of date.

As already mentioned, this is a dup.