diff options
Diffstat (limited to 'embassy-executor/Cargo.toml')
| -rw-r--r-- | embassy-executor/Cargo.toml | 116 |
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] |
| 2 | name = "embassy-executor" | 2 | name = "embassy-executor" |
| 3 | version = "0.7.0" | 3 | version = "0.9.1" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | description = "async/await executor designed for embedded usage" | 6 | description = "async/await executor designed for embedded usage" |
| @@ -12,10 +12,61 @@ categories = [ | |||
| 12 | "asynchronous", | 12 | "asynchronous", |
| 13 | ] | 13 | ] |
| 14 | 14 | ||
| 15 | [package.metadata.embassy] | ||
| 16 | build = [ | ||
| 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] |
| 16 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-executor-v$VERSION/embassy-executor/src/" | 67 | 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/" | 68 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-executor/src/" |
| 18 | features = ["defmt"] | 69 | features = ["defmt", "scheduler-deadline", "scheduler-priority"] |
| 19 | flavors = [ | 70 | flavors = [ |
| 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] |
| 27 | default-target = "thumbv7em-none-eabi" | 78 | default-target = "thumbv7em-none-eabi" |
| 28 | targets = ["thumbv7em-none-eabi"] | 79 | targets = ["thumbv7em-none-eabi"] |
| 29 | features = ["defmt", "arch-cortex-m", "executor-thread", "executor-interrupt"] | 80 | features = ["defmt", "arch-cortex-m", "executor-thread", "executor-interrupt", "scheduler-deadline", "scheduler-priority", "embassy-time-driver"] |
| 30 | 81 | ||
| 31 | [dependencies] | 82 | [dependencies] |
| 32 | defmt = { version = "0.3", optional = true } | 83 | defmt = { version = "1.0.1", optional = true } |
| 33 | log = { version = "0.4.14", optional = true } | 84 | log = { version = "0.4.14", optional = true } |
| 34 | rtos-trace = { version = "0.1.3", optional = true } | 85 | rtos-trace = { version = "0.2", optional = true } |
| 35 | 86 | ||
| 36 | embassy-executor-macros = { version = "0.6.2", path = "../embassy-executor-macros" } | 87 | embassy-executor-macros = { version = "0.7.0", path = "../embassy-executor-macros" } |
| 37 | embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true } | 88 | embassy-time-driver = { version = "0.2.1", path = "../embassy-time-driver", optional = true } |
| 89 | embassy-executor-timer-queue = { version = "0.1", path = "../embassy-executor-timer-queue" } | ||
| 38 | critical-section = "1.1" | 90 | critical-section = "1.1" |
| 39 | 91 | ||
| 40 | document-features = "0.2.7" | 92 | document-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 |
| 46 | cortex-m = { version = "0.7.6", optional = true } | 98 | cortex-m = { version = "0.7.6", optional = true } |
| 47 | 99 | ||
| 100 | # arch-cortex-ar dependencies | ||
| 101 | cortex-ar = { version = "0.2", optional = true } | ||
| 102 | |||
| 48 | # arch-wasm dependencies | 103 | # arch-wasm dependencies |
| 49 | wasm-bindgen = { version = "0.2.82", optional = true } | 104 | wasm-bindgen = { version = "0.2.82", optional = true } |
| 50 | js-sys = { version = "0.3", optional = true } | 105 | js-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 |
| 53 | avr-device = { version = "0.7.0", optional = true } | 108 | avr-device = { version = "0.7.0", optional = true } |
| 54 | 109 | ||
| 110 | |||
| 111 | [dependencies.cordyceps] | ||
| 112 | version = "0.3.4" | ||
| 113 | features = ["no-cache-pad"] | ||
| 114 | |||
| 55 | [dev-dependencies] | 115 | [dev-dependencies] |
| 56 | critical-section = { version = "1.1", features = ["std"] } | 116 | critical-section = { version = "1.1", features = ["std"] } |
| 57 | trybuild = "1.0" | 117 | trybuild = "1.0" |
| 58 | embassy-sync = { path = "../embassy-sync" } | 118 | embassy-sync = { path = "../embassy-sync" } |
| 119 | rustversion = "1.0.21" | ||
| 59 | 120 | ||
| 60 | [features] | 121 | [features] |
| 61 | 122 | ||
| @@ -73,6 +134,8 @@ _arch = [] # some arch was picked | |||
| 73 | arch-std = ["_arch"] | 134 | arch-std = ["_arch"] |
| 74 | ## Cortex-M | 135 | ## Cortex-M |
| 75 | arch-cortex-m = ["_arch", "dep:cortex-m"] | 136 | arch-cortex-m = ["_arch", "dep:cortex-m"] |
| 137 | ## Cortex-A/R | ||
| 138 | arch-cortex-ar = ["_arch", "dep:cortex-ar"] | ||
| 76 | ## RISC-V 32 | 139 | ## RISC-V 32 |
| 77 | arch-riscv32 = ["_arch"] | 140 | arch-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) |
| 83 | arch-spin = ["_arch"] | 146 | arch-spin = ["_arch"] |
| 84 | 147 | ||
| 148 | #! ### Metadata | ||
| 149 | |||
| 150 | ## Enable the `name` field in task metadata. | ||
| 151 | metadata-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) |
| 88 | executor-thread = [] | 156 | executor-thread = [] |
| 89 | ## Enable the interrupt-mode executor (available in Cortex-M only) | 157 | ## Enable the interrupt-mode executor (available in Cortex-M only) |
| 90 | executor-interrupt = [] | 158 | executor-interrupt = [] |
| 91 | ## Enable tracing support (adds some overhead) | 159 | ## Enable tracing hooks |
| 92 | trace = [] | 160 | trace = ["_any_trace"] |
| 93 | ## Enable support for rtos-trace framework | 161 | ## Enable support for rtos-trace framework |
| 94 | rtos-trace = ["dep:rtos-trace", "trace", "dep:embassy-time-driver"] | 162 | rtos-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. | 167 | scheduler-deadline = [] |
| 100 | 168 | ||
| 101 | _timer-item-payload = [] # A size was picked | 169 | ## Enable "Highest Priority First" Scheduler. Adds some overhead. |
| 102 | 170 | scheduler-priority = [] | |
| 103 | ## 1 bytes | 171 | |
| 104 | timer-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` |
| 106 | timer-item-payload-size-2 = ["_timer-item-payload"] | 174 | embassy-time-driver = ["dep:embassy-time-driver"] |
| 107 | ## 4 bytes | ||
| 108 | timer-item-payload-size-4 = ["_timer-item-payload"] | ||
| 109 | ## 8 bytes | ||
| 110 | timer-item-payload-size-8 = ["_timer-item-payload"] | ||
