1 | [package] |
2 | name = "embassy-executor" |
3 | version = "0.7.0" |
4 | edition = "2021" |
5 | license = "MIT OR Apache-2.0" |
6 | description = "async/await executor designed for embedded usage" |
7 | repository = "https://github.com/embassy-rs/embassy" |
8 | documentation = "https://docs.embassy.dev/embassy-executor" |
9 | categories = [ |
10 | "embedded" , |
11 | "no-std" , |
12 | "asynchronous" , |
13 | ] |
14 | |
15 | [package.metadata.embassy_docs] |
16 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-executor-v$VERSION/embassy-executor/src/" |
17 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-executor/src/" |
18 | features = ["defmt" ] |
19 | flavors = [ |
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] |
27 | default-target = "thumbv7em-none-eabi" |
28 | targets = ["thumbv7em-none-eabi" ] |
29 | features = ["defmt" , "arch-cortex-m" , "executor-thread" , "executor-interrupt" ] |
30 | |
31 | [dependencies] |
32 | defmt = { version = "0.3" , optional = true } |
33 | log = { version = "0.4.14" , optional = true } |
34 | rtos-trace = { version = "0.1.3" , optional = true } |
35 | |
36 | embassy-executor-macros = { version = "0.6.2" , path = "../embassy-executor-macros" } |
37 | embassy-time-driver = { version = "0.2" , path = "../embassy-time-driver" , optional = true } |
38 | critical-section = "1.1" |
39 | |
40 | document-features = "0.2.7" |
41 | |
42 | # needed for AVR |
43 | portable-atomic = { version = "1.5" , optional = true } |
44 | |
45 | # arch-cortex-m dependencies |
46 | cortex-m = { version = "0.7.6" , optional = true } |
47 | |
48 | # arch-wasm dependencies |
49 | wasm-bindgen = { version = "0.2.82" , optional = true } |
50 | js-sys = { version = "0.3" , optional = true } |
51 | |
52 | # arch-avr dependencies |
53 | avr-device = { version = "0.5.3" , optional = true } |
54 | |
55 | [dev-dependencies] |
56 | critical-section = { version = "1.1" , features = ["std" ] } |
57 | trybuild = "1.0" |
58 | embassy-sync = { path = "../embassy-sync" } |
59 | |
60 | [features] |
61 | |
62 | ## Enable nightly-only features |
63 | nightly = ["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 |
68 | turbowakers = [] |
69 | |
70 | #! ### Architecture |
71 | _arch = [] # some arch was picked |
72 | ## std |
73 | arch-std = ["_arch" , "critical-section/std" ] |
74 | ## Cortex-M |
75 | arch-cortex-m = ["_arch" , "dep:cortex-m" ] |
76 | ## RISC-V 32 |
77 | arch-riscv32 = ["_arch" ] |
78 | ## WASM |
79 | arch-wasm = ["_arch" , "dep:wasm-bindgen" , "dep:js-sys" , "critical-section/std" ] |
80 | ## AVR |
81 | arch-avr = ["_arch" , "dep:portable-atomic" , "dep:avr-device" ] |
82 | ## spin (architecture agnostic; never sleeps) |
83 | arch-spin = ["_arch" ] |
84 | |
85 | #! ### Executor |
86 | |
87 | ## Enable the thread-mode executor (using WFE/SEV in Cortex-M, WFI in other embedded archs) |
88 | executor-thread = [] |
89 | ## Enable the interrupt-mode executor (available in Cortex-M only) |
90 | executor-interrupt = [] |
91 | ## Enable tracing support (adds some overhead) |
92 | trace = [] |
93 | ## Enable support for rtos-trace framework |
94 | rtos-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 |
104 | timer-item-payload-size-1 = ["_timer-item-payload" ] |
105 | ## 2 bytes |
106 | timer-item-payload-size-2 = ["_timer-item-payload" ] |
107 | ## 4 bytes |
108 | timer-item-payload-size-4 = ["_timer-item-payload" ] |
109 | ## 8 bytes |
110 | timer-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 |
123 | task-arena-size-64 = [] |
124 | ## 128 |
125 | task-arena-size-128 = [] |
126 | ## 192 |
127 | task-arena-size-192 = [] |
128 | ## 256 |
129 | task-arena-size-256 = [] |
130 | ## 320 |
131 | task-arena-size-320 = [] |
132 | ## 384 |
133 | task-arena-size-384 = [] |
134 | ## 512 |
135 | task-arena-size-512 = [] |
136 | ## 640 |
137 | task-arena-size-640 = [] |
138 | ## 768 |
139 | task-arena-size-768 = [] |
140 | ## 1024 |
141 | task-arena-size-1024 = [] |
142 | ## 1280 |
143 | task-arena-size-1280 = [] |
144 | ## 1536 |
145 | task-arena-size-1536 = [] |
146 | ## 2048 |
147 | task-arena-size-2048 = [] |
148 | ## 2560 |
149 | task-arena-size-2560 = [] |
150 | ## 3072 |
151 | task-arena-size-3072 = [] |
152 | ## 4096 (default) |
153 | task-arena-size-4096 = [] # Default |
154 | ## 5120 |
155 | task-arena-size-5120 = [] |
156 | ## 6144 |
157 | task-arena-size-6144 = [] |
158 | ## 8192 |
159 | task-arena-size-8192 = [] |
160 | ## 10240 |
161 | task-arena-size-10240 = [] |
162 | ## 12288 |
163 | task-arena-size-12288 = [] |
164 | ## 16384 |
165 | task-arena-size-16384 = [] |
166 | ## 20480 |
167 | task-arena-size-20480 = [] |
168 | ## 24576 |
169 | task-arena-size-24576 = [] |
170 | ## 32768 |
171 | task-arena-size-32768 = [] |
172 | ## 40960 |
173 | task-arena-size-40960 = [] |
174 | ## 49152 |
175 | task-arena-size-49152 = [] |
176 | ## 65536 |
177 | task-arena-size-65536 = [] |
178 | ## 81920 |
179 | task-arena-size-81920 = [] |
180 | ## 98304 |
181 | task-arena-size-98304 = [] |
182 | ## 131072 |
183 | task-arena-size-131072 = [] |
184 | ## 163840 |
185 | task-arena-size-163840 = [] |
186 | ## 196608 |
187 | task-arena-size-196608 = [] |
188 | ## 262144 |
189 | task-arena-size-262144 = [] |
190 | ## 327680 |
191 | task-arena-size-327680 = [] |
192 | ## 393216 |
193 | task-arena-size-393216 = [] |
194 | ## 524288 |
195 | task-arena-size-524288 = [] |
196 | ## 655360 |
197 | task-arena-size-655360 = [] |
198 | ## 786432 |
199 | task-arena-size-786432 = [] |
200 | ## 1048576 |
201 | task-arena-size-1048576 = [] |
202 | |
203 | # END AUTOGENERATED CONFIG FEATURES |
204 | |
205 | #! </details> |
206 | |