Skip to content

Conversation

mutantbob
Copy link
Contributor

Attempting to compile a project for AVR that depends on ahash fails:

error[E0432]: unresolved import `atomic::AtomicUsize`
  --> /home/thoth/.cargo/registry/src/mygithub.libinneed.workers.dev-1ecc6299db9ec823/once_cell-1.13.1/src/race.rs:27:14
   |
27 | use atomic::{AtomicUsize, Ordering};
   |              ^^^^^^^^^^^ no `AtomicUsize` in `sync::atomic`

error[E0432]: unresolved import `super::atomic::AtomicPtr`

The once_cell crate has an atomic-polyfill feature that can be enabled to solve this problem, and we adapt its technique to solve ahash's dependencies on core::sync::atomic .

@tkaitchuck tkaitchuck merged commit e9c6735 into tkaitchuck:master Oct 23, 2022
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