Skip to content

Add support for targets without atomic operations #383

Description

@zeegomo

This crate cannot currently be built for targets that do not support atomic operations (e.g. riscv32im) due to LazyBool/Usize in

pub struct LazyUsize(AtomicUsize);
, even though those are not used when providing a custom implementation.

Example error when compiling for riscv32im

error[E0432]: unresolved import `core::sync::atomic::AtomicUsize`
  --> src/util.rs:12:20
   |
12 |     sync::atomic::{AtomicUsize, Ordering::Relaxed},
   |                    ^^^^^^^^^^^ no `AtomicUsize` in `sync::atomic`

It would be nice to have this working there as well, a quick workaround could be to conditionally compile those additional structs only when atomics are available.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions