Crate embassy_macros

source ·
Expand description

embassy-macros

An Embassy project.

Macros for creating the main entry point and tasks that can be spawned by embassy-executor.

NOTE: The macros are re-exported by the embassy-executor crate which should be used instead of adding a direct dependency on the embassy-macros crate.

Minimum supported Rust version (MSRV)

The task and main macros require the type alias impl trait (TAIT) nightly feature in order to compile.

License

This work is licensed under either of

at your option.

Attribute Macros

  • Creates a new executor instance and declares an application entry point for Cortex-M spawning the corresponding function body as an async task.
  • Creates a new executor instance and declares an application entry point for RISC-V spawning the corresponding function body as an async task.
  • Creates a new executor instance and declares an application entry point for STD spawning the corresponding function body as an async task.
  • Creates a new executor instance and declares an application entry point for WASM spawning the corresponding function body as an async task.
  • Declares an async task that can be run by embassy-executor. The optional pool_size parameter can be used to specify how many concurrent tasks can be spawned (default is 1) for the function.