8 releases (breaking)

0.6.1 Nov 22, 2024
0.6.0 May 29, 2024
0.5.0 Dec 4, 2023
0.4.0 Oct 31, 2023
0.0.0 Sep 18, 2022

#73 in Embedded development

Download history 27450/week @ 2024-09-19 17932/week @ 2024-09-26 15630/week @ 2024-10-03 19803/week @ 2024-10-10 20508/week @ 2024-10-17 18853/week @ 2024-10-24 23477/week @ 2024-10-31 21679/week @ 2024-11-07 19922/week @ 2024-11-14 26584/week @ 2024-11-21 20510/week @ 2024-11-28 19700/week @ 2024-12-05 21780/week @ 2024-12-12 20823/week @ 2024-12-19 13760/week @ 2024-12-26 20679/week @ 2025-01-02

80,413 downloads per month
Used in 162 crates (89 directly)

MIT/Apache

245KB
5.5K SLoC

embassy-sync

An Embassy project.

Synchronization primitives and data structures with async support:

  • Channel - A Multiple Producer Multiple Consumer (MPMC) channel. Each message is only received by a single consumer.
  • PriorityChannel - A Multiple Producer Multiple Consumer (MPMC) channel. Each message is only received by a single consumer. Higher priority items are shifted to the front of the channel.
  • PubSubChannel - A broadcast channel (publish-subscribe) channel. Each message is received by all consumers.
  • Signal - Signalling latest value to a single consumer.
  • Watch - Signalling latest value to multiple consumers.
  • Mutex - Mutex for synchronizing state between asynchronous tasks.
  • Pipe - Byte stream implementing embedded_io traits.
  • WakerRegistration - Utility to register and wake a Waker.
  • AtomicWaker - A variant of WakerRegistration accessible using a non-mut API.
  • MultiWakerRegistration - Utility registering and waking multiple Waker's.
  • LazyLock - A value which is initialized on the first access

Interoperability

Futures from this crate can run on any executor.

Dependencies

~1–1.5MB
~28K SLoC