Fix examples for embassy-executor 0.10 and update dependencies#795
Conversation
Update all three example workspaces (std, rt685s-evk, rt633) to work with embassy-executor 0.10.0, and update related workspace dependencies: - Bump rust-toolchain and MSRV from 1.88 to 1.90 - Bump num_enum from 0.7.4 to 0.7.5 in workspace Cargo.toml - Update embassy-imxrt git revision in workspace Cargo.lock - Rename executor feature flags: arch-std -> platform-std, arch-cortex-m -> platform-cortex-m in each example Cargo.toml - Update example Cargo.lock files to resolve embassy-executor 0.10.0 - Replace removed spawner.must_spawn(X) with spawner.spawn(X.unwrap()) across all example binaries (task functions now return Result<SpawnToken, SpawnError> and spawn() takes SpawnToken directly) - Replace spawner.spawn(X).unwrap() with spawner.spawn(X.unwrap()) to match the new spawn() -> () return type - Add Windows-only __DEFMT_MARKER_* linker stubs in std/debug.rs to work around the MSVC linker not processing defmt's ELF linker script Co-authored-by: Copilot <[email protected]>
Cargo Vet Audit Passed
|
Convert nested if-let statements to guard let patterns (&&) for cleaner control flow. Replace modulo-based divisibility checks with is_multiple_of() for more idiomatic Rust code.
Add safe-to-deploy audits for recent dependency updates: * embassy-hal-internal 0.3.0 -> 0.4.0 * embassy-embedded-hal 0.5.0 -> 0.6.0 * embassy-time 0.5.0 -> 0.5.1 * embassy-time-driver 0.2.1 -> 0.2.2 * num_enum 0.7.5 -> 0.7.6 * num_enum_derive 0.7.5 -> 0.7.6 * embedded-mcu-hal 0.2.0 Refresh imported audit data and remove exemptions now covered by imported audits. This reduces local exemption surface and aligns the supply-chain policy with current upstream audit coverage.
There was a problem hiding this comment.
Pull request overview
Updates the repository toolchain and dependency set to support embassy-executor 0.10, and migrates the example workspaces to the new spawn/token APIs and renamed executor feature flags.
Changes:
- Bump Rust toolchain/MSRV to 1.90 and update key dependencies/locks (including
num_enum,embassy-*, and example workspaces’ lockfiles). - Update example workspaces (std/rt685s-evk/rt633) for
embassy-executor0.10 spawn semantics and feature flag renames. - Refresh supply-chain (cargo-vet) config/imports/audits to reflect dependency updates.
Reviewed changes
Copilot reviewed 14 out of 44 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
type-c-service/src/wrapper/power.rs |
Refactors recovery/contract handling conditionals using let-chains. |
supply-chain/imports.lock |
Updates imported audit entries and notes formatting from upstream sources. |
supply-chain/config.toml |
Removes now-unneeded exemptions aligned with updated imported audits. |
supply-chain/audits.toml |
Adds local audit deltas for updated embassy crates and num_enum. |
rust-toolchain.toml |
Pins toolchain channel to Rust 1.90. |
power-policy-service/src/consumer.rs |
Minor conditional refactor using let-chains. |
partition-manager/partition-manager/src/test/mock.rs |
Uses is_multiple_of for alignment checks in test mocks. |
partition-manager/partition-manager/src/ext/bdd.rs |
Uses is_multiple_of in block-alignment helper. |
examples/std/src/bin/type_c/unconstrained.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/type_c/ucsi.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/type_c/service.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/type_c/external.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/type_c/basic.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/thermal.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/power_policy.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/keyboard.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/init.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/hid.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/debug.rs |
Adds Windows linker stubs for defmt markers; updates spawning to new style. |
examples/std/src/bin/cfu_splitter.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/cfu_client.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/cfu_buffer.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/buffer.rs |
Updates spawning to new spawn(token) style. |
examples/std/src/bin/battery.rs |
Updates spawning to new spawn(token) style. |
examples/std/Cargo.toml |
Bumps embassy-executor and renames executor platform feature flags. |
examples/std/Cargo.lock |
Resolves embassy-executor 0.10 and related dependency updates. |
examples/rt685s-evk/src/bin/type_c_cfu.rs |
Updates spawning to new spawn(token) style. |
examples/rt685s-evk/src/bin/type_c.rs |
Updates spawning to new spawn(token) style. |
examples/rt685s-evk/src/bin/transport.rs |
Updates spawning to new spawn(token) style. |
examples/rt685s-evk/src/bin/reset.rs |
Updates spawning to new spawn(token) style. |
examples/rt685s-evk/src/bin/power_button.rs |
Updates spawning to new spawn(token) style. |
examples/rt685s-evk/src/bin/mock_espi_service.rs |
Updates spawning to new spawn(token) style. |
examples/rt685s-evk/src/bin/keyboard.rs |
Updates spawning to new spawn(token) style. |
examples/rt685s-evk/Cargo.toml |
Bumps embassy-executor and renames executor platform feature flags. |
examples/rt685s-evk/Cargo.lock |
Resolves embassy-executor 0.10 and related dependency updates. |
examples/rt633/src/bin/espi_battery.rs |
Updates spawning to new spawn(token) style. |
examples/rt633/src/bin/espi.rs |
Updates spawning to new spawn(token) style. |
examples/rt633/Cargo.toml |
Bumps embassy-executor and renames executor platform feature flags. |
examples/rt633/Cargo.lock |
Resolves embassy-executor 0.10 and related dependency updates. |
embedded-service/src/power/policy/policy.rs |
Minor conditional refactor using let-chains. |
embedded-service/src/comms.rs |
Minor conditional refactor using let-chains. |
Cargo.toml |
Bumps workspace num_enum version. |
Cargo.lock |
Updates locked versions (embassy stack, num_enum, embassy-imxrt rev, etc.). |
.github/workflows/check.yml |
Updates CI MSRV matrix to 1.90. |
kurtjd
left a comment
There was a problem hiding this comment.
Looks good, though there is a lot of overlap with this PR that went on to v0.2.0: #788
I'm not sure if this sort of duplication will result in frustrating conflicts if/when we merge v0.2.0 into main. But I suppose v0.2.0 has already diverged significantly enough that there's going to be a lot of pain regardless.
I should do a mergeback soon to undiverge v0.2.0 😩 |
Yeah, Billy and I discussed this and looked at the divergence. We came to the conclusion that it will be painful regardless. |
Move rust-version declaration to [workspace.package] in the root Cargo.toml and replace per-crate rust-version fields with rust-version.workspace = true. This ensures MSRV is defined in a single place and stays consistent across all crates.
|
Announced on Zulip: #embedded-controller > Embassy Dependencies Update for ODP Repos |
Update all three example workspaces (std, rt685s-evk, rt633) to work with embassy-executor 0.10.0, and update related workspace dependencies: