PackageTrack
Sign in Get early access

oneshot

Oneshot spsc channel with (potentially) lock-free non-blocking send, and a receiver supporting both thread blocking receive operations as well as Future based async polling.

0.2.1 27M downloads/mo #1794 most downloaded on crates.io faern/oneshot

What this package is like to depend on

Last release 6 months ago

23 Feb 2026

Ships fairly regularly

a new release about every 8 months

Nearly every release is documented

notes for 12 of 12 stable releases

4 versions withdrawn

withdrawn after publishing

7 years old

16 releases · first in 2019

4 releases in the last 12 months

see the full history below

Release timeline

16 releases · May 2019 to Feb 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 16
  1. 0.2.1 23 Feb 2026
    Release notes

    [0.2.1] - 2026-02-23

    Added

    • Add is_closed and has_message methods to AsyncReceiver.
    Open source →
    Release notes

    Added

    • Add is_closed and has_message methods to AsyncReceiver.
    Open source →
  2. 0.2.0 23 Feb 2026
    Release notes

    [0.2.0] - 2026-02-23

    Changed

    • Disable both the std and async features by default. Making them opt-in instead of opt-out.
      This makes the library more minimal by default and only contains the functionality that the
      user explicitly enables. This is a breaking change.
    • Upgrade to Rust 2024 edition. This also bumps the MSRV to 1.85.0
    • Add a separate type AsyncReceiver that implements Future instead of implementing it
      directly on the Receiver type. Now the Receiver implements IntoFuture instead.
      This is a breaking change. This change removes the possible panics in many recv* methods,
      and it simplifies some code a bit.

    Fixed

    • Make Debug impl on SendError include the channel message type, instead of just saying
      "SendError<T>(_)".
    Open source →
    Release notes

    Changed

    • Disable both the std and async features by default. Making them opt-in instead of opt-out. This makes the library more minimal by default and only contains the functionality that the user explicitly enables. This is a breaking change.
    • Upgrade to Rust 2024 edition. This also bumps the MSRV to 1.85.0
    • Add a separate type AsyncReceiver that implements Future instead of implementing it directly on the Receiver type. Now the Receiver implements IntoFuture instead. This is a breaking change. This change removes the possible panics in many recv* methods, and it simplifies some code a bit.

    Fixed

    • Make Debug impl on SendError include the channel message type, instead of just saying "SendError<T>(_)".
    Open source →
  3. 0.1.13 26 Jan 2026
    Release notes

    [0.1.13] - 2026-01-26

    Fixed

    • Fix documentation building on docs.rs by not using removed doc_auto_cfg feature.
    Open source →
    Release notes

    Fixed

    • Fix documentation building on docs.rs by not using removed doc_auto_cfg feature.
    Open source →
  4. 0.1.12 25 Jan 2026
    Release notes

    Fixed:

    • Fix race condition that could lead to use-after-free if the Receiver was polled asynchronously,
      but then dropped before completion. #74. RUSTSEC-2026-0005
    • Fix race conditions/UB around atomic memory orderings. These were found by running tests under
      miri. #72
    Open source →
    Release notes

    Fixed

    • Fix race condition that could lead to use-after-free if the Receiver was polled asynchronously, but then dropped before completion. https://github.com/faern/oneshot/pull/74
    • Fix race conditions/UB around atomic memory orderings. These were found by running tests under miri. https://github.com/faern/oneshot/pull/72
    Open source →
  5. 0.1.11 22 Feb 2025
    Release notes

    Fixed:

    • Handle the UNPARKING state correctly in Receiver::drop(). Fixes a panic that could
      occur if a Receiver had been first polled as a future and then was being dropped
      in parallel with the Sender sending a message.
    Open source →
    Release notes

    Fixed

    • Handle the UNPARKING state correctly in Receiver::drop(). Fixes a panic that could occur if a Receiver had been first polled as a future and then was being dropped in parallel with the Sender sending a message.
    Open source →
  6. 0.1.10 04 Feb 2025
    Release notes

    Added:

    • Add is_closed and has_message to the Receiver. Allows polling for the channel
      state without modifying the channel or pulling the message from it.
    • Make the cargo features show up on docs.rs for better discoverability.
    Open source →
    Release notes

    Added

    • Add is_closed and has_message to the Receiver. Allows polling for the channel state without modifying the channel or pulling the message from it.
    • Make the cargo features show up on docs.rs for better discoverability.
    Open source →
  7. 0.1.9 02 Feb 2025
    Release notes

    Added:

    • Implement Sync for Sender. There is not a whole lot someone can do with a &Sender,
      but this allows storing the sender in places that are overly conservative and require
      a Sync bound on the content.
    Open source →
    Release notes

    Added

    • Implement Sync for Sender. There is not a whole lot someone can do with a &Sender, but this allows storing the sender in places that are overly conservative and require a Sync bound on the content.
    Open source →
  8. 0.1.8 13 Jun 2024
    Release notes
    • Change how loom concurrency testing is triggered. To get rid of loom in the dependency tree
      oneshot pulls in, it has in addition to being gated behind cfg(oneshot_loom) also been made
      an optional dependency. This makes this library way smaller for downstream consumers.
      This has the downside that the crate now exposes a loom feature.
      DOWNSTREAM USERS ARE NOT SUPPOSED TO EVER ENABLE THIS. No stability or semver
      guarantees exist around the loom feature.
      This change ultimately makes no difference for any user of oneshot in regular usage.
    Open source →
    Release notes

    Changed

    • Change how loom concurrency testing is triggered. To get rid of loom in the dependency tree oneshot pulls in, it has in addition to being gated behind cfg(oneshot_loom) also been made an optional dependency. This makes this library way smaller for downstream consumers. This has the downside that the crate now exposes a loom feature. DOWNSTREAM USERS ARE NOT SUPPOSED TO EVER ENABLE THIS. No stability or semver guarantees exist around the loom feature. This change ultimately makes no difference for any user of oneshot in regular usage.
    Open source →
  9. 0.1.7 24 May 2024
    Release notes
    • Add is_closed method to the Sender.
    Open source →
    Release notes

    Added

    • Add is_closed method to the Sender.
    Open source →
  10. 0.1.6 14 Sep 2023
    Release notes

    Added

    • Add into_raw and from_raw methods on both Sender and Receiver. Allows passing oneshot channels over FFI without an extra layer of heap allocation.
    Open source →
  11. 0.1.5 01 Sep 2022
    Release notes

    Fixed

    • Handle the UNPARKING state correctly in all recv methods. try_recv will now not panic if used on a Receiver that is being unparked from an async wait. The other recv methods will still panic (as they should), but with a better error message.
    Open source →
  12. 0.1.4 30 Aug 2022
    Release notes

    Changed

    • Upgrade to Rust edition 2021. Also increases the MSRV to Rust 1.60.
    • Add null-pointer optimization to Sender, Receiver and SendError. This reduces the call stack size of Sender::send and it makes Option<Sender> and Option<Receiver> pointer sized (#18).
    • Relax the memory ordering of all atomic operations from SeqCst to the most appropriate lower ordering (#17 + #20).

    Fixed

    • Fix undefined behavior due to multiple mutable references to the same channel instance (#18).
    • Fix race condition that could happen during unparking of a receiving Receiver (#17 + #20).
    Open source →
  13. 0.1.3 23 Nov 2021 withdrawn
    Release notes

    Fixed

    • Keep the last Waker in Future::poll, not the first one. Stops breaking the contract on how futures should work.
    Open source →
  14. 0.1.2 11 Aug 2020 withdrawn
    Release notes

    Fixed

    • Fix unreachable code panic that happened if the Receiver of an empty but open channel was polled and then dropped.
    Open source →
  15. 0.1.1 09 May 2020 withdrawn
    Release notes

    Initial implementation. Supports basically all the (for now) intended functionality. Sender is as lock-free as I think it can get and the receiver can both do thread blocking and be awaited asynchronously. The receiver also has a wait-free try_recv method.

    The crate has two features. They are activated by default, but the user can opt out of async support as well as usage of libstd (making the crate no_std but still requiring liballoc)

    Open source →
  16. 0.1.0 30 May 2019 withdrawn
    Release notes

    Name reserved on crate.io by someone other than the author of this crate.

    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