PackageTrack
Sign in Get early access

arc-swap

Atomically swappable Arc

1.9.2 299M downloads/mo #367 most downloaded on crates.io vorner/arc-swap

What this package is like to depend on

Last release 1 months ago

28 Jun 2026

Ships unpredictably

gaps range from 2 weeks to 1.8 years

Nearly every release is documented

notes for 37 of 38 stable releases

8 versions withdrawn

withdrawn after publishing

8 years old

47 releases · first in 2018

6 releases in the last 12 months

see the full history below

Release timeline

47 releases · Apr 2018 to Jun 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 47
  1. 1.9.2 28 Jun 2026
    Release notes
    • Document RefCnt must not panic (#208).
    Open source →
  2. 1.9.1 04 Apr 2026
    Release notes
    • One more SeqCst :-| (#204).
    Open source →
  3. 1.9.0 21 Mar 2026
    Release notes

    Committing so it doesn't break again.

    Open source →
    Release notes
    • Promote certain orderings to SeqCst. Original proofs based on wrong reading of standard :-(. Expect some performance degradation (#198, #200).
    Open source →
  4. 1.8.2 14 Feb 2026
    Release notes

    Proper version gate of the Pin.

    Open source →
    Release notes
    • Proper gate of Pin (since 1.39 - we are not using only Pin, but also Pin::into_inner, #197).
    Open source →
  5. 1.8.1 02 Feb 2026
    Release notes
    • Some more careful orderings (#195).
    Open source →
  6. 1.8.0 23 Dec 2025
    Release notes
    • Support for Pin (#185, #183).
    • Fix (hopefully) crash on ARM (#164).
    • Fix Miri check (#186, #156).
    • Fix support for Rust 1.31.0.
    • Some minor clippy lints.
    Open source →
  7. 1.7.1 23 Mar 2024
    Release notes
    • Fix docs build (mutually exclusive features, #112).
    Open source →
  8. 1.7.0 03 Mar 2024
    Release notes
    • Support building for no_std using nightly Rust compiler
    • Adds a new feature experimental-thread-local that enables building for no_std targets.
      If this feature is not enabled, the crate is identical as before,
      still allowing for compilation using Rust stable >= 1.38.0.

    • The experimental-thread-local feature makes use of experimental features thread_local
      and lazy_cell, thus requiring a nightly Rust compiler.

    • Support for std::sync::RwLock is dropped in no_std builds.

    Open source →
    Release notes
    • Support for no-std builds with the experimental-thread-local. Needs nightly compiler. No stability guarantees with this feature (#93).
    Open source →
  9. 1.6.0 31 Dec 2022
    Release notes
    • Fix a data race reported by MIRI.
    • Avoid violating stacked borrows (AFAIK these are still experimental and not normative, but better safe than sorry). (#80).
    • The AccessConvert wrapper is needed less often in practice (#77).
    Open source →
  10. 1.5.1 30 Jul 2022
    Release notes
    • bug: Insufficient synchronization on weak platforms (#76).

      Never observed in practice (it's suspected practical weak platforms like ARM are still stronger than the model), but still technically UB.

    • docs: Mention triomphe's ThinArc around the fat-pointer limitations.

    Open source →
  11. 1.5.0 15 Nov 2021
    Release notes
    • Support serde (by a feature).
    Open source →
  12. 1.4.0 17 Sep 2021
    Release notes
    • Allow const-initializing ArcSwapOption (const_empty method).
    Open source →
  13. 1.3.2 27 Aug 2021
    Release notes
    • More helpful description of the AsRaw trait (isn't implemented for owned Arc/Option<Arc>).
    Open source →
  14. 1.3.1 22 Aug 2021
    Release notes
    • Cache doc improvements.
    Open source →
  15. 1.3.0 23 May 2021
    Release notes
    • Allow mapping of DynAccess.
    • Fix some lints.
    • Don't leave threads running in tests/doctests. It's a bad form and annoys miri.
    Open source →
  16. 1.2.0 03 Jan 2021
    Release notes
    • Miri and 32 bit tests in CI.
    • Making the writers lock-free. Soft-removing the IndependentStrategy, as it is no longer needed (hidden and the same as the DafultStrategy).
    Open source →
  17. 1.1.0 11 Dec 2020
    Release notes
    • Fix soundness bug around access::Map. Technically a breaking change, but unlikely to bite and breaking seems to be the least bad option. #45.
    Open source →
  18. 1.0.0 15 Nov 2020 withdrawn
    Release notes
    • Remove Clone implementation. People are often confused by it and it is easy to emulate by hand in the rare case it is actually needed.
    Open source →
  19. 1.0.0-rc1 28 Oct 2020 pre-release withdrawn
    Release notes
    • Get rid of the load_signal_safe. It only complicates things and it is niche; signal-hook-registry has its own simplified version.
    • Avoid from_ptr(as_ptr()). Slight change in RefCnt::inc which technically is API breaking change, but this one should not matter in practice.
    • Extend documentation about clone behaviour.
    • Few more traits for Guard (From<T: RefCnt>, Default).
    • Get rid of rcu_unwap, the whole concept is a trap.
    • Hide the whole gen lock thing.
    • Introduce the Strategy, as a high level way to choose how exactly the locking happens.
      • Not possible to implement by downstream users just yet, or call them.
      • The CaS is its own trait for flexibility.
    • Adding the SimpleGenLock experimental strategy.
      • Not part of stability guarantees.
    Open source →
  20. 0.4.8 11 Dec 2020

    Nothing published for this version

  21. 0.4.7 06 Jun 2020 withdrawn
    Release notes
    • Rename the unstable-weak to weak feature. The support is now available on 1.45 (currently in beta).
    Open source →
  22. 0.4.6 21 Apr 2020 withdrawn
    Release notes
    • Adjust to Weak::as_ptr from std (the weak pointer support, relying on unstable features).
    • Support running on miri (without some optimizations), so dependencies may run miri tests.
    • Little optimization when waiting out the contention on write operations.
    Open source →
  23. 0.4.5 18 Mar 2020 withdrawn
    Release notes
    • Added Guard::from_inner.
    Open source →
  24. 0.4.4 17 Nov 2019 withdrawn
    Release notes
    • Top-level docs rewrite (less rambling, hopefully more readable).
    Open source →
  25. 0.4.3 21 Sep 2019 withdrawn
    Release notes
    • Fix the Display implementation on Guard to correctly delegate to the underlying Display implementation.
    Open source →
  26. 0.4.2 10 Aug 2019 withdrawn
    Release notes
    • The Access functionality ‒ ability to pass a handle to subpart of held data to somewhere with the ability to update itself.
    • Mapped cache can take FnMut as well as Fn.
    Open source →
  27. 0.4.1 05 Aug 2019
    Release notes
    • Mapped caches ‒ to allow giving access to parts of config only.
    Open source →
  28. 0.4.0 03 Aug 2019
    Release notes
    • Support for Weak pointers.
    • RefCnt implemented for Rc.
    • Breaking: Big API cleanups.
      • Peek is gone.
      • Terminology of getting the data unified to load.
      • There's only one kind of Guard now.
      • Guard derefs to the Arc/Option<Arc> or similar.
      • Cache got moved to top level of the crate.
      • Several now unneeded semi-internal traits and trait methods got removed.
    • Splitting benchmarks into a separate sub-crate.
    • Minor documentation improvements.
    Open source →
  29. 0.4.0-pre.1 14 Jul 2019 pre-release

    Nothing published for this version

  30. 0.3.11 14 Apr 2019
    Release notes
    • Prevention against UB due to dropping Guards and overflowing the guard counter (aborting instead, such problem is very degenerate anyway and wouldn't work in the first place).
    Open source →
  31. 0.3.10 12 Apr 2019
    Release notes
    • Tweak slot allocation to take smaller performance hit if some leases are held.
    • Increase the number of lease slots per thread to 8.
    • Added a cache for faster access by keeping an already loaded instance around.
    Open source →
  32. 0.3.9 05 Apr 2019
    Release notes
    • Fix Send/Sync for Guard and Lease (they were broken in the safe but uncomfortable direction ‒ not implementing them even if they could).
    Open source →
  33. 0.3.8 27 Mar 2019
    Release notes
    • Lease<Option<_>>::unwrap(), expect() and into_option() for convenient use.
    Open source →
  34. 0.3.7 26 Dec 2018
    Release notes
    • Use the correct #[deprecated] syntax.
    Open source →
  35. 0.3.6 17 Nov 2018
    Release notes
    • Another locking store (PrivateSharded) to complement the global and private unsharded ones.
    • Comparison to other crates/approaches in the docs.
    Open source →
  36. 0.3.5 11 Nov 2018
    Release notes
    • Updates to documentation, made it hopefully easier to digest.
    • Added the ability to separate gen-locks of one ArcSwapAny from others.
    • Some speed improvements by inlining.
    • Simplified the lease method internally, making it faster in optimistic cases.
    Open source →
  37. 0.3.4 21 Oct 2018
    Release notes
    • Another potentially weak ordering discovered (with even less practical effect than the previous).
    Open source →
  38. 0.3.3 20 Oct 2018
    Release notes
    • Increased potentially weak ordering (probably without any practical effect).
    Open source →
  39. 0.3.2 15 Oct 2018
    Release notes
    • Documentation link fix.
    Open source →
  40. 0.3.1 13 Oct 2018
    Release notes
    • Few convenience constructors.
    • More tests (some randomized property testing).
    Open source →
  41. 0.3.0 23 Jul 2018
    Release notes
    • compare_and_swap no longer takes &Guard as current as that is a sure way to create a deadlock.
    • Introduced Lease for temporary storage, which doesn't suffer from contention like load, but doesn't block writes like Guard. The downside is it slows down with number of held by the current thread.
    • compare_and_swap and rcu uses leases.
    • Made the ArcSwap as small as the pointer itself, by making the shards/counters and generation ID global. This comes at a theoretical cost of more contention when different threads use different instances.
    Open source →
  42. 0.2.0 15 Jul 2018
    Release notes
    • Added an ArcSwapOption, which allows storing NULL values (as None) as well as a valid pointer.
    • compare_and_swap accepts borrowed Arc as current and doesn't consume one ref count.
    • Sharding internal counters, to improve performance on read-mostly contented scenarios.
    • Providing peek_signal_safe as the only async signal safe method to use inside signal handlers. This removes the footgun with dropping the Arc returned from load inside a signal handler.
    Open source →
  43. 0.1.4 03 Jul 2018
    Release notes
    • The peek method to use the Arc inside without incrementing the reference count.
    • Some more (and hopefully better) benchmarks.
    Open source →
  44. 0.1.3 25 Jun 2018
    Release notes
    • Documentation fix (swap is not lock-free in current implementation).
    Open source →
  45. 0.1.2 20 Jun 2018
    Release notes
    • More freedom in the rcu and rcu_unwrap return types.
    Open source →
  46. 0.1.1 19 Jun 2018
    Release notes
    • rcu support.
    • compare_and_swap support.
    • Added some primitive benchmarks.
    Open source →
  47. 0.1.0 16 Apr 2018
    Release notes
    • Initial implementation.
    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