8 releases (breaking)

new 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

#15 in Embedded development

Download history 16174/week @ 2024-08-02 21004/week @ 2024-08-09 16415/week @ 2024-08-16 30656/week @ 2024-08-23 33401/week @ 2024-08-30 28627/week @ 2024-09-06 25709/week @ 2024-09-13 28499/week @ 2024-09-20 15614/week @ 2024-09-27 17759/week @ 2024-10-04 18223/week @ 2024-10-11 21294/week @ 2024-10-18 19770/week @ 2024-10-25 23104/week @ 2024-11-01 21094/week @ 2024-11-08 21419/week @ 2024-11-15

89,231 downloads per month
Used in 129 crates (78 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.4MB
~28K SLoC