PackageTrack
Sign in Get early access

atomic-polyfill

Atomic polyfills, for targets where they're not available.

1.0.3 25M downloads/mo #1868 most downloaded on crates.io embassy-rs/atomic-polyfill

What this package is like to depend on

Last release 3 years ago

no release in 18 months

Ships fairly regularly

a new release about every 3 months

Nearly every release is documented

notes for 1 of 1 stable releases

15 versions withdrawn

withdrawn after publishing

5 years old

16 releases · first in 2021

0 releases in the last 12 months

see the full history below

Release timeline

16 releases · Mar 2021 to Jul 2023
2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 16
  1. 1.0.3 11 Jul 2023
    Release notes

    Release v1.0.3, deprecate crate.

    Open source →
    Release notes
    • Crate is deprecated, use portable-atomic instead.
    Open source →
  2. 1.0.2 12 Mar 2023 withdrawn
    Release notes
    • Add MSP430 support.
    Open source →
  3. 1.0.1 12 Aug 2022 withdrawn
    Release notes
    • Fix AtomicPtr accidentally not being available when not polyfilled.
    Open source →
  4. 1.0.0 11 Aug 2022 withdrawn
    Release notes
    • Update to critical-section v1.0
    Open source →
  5. 0.1.11 29 Nov 2022 withdrawn
    Release notes
    • Bump critical-section dependency from 0.2 to 1.0.

      This is a breaking change if you were relying on the default implementations available on critical-section 0.2.7 and earlier. They have been removed in critical-section 0.2.8 because they were unsound, since there's no way to guarantee they're correct for the target in use (for example for multi-core embedded targets). Since critical-section 0.2.8 just forwards to 1.0 now, we decided to change atomic-polyfill to use 1.0 directly.

      If you're seeing a linker error like undefined symbol: _critical_section_1_0_acquire, you're affected. To fix it:

      • If your target supports std: Add the critical-section dependency to Cargo.toml enabling the std feature.

        [dependencies]
        critical-section = { version = "1.1", features = ["std"]}
        
      • For single-core Cortex-M targets in privileged mode:

        [dependencies]
        cortex-m = { version = "0.7.6", features = ["critical-section-single-core"]}
        
      • For single-hart RISC-V targets in privileged mode:

        [dependencies]
        riscv = { version = "0.10", features = ["critical-section-single-hart"]}
        
      • For other targets: check if your HAL or architecture-support crate has a critical-section 1.0 implementation available. Otherwise, provide your own.

    Open source →
  6. 0.1.10 12 Aug 2022 withdrawn
    Release notes
    • Fix AtomicPtr accidentally not being available when not polyfilled.
    Open source →
  7. 0.1.9 11 Aug 2022 withdrawn
    Release notes
    • Switch to only two polyfill levels.

    The "CAS" level which uses atomic load/store and critical-section based CAS was not sound, because critical-section guarantees only "no other critical section can run concurrently", not "no other code can run concurrently". Therefore a CS-based CAS can still race a native atomic store.

    Open source →
  8. 0.1.8 12 Apr 2022 withdrawn
    Release notes
    • Added AVR support.
    Open source →
  9. 0.1.7 22 Mar 2022 withdrawn
    Release notes
    • Added support for xtensa (ESP chips), with and without ESP-IDF.
    • Reexport core::sync::atomic::* as-is for unknown targets, to avoid build failures if they don't have full atomic support.
    Open source →
  10. 0.1.6 08 Feb 2022 withdrawn
    Release notes
    • Add polyfill support for thumbv4t targets. (Nintendo Game Boy Advance)
    • Added get_mut() to AtomicBool.
    • Added into_inner() to all atomics
    • Added fmt::Debug impl to AtomicBool, AtomicPtr.
    • Added fmt::Pointer impl to AtomicPtr.
    • Added From<*mut T> impl to AtomicPtr.
    • Added RefUnwindSafe impl to all atomics.
    Open source →
  11. 0.1.5 02 Nov 2021 withdrawn
    Release notes
    • Updated critical-section to v0.2.5. Fixes std implementation to allow reentrant (nested) critical sections. This would previously deadlock.
    Open source →
  12. 0.1.4 24 Sep 2021 withdrawn
    Release notes
    • Added support for RISC-V.
    • Added support for "full polyfill" level, where load/stores are polyfilled, not just CAS operations.
    • Added support for AtomicU64, AtomicI64.
    Open source →
  13. 0.1.3 07 Aug 2021 withdrawn
    Release notes
    • Only import cortex-m when needed (#4)
    • Fix panic on fetch_update due to incorrect ordering (#5)
    Open source →
  14. 0.1.2 28 Mar 2021 withdrawn
    Release notes
    • Added missing reexport of fence and compiler_fence in polyfilled mode.
    Open source →
  15. 0.1.1 04 Mar 2021 withdrawn
    Release notes
    • Added polyfills for AtomicU8, AtomicU16, AtomicUsize, AtomicI8, AtomicI16, AtomicI32, AtomicIsize
    Open source →
  16. 0.1.0 04 Mar 2021 withdrawn
    Release notes
    • First release
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive