executor: always name main task main, not just with rtos-trace.

Also fixes the warning about the `rtos-trace` feature not existing in embassy-executor-macros.
This commit is contained in:
Dario Nieuwenhuis 2025-09-05 14:57:05 +02:00
parent 70aaa82e49
commit 286d887529
4 changed files with 5 additions and 4 deletions

View File

@ -23,3 +23,4 @@ proc-macro = true
[features]
nightly = []
metadata-name = []

View File

@ -170,7 +170,7 @@ For example: `#[embassy_executor::main(entry = ..., executor = \"some_crate::Exe
let f_body = f.body;
let out = &f.sig.output;
let name_main_task = if cfg!(feature = "rtos-trace") {
let name_main_task = if cfg!(feature = "metadata-name") {
quote!(
main_task.metadata().set_name("main\0");
)

View File

@ -8,8 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->
## Unreleased - ReleaseDate
- Added new metadata API for tasks
- Named main task when rtos-trace feature is enabled.
- Added new metadata API for tasks.
- Main task automatically gets a name of `main` when the `metadata-name` feature is enabled.
- Upgraded rtos-trace
## 0.9.1 - 2025-08-31

View File

@ -112,7 +112,7 @@ arch-spin = ["_arch"]
#! ### Metadata
## Enable the `name` field in task metadata.
metadata-name = []
metadata-name = ["embassy-executor-macros/metadata-name"]
#! ### Executor