1 unstable release

0.1.0 Aug 25, 2025

#2577 in Embedded development

Download history 2192/week @ 2025-08-24 11075/week @ 2025-08-31 5356/week @ 2025-09-07 6400/week @ 2025-09-14 7250/week @ 2025-09-21 8225/week @ 2025-09-28 6914/week @ 2025-10-05 10933/week @ 2025-10-12 8833/week @ 2025-10-19 10874/week @ 2025-10-26 9043/week @ 2025-11-02

40,781 downloads per month
Used in 46 crates (2 directly)

MIT/Apache

8KB

Timer queue item for embassy-executor integrated timer queues

embassy-executor provides the memory needed to implement integrated timer queues. This crate exists to separate that memory from embassy-executor itself, to decouple the timer queue's release cycle from embassy-executor.

This crate contains two things:

  • TimerQueueItem: The item type that can be requested from the executor. The size of this type can be configured using the timer-item-size-N-words Cargo features.
  • The expectation that extern "Rust" fn __embassy_time_queue_item_from_waker(waker: &Waker) -> &mut TimerQueueItem is implemented (by embassy-executor, most likely). This function must return a mutable reference to the TimerQueueItem associated with the given waker.

As a queue implementor, you will need to choose one of the timer-item-size-N-words features to select a queue item size. You can then define your own item type, which must be #[repr(align(8))] (or less) and must fit into the size you selected.

You can access the TimerQueueItem from a Waker using the from_embassy_waker method. You can then use the as_ref and as_mut methods to reinterpret the data stored in the item as your custom item type.


embassy-executor-time-queue

This crate defines the timer queue item that embassy-executor provides, and a way to access it, for executor-integrated timer queues. The crate decouples the release cycle of embassy-executor from that of the queue implementations'.

As a HAL implementer, you only need to depend on this crate if you want to implement executor-integrated timer queues yourself, without using embassy-time-queue-utils.

As a HAL user, you should not need to depend on this crate.

No runtime deps

Features