Skip to content

fix: the hashbrown is too old for new rust #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dadiorchen
Copy link

I get error when build:

root@editor-7b79ccb944-gvhl5:/mnt/data/rriv-rust/src/datalogger# cargo build
  Downloaded equivalent v1.0.2
  Downloaded foldhash v0.1.5
  Downloaded 2 crates (28.6KiB) in 0.08s
   Compiling ahash v0.8.3
   Compiling foldhash v0.1.5
   Compiling equivalent v1.0.2
warning: enum `AdcSelect` is never used
 --> /mnt/data/rriv-rust/board/rriv_board/src/lib.rs:9:6
  |
9 | enum AdcSelect {
  |      ^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: `rriv_board` (lib) generated 1 warning
error[E0635]: unknown feature `stdsimd`
  --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ahash-0.8.3/src/lib.rs:99:42
   |
99 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

   Compiling hashbrown v0.15.2
For more information about this error, try `rustc --explain E0635`.
error: could not compile `ahash` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

the reason is here:

The error ​​error[E0635]: unknown feature 'stdsimd'​​ occurs when you try to enable the stdsimd feature in Rust, but it's either:

Not available in your Rust version, or
You're using it incorrectly
Why This Happens
​​stdsimd was stabilized and renamed​​:
In older Rust versions (before ~1.27), stdsimd was an unstable feature for SIMD (Single Instruction Multiple Data) operations.
It was later stabilized and integrated into the standard library under core::arch and std::arch.
​​You might be using outdated code​​:
Some old crates/examples still reference #![feature(stdsimd)], which no longer works.

@ZavenArra ZavenArra requested a review from misterinterrupt May 8, 2025 21:16
@misterinterrupt misterinterrupt self-assigned this May 13, 2025
@misterinterrupt
Copy link
Collaborator

The error unknown feature 'stdsimd' means that the Rust compiler being used does not recognize the stdsimd feature. This feature is only available on certain nightly toolchains, and only if the standard library is available.

  • The error is not caused by your code, but by a dependency (ahash).
  • The ahash crate is using a feature only available on nightly Rust, or only on certain platforms.
  • Your codebase does not reference stdsimd or ahash directly.

Make sure you are using a recent nightly toolchain:
rustup default nightly

Copy link
Collaborator

@misterinterrupt misterinterrupt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would usually say "it can't hurt to upgrade!"
but ya nevah know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants