aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/Cargo.toml
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-04-03 01:18:27 +0200
committerDario Nieuwenhuis <[email protected]>2023-04-03 03:09:11 +0200
commitd3c4e4a20a05085eae8d568c7efdbe09bada9cf5 (patch)
treeef92420c5a4574c9db5cb614d0ecc49d6462badc /embassy-executor/Cargo.toml
parentb41ee47115509ba5ed302c684c0c36b6a3e3f76f (diff)
executor: add Pender, rework Cargo features.
This introduces a `Pender` struct with enum cases for thread-mode, interrupt-mode and custom callback executors. This avoids calls through function pointers when using only the thread or interrupt executors. Faster, and friendlier to `cargo-call-stack`. `embassy-executor` now has `arch-xxx` Cargo features to select the arch and to enable the builtin executors (thread and interrupt).
Diffstat (limited to 'embassy-executor/Cargo.toml')
-rw-r--r--embassy-executor/Cargo.toml25
1 files changed, 20 insertions, 5 deletions
diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml
index 8ad3fd698..bb8a46c82 100644
--- a/embassy-executor/Cargo.toml
+++ b/embassy-executor/Cargo.toml
@@ -31,9 +31,22 @@ flavors = [
31features = ["std", "nightly", "defmt"] 31features = ["std", "nightly", "defmt"]
32 32
33[features] 33[features]
34default = [] 34
35std = ["critical-section/std"] 35# Architecture
36wasm = ["dep:wasm-bindgen", "dep:js-sys"] 36_arch = [] # some arch was picked
37arch-std = ["_arch", "critical-section/std"]
38arch-cortex-m = ["_arch", "dep:cortex-m"]
39arch-xtensa = ["_arch"]
40arch-riscv32 = ["_arch"]
41arch-wasm = ["_arch", "dep:wasm-bindgen", "dep:js-sys"]
42
43# Enable creating a `Pender` from an arbitrary function pointer callback.
44pender-callback = []
45
46# Enable the thread-mode executor (using WFE/SEV in Cortex-M, WFI in other embedded archs)
47executor-thread = []
48# Enable the interrupt-mode executor (available in Cortex-M only)
49executor-interrupt = []
37 50
38# Enable nightly-only features 51# Enable nightly-only features
39nightly = [] 52nightly = []
@@ -55,9 +68,11 @@ embassy-macros = { version = "0.1.0", path = "../embassy-macros" }
55embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true} 68embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true}
56atomic-polyfill = "1.0.1" 69atomic-polyfill = "1.0.1"
57critical-section = "1.1" 70critical-section = "1.1"
58cfg-if = "1.0.0"
59static_cell = "1.0" 71static_cell = "1.0"
60 72
61# WASM dependencies 73# arch-cortex-m dependencies
74cortex-m = { version = "0.7.6", optional = true }
75
76# arch-wasm dependencies
62wasm-bindgen = { version = "0.2.82", optional = true } 77wasm-bindgen = { version = "0.2.82", optional = true }
63js-sys = { version = "0.3", optional = true } 78js-sys = { version = "0.3", optional = true }