I am compiling a main.rs which compiles this dependency (with rust 1.77 nightly)
─❯ cargo run generate -h
Compiling curve25519-dalek v4.1.2
error[E0658]: use of unstable library feature 'stdsimd'
--> /home/nixos/.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
= note: this compiler was built on 2024-01-31; consider upgrading it if it is out of dat
where should I add the #![feature(stdsimd)] ? Because in main.rs it doesnt work?
Could you try upgrading your nightly toolchain? stdsimd got removed a few days ago, I assume your dependency has already removed it, making it incompatible with your current nightly version.
Because the 1.78.0-2024-02-09 compiler doesn't require #![feature(stdsimd)] to be present at the top of the crate root file in order for the crate to be able to call the _mm256_madd52lo_epu64 instruction, whereas your old compiler needed it. In fact, since stdsimd got removed, your new compiler doesn't even know that there was ever a nightly feature called stdsimd. So vice versa, if your new compiler encounters a #![feature(stdsimd)] somewhere (i.e. in a dependency that hasn't been updated yet), it will throw an error too, because it doesn't know stdsimd.