1[package]
2name = "embassy-executor"
3version = "0.7.0"
4edition = "2021"
5license = "MIT OR Apache-2.0"
6description = "async/await executor designed for embedded usage"
7repository = "https://github.com/embassy-rs/embassy"
8documentation = "https://docs.embassy.dev/embassy-executor"
9categories = [
10 "embedded",
11 "no-std",
12 "asynchronous",
13]
14
15[package.metadata.embassy_docs]
16src_base = "https://github.com/embassy-rs/embassy/blob/embassy-executor-v$VERSION/embassy-executor/src/"
17src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-executor/src/"
18features = ["defmt"]
19flavors = [
20 { name = "std", target = "x86_64-unknown-linux-gnu", features = ["arch-std", "executor-thread"] },
21 { name = "wasm", target = "wasm32-unknown-unknown", features = ["arch-wasm", "executor-thread"] },
22 { name = "cortex-m", target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] },
23 { name = "riscv32", target = "riscv32imac-unknown-none-elf", features = ["arch-riscv32", "executor-thread"] },
24]
25
26[package.metadata.docs.rs]
27default-target = "thumbv7em-none-eabi"
28targets = ["thumbv7em-none-eabi"]
29features = ["defmt", "arch-cortex-m", "executor-thread", "executor-interrupt"]
30
31[dependencies]
32defmt = { version = "0.3", optional = true }
33log = { version = "0.4.14", optional = true }
34rtos-trace = { version = "0.1.3", optional = true }
35
36embassy-executor-macros = { version = "0.6.2", path = "../embassy-executor-macros" }
37embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true }
38critical-section = "1.1"
39
40document-features = "0.2.7"
41
42# needed for AVR
43portable-atomic = { version = "1.5", optional = true }
44
45# arch-cortex-m dependencies
46cortex-m = { version = "0.7.6", optional = true }
47
48# arch-wasm dependencies
49wasm-bindgen = { version = "0.2.82", optional = true }
50js-sys = { version = "0.3", optional = true }
51
52# arch-avr dependencies
53avr-device = { version = "0.5.3", optional = true }
54
55[dev-dependencies]
56critical-section = { version = "1.1", features = ["std"] }
57trybuild = "1.0"
58embassy-sync = { path = "../embassy-sync" }
59
60[features]
61
62## Enable nightly-only features
63nightly = ["embassy-executor-macros/nightly"]
64
65# Enables turbo wakers, which requires patching core. Not surfaced in the docs by default due to
66# being an complicated advanced and undocumented feature.
67# See: https://github.com/embassy-rs/embassy/pull/1263
68turbowakers = []
69
70#! ### Architecture
71_arch = [] # some arch was picked
72## std
73arch-std = ["_arch", "critical-section/std"]
74## Cortex-M
75arch-cortex-m = ["_arch", "dep:cortex-m"]
76## RISC-V 32
77arch-riscv32 = ["_arch"]
78## WASM
79arch-wasm = ["_arch", "dep:wasm-bindgen", "dep:js-sys", "critical-section/std"]
80## AVR
81arch-avr = ["_arch", "dep:portable-atomic", "dep:avr-device"]
82## spin (architecture agnostic; never sleeps)
83arch-spin = ["_arch"]
84
85#! ### Executor
86
87## Enable the thread-mode executor (using WFE/SEV in Cortex-M, WFI in other embedded archs)
88executor-thread = []
89## Enable the interrupt-mode executor (available in Cortex-M only)
90executor-interrupt = []
91## Enable tracing support (adds some overhead)
92trace = []
93## Enable support for rtos-trace framework
94rtos-trace = ["dep:rtos-trace", "trace", "dep:embassy-time-driver"]
95
96#! ### Timer Item Payload Size
97#! Sets the size of the payload for timer items, allowing integrated timer implementors to store
98#! additional data in the timer item. The payload field will be aligned to this value as well.
99#! If these features are not defined, the timer item will contain no payload field.
100
101_timer-item-payload = [] # A size was picked
102
103## 1 bytes
104timer-item-payload-size-1 = ["_timer-item-payload"]
105## 2 bytes
106timer-item-payload-size-2 = ["_timer-item-payload"]
107## 4 bytes
108timer-item-payload-size-4 = ["_timer-item-payload"]
109## 8 bytes
110timer-item-payload-size-8 = ["_timer-item-payload"]
111
112#! ### Task Arena Size
113#! Sets the [task arena](#task-arena) size. Necessary if you’re not using `nightly`.
114#!
115#! <details>
116#! <summary>Preconfigured Task Arena Sizes:</summary>
117#! <!-- rustdoc requires the following blank line for the feature list to render correctly! -->
118#!
119
120# BEGIN AUTOGENERATED CONFIG FEATURES
121# Generated by gen_config.py. DO NOT EDIT.
122## 64
123task-arena-size-64 = []
124## 128
125task-arena-size-128 = []
126## 192
127task-arena-size-192 = []
128## 256
129task-arena-size-256 = []
130## 320
131task-arena-size-320 = []
132## 384
133task-arena-size-384 = []
134## 512
135task-arena-size-512 = []
136## 640
137task-arena-size-640 = []
138## 768
139task-arena-size-768 = []
140## 1024
141task-arena-size-1024 = []
142## 1280
143task-arena-size-1280 = []
144## 1536
145task-arena-size-1536 = []
146## 2048
147task-arena-size-2048 = []
148## 2560
149task-arena-size-2560 = []
150## 3072
151task-arena-size-3072 = []
152## 4096 (default)
153task-arena-size-4096 = [] # Default
154## 5120
155task-arena-size-5120 = []
156## 6144
157task-arena-size-6144 = []
158## 8192
159task-arena-size-8192 = []
160## 10240
161task-arena-size-10240 = []
162## 12288
163task-arena-size-12288 = []
164## 16384
165task-arena-size-16384 = []
166## 20480
167task-arena-size-20480 = []
168## 24576
169task-arena-size-24576 = []
170## 32768
171task-arena-size-32768 = []
172## 40960
173task-arena-size-40960 = []
174## 49152
175task-arena-size-49152 = []
176## 65536
177task-arena-size-65536 = []
178## 81920
179task-arena-size-81920 = []
180## 98304
181task-arena-size-98304 = []
182## 131072
183task-arena-size-131072 = []
184## 163840
185task-arena-size-163840 = []
186## 196608
187task-arena-size-196608 = []
188## 262144
189task-arena-size-262144 = []
190## 327680
191task-arena-size-327680 = []
192## 393216
193task-arena-size-393216 = []
194## 524288
195task-arena-size-524288 = []
196## 655360
197task-arena-size-655360 = []
198## 786432
199task-arena-size-786432 = []
200## 1048576
201task-arena-size-1048576 = []
202
203# END AUTOGENERATED CONFIG FEATURES
204
205#! </details>
206