6 releases (breaking)

0.5.0 Dec 4, 2023
0.4.0 Oct 31, 2023
0.3.0 Sep 14, 2023
0.2.0 Apr 13, 2023
0.0.0 Sep 18, 2022

#15 in Embedded development

Download history 4312/week @ 2024-01-01 5277/week @ 2024-01-08 5448/week @ 2024-01-15 7374/week @ 2024-01-22 6686/week @ 2024-01-29 5547/week @ 2024-02-05 6025/week @ 2024-02-12 8955/week @ 2024-02-19 6936/week @ 2024-02-26 8531/week @ 2024-03-04 9997/week @ 2024-03-11 9035/week @ 2024-03-18 8409/week @ 2024-03-25 9188/week @ 2024-04-01 9504/week @ 2024-04-08 10811/week @ 2024-04-15

38,540 downloads per month
Used in 93 crates (60 directly)

MIT/Apache

145KB
3K 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 sifted 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.
  • 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.

Interoperability

Futures from this crate can run on any executor.

Minimum supported Rust version (MSRV)

Embassy is guaranteed to compile on the latest stable Rust version at the time of release. It might compile with older versions but that may change in any new patch release.

License

This work is licensed under either of

at your option.

Dependencies

~1–1.5MB
~28K SLoC