aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/Cargo.toml
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-executor/Cargo.toml')
-rw-r--r--embassy-executor/Cargo.toml116
1 files changed, 90 insertions, 26 deletions
diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml
index 0f69d3c8a..f6dce5c0e 100644
--- a/embassy-executor/Cargo.toml
+++ b/embassy-executor/Cargo.toml
@@ -1,6 +1,6 @@
1[package] 1[package]
2name = "embassy-executor" 2name = "embassy-executor"
3version = "0.7.0" 3version = "0.9.1"
4edition = "2021" 4edition = "2021"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6description = "async/await executor designed for embedded usage" 6description = "async/await executor designed for embedded usage"
@@ -12,10 +12,61 @@ categories = [
12 "asynchronous", 12 "asynchronous",
13] 13]
14 14
15[package.metadata.embassy]
16build = [
17 {target = "thumbv7em-none-eabi", features = []},
18 {target = "thumbv7em-none-eabi", features = ["log"]},
19 {target = "thumbv7em-none-eabi", features = ["defmt"]},
20 {target = "thumbv6m-none-eabi", features = ["defmt"]},
21 {target = "thumbv6m-none-eabi", features = ["arch-cortex-m", "defmt", "executor-interrupt", "executor-thread"]},
22 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m"]},
23 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "rtos-trace"]},
24 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-thread"]},
25 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt"]},
26 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread"]},
27 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "embassy-time-driver"]},
28 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "embassy-time-driver", "scheduler-priority"]},
29 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "embassy-time-driver", "scheduler-priority", "scheduler-deadline"]},
30 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "embassy-time-driver", "scheduler-deadline"]},
31 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "scheduler-priority", "scheduler-deadline"]},
32 {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "scheduler-deadline"]},
33 {target = "armv7a-none-eabi", features = ["arch-cortex-ar", "executor-thread"]},
34 {target = "armv7r-none-eabi", features = ["arch-cortex-ar", "executor-thread"]},
35 {target = "armv7r-none-eabihf", features = ["arch-cortex-ar", "executor-thread"]},
36 {target = "riscv32imac-unknown-none-elf", features = ["arch-riscv32"]},
37 {target = "riscv32imac-unknown-none-elf", features = ["arch-riscv32", "executor-thread"]},
38 # Nightly builds
39 {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly"]},
40 {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly", "log"]},
41 {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly", "defmt"]},
42 {group = "nightly", target = "thumbv6m-none-eabi", features = ["nightly", "defmt"]},
43 {group = "nightly", target = "thumbv6m-none-eabi", features = ["nightly", "defmt", "arch-cortex-m", "executor-thread", "executor-interrupt"]},
44 {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly", "arch-cortex-m"]},
45 {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly", "arch-cortex-m", "executor-thread"]},
46 {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly", "arch-cortex-m", "executor-interrupt"]},
47 {group = "nightly", target = "thumbv7em-none-eabi", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt"]},
48 {group = "nightly", target = "riscv32imac-unknown-none-elf", features = ["nightly", "arch-riscv32"]},
49 {group = "nightly", target = "riscv32imac-unknown-none-elf", features = ["nightly", "arch-riscv32", "executor-thread"]},
50 {group = "nightly", target = "armv7a-none-eabi", features = ["nightly", "arch-cortex-ar", "executor-thread"]},
51 {group = "nightly", target = "avr-none", features = ["nightly", "arch-avr", "avr-device/atmega328p"], build-std = ["core", "alloc"], env = { RUSTFLAGS = "-Ctarget-cpu=atmega328p" }},
52 # Xtensa builds
53 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32-none-elf", features = []},
54 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32-none-elf", features = ["log"]},
55 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32-none-elf", features = ["defmt"]},
56 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32s2-none-elf", features = ["defmt"]},
57 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32-none-elf", features = ["defmt", "arch-spin", "executor-thread"]},
58 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32s2-none-elf", features = ["defmt", "arch-spin", "executor-thread"]},
59 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32s3-none-elf", features = ["defmt", "arch-spin", "executor-thread"]},
60 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32-none-elf", features = ["arch-spin"]},
61 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32-none-elf", features = ["arch-spin", "rtos-trace"]},
62 {group = "xtensa", build-std = ["core", "alloc"], target = "xtensa-esp32-none-elf", features = ["arch-spin", "executor-thread"]},
63]
64
65
15[package.metadata.embassy_docs] 66[package.metadata.embassy_docs]
16src_base = "https://github.com/embassy-rs/embassy/blob/embassy-executor-v$VERSION/embassy-executor/src/" 67src_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/" 68src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-executor/src/"
18features = ["defmt"] 69features = ["defmt", "scheduler-deadline", "scheduler-priority"]
19flavors = [ 70flavors = [
20 { name = "std", target = "x86_64-unknown-linux-gnu", features = ["arch-std", "executor-thread"] }, 71 { 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"] }, 72 { name = "wasm", target = "wasm32-unknown-unknown", features = ["arch-wasm", "executor-thread"] },
@@ -26,15 +77,16 @@ flavors = [
26[package.metadata.docs.rs] 77[package.metadata.docs.rs]
27default-target = "thumbv7em-none-eabi" 78default-target = "thumbv7em-none-eabi"
28targets = ["thumbv7em-none-eabi"] 79targets = ["thumbv7em-none-eabi"]
29features = ["defmt", "arch-cortex-m", "executor-thread", "executor-interrupt"] 80features = ["defmt", "arch-cortex-m", "executor-thread", "executor-interrupt", "scheduler-deadline", "scheduler-priority", "embassy-time-driver"]
30 81
31[dependencies] 82[dependencies]
32defmt = { version = "0.3", optional = true } 83defmt = { version = "1.0.1", optional = true }
33log = { version = "0.4.14", optional = true } 84log = { version = "0.4.14", optional = true }
34rtos-trace = { version = "0.1.3", optional = true } 85rtos-trace = { version = "0.2", optional = true }
35 86
36embassy-executor-macros = { version = "0.6.2", path = "../embassy-executor-macros" } 87embassy-executor-macros = { version = "0.7.0", path = "../embassy-executor-macros" }
37embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true } 88embassy-time-driver = { version = "0.2.1", path = "../embassy-time-driver", optional = true }
89embassy-executor-timer-queue = { version = "0.1", path = "../embassy-executor-timer-queue" }
38critical-section = "1.1" 90critical-section = "1.1"
39 91
40document-features = "0.2.7" 92document-features = "0.2.7"
@@ -45,6 +97,9 @@ portable-atomic = { version = "1.5", optional = true }
45# arch-cortex-m dependencies 97# arch-cortex-m dependencies
46cortex-m = { version = "0.7.6", optional = true } 98cortex-m = { version = "0.7.6", optional = true }
47 99
100# arch-cortex-ar dependencies
101cortex-ar = { version = "0.2", optional = true }
102
48# arch-wasm dependencies 103# arch-wasm dependencies
49wasm-bindgen = { version = "0.2.82", optional = true } 104wasm-bindgen = { version = "0.2.82", optional = true }
50js-sys = { version = "0.3", optional = true } 105js-sys = { version = "0.3", optional = true }
@@ -52,10 +107,16 @@ js-sys = { version = "0.3", optional = true }
52# arch-avr dependencies 107# arch-avr dependencies
53avr-device = { version = "0.7.0", optional = true } 108avr-device = { version = "0.7.0", optional = true }
54 109
110
111[dependencies.cordyceps]
112version = "0.3.4"
113features = ["no-cache-pad"]
114
55[dev-dependencies] 115[dev-dependencies]
56critical-section = { version = "1.1", features = ["std"] } 116critical-section = { version = "1.1", features = ["std"] }
57trybuild = "1.0" 117trybuild = "1.0"
58embassy-sync = { path = "../embassy-sync" } 118embassy-sync = { path = "../embassy-sync" }
119rustversion = "1.0.21"
59 120
60[features] 121[features]
61 122
@@ -73,6 +134,8 @@ _arch = [] # some arch was picked
73arch-std = ["_arch"] 134arch-std = ["_arch"]
74## Cortex-M 135## Cortex-M
75arch-cortex-m = ["_arch", "dep:cortex-m"] 136arch-cortex-m = ["_arch", "dep:cortex-m"]
137## Cortex-A/R
138arch-cortex-ar = ["_arch", "dep:cortex-ar"]
76## RISC-V 32 139## RISC-V 32
77arch-riscv32 = ["_arch"] 140arch-riscv32 = ["_arch"]
78## WASM 141## WASM
@@ -82,29 +145,30 @@ arch-avr = ["_arch", "dep:portable-atomic", "dep:avr-device"]
82## spin (architecture agnostic; never sleeps) 145## spin (architecture agnostic; never sleeps)
83arch-spin = ["_arch"] 146arch-spin = ["_arch"]
84 147
148#! ### Metadata
149
150## Enable the `name` field in task metadata.
151metadata-name = ["embassy-executor-macros/metadata-name"]
152
85#! ### Executor 153#! ### Executor
86 154
87## Enable the thread-mode executor (using WFE/SEV in Cortex-M, WFI in other embedded archs) 155## Enable the thread-mode executor (using WFE/SEV in Cortex-M, WFI in other embedded archs)
88executor-thread = [] 156executor-thread = []
89## Enable the interrupt-mode executor (available in Cortex-M only) 157## Enable the interrupt-mode executor (available in Cortex-M only)
90executor-interrupt = [] 158executor-interrupt = []
91## Enable tracing support (adds some overhead) 159## Enable tracing hooks
92trace = [] 160trace = ["_any_trace"]
93## Enable support for rtos-trace framework 161## Enable support for rtos-trace framework
94rtos-trace = ["dep:rtos-trace", "trace", "dep:embassy-time-driver"] 162rtos-trace = ["_any_trace", "metadata-name", "dep:rtos-trace", "embassy-time-driver"]
95 163_any_trace = []
96#! ### Timer Item Payload Size 164
97#! Sets the size of the payload for timer items, allowing integrated timer implementors to store 165## Enable "Earliest Deadline First" Scheduler, using soft-realtime "deadlines" to prioritize
98#! additional data in the timer item. The payload field will be aligned to this value as well. 166## tasks based on the remaining time before their deadline. Adds some overhead.
99#! If these features are not defined, the timer item will contain no payload field. 167scheduler-deadline = []
100 168
101_timer-item-payload = [] # A size was picked 169## Enable "Highest Priority First" Scheduler. Adds some overhead.
102 170scheduler-priority = []
103## 1 bytes 171
104timer-item-payload-size-1 = ["_timer-item-payload"] 172## Enable the embassy_time_driver dependency.
105## 2 bytes 173## This can unlock extra APIs, for example for the `sheduler-deadline`
106timer-item-payload-size-2 = ["_timer-item-payload"] 174embassy-time-driver = ["dep:embassy-time-driver"]
107## 4 bytes
108timer-item-payload-size-4 = ["_timer-item-payload"]
109## 8 bytes
110timer-item-payload-size-8 = ["_timer-item-payload"]