Skip to content

Fix examples for embassy-executor 0.10 and update dependencies#795

Merged
jerrysxie merged 10 commits intoOpenDevicePartnership:mainfrom
jerrysxie:fix/examples-embassy-executor-0.10
Apr 17, 2026
Merged

Fix examples for embassy-executor 0.10 and update dependencies#795
jerrysxie merged 10 commits intoOpenDevicePartnership:mainfrom
jerrysxie:fix/examples-embassy-executor-0.10

Conversation

@jerrysxie
Copy link
Copy Markdown
Contributor

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

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]>
@jerrysxie jerrysxie self-assigned this Apr 16, 2026
@jerrysxie jerrysxie added the BREAKING CHANGE Marks breaking changes label Apr 16, 2026
@github-project-automation github-project-automation bot moved this to In progress in ODP Backlog Apr 16, 2026
@jerrysxie jerrysxie added the dependencies Dependencies have been updated label Apr 16, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2026

Cargo Vet Audit Passed

cargo vet has passed in this PR. No new unvetted dependencies were found.

@github-actions github-actions bot added the cargo vet PRs pending auditor review label Apr 16, 2026
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.
@jerrysxie jerrysxie marked this pull request as ready for review April 16, 2026 04:51
@jerrysxie jerrysxie requested review from a team as code owners April 16, 2026 04:51
Copilot AI review requested due to automatic review settings April 16, 2026 04:51
@jerrysxie jerrysxie requested review from a team as code owners April 16, 2026 04:51
@jerrysxie jerrysxie removed this from ODP Backlog Apr 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-executor 0.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.

Comment thread partition-manager/partition-manager/src/ext/bdd.rs Outdated
Comment thread rust-toolchain.toml
kurtjd
kurtjd previously approved these changes Apr 16, 2026
Copy link
Copy Markdown
Contributor

@kurtjd kurtjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tullom
Copy link
Copy Markdown
Contributor

tullom commented Apr 16, 2026

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 😩

tullom
tullom previously approved these changes Apr 16, 2026
@jerrysxie
Copy link
Copy Markdown
Contributor Author

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.

Yeah, Billy and I discussed this and looked at the divergence. We came to the conclusion that it will be painful regardless.

@jerrysxie jerrysxie dismissed stale reviews from tullom and kurtjd via 97ca5f2 April 16, 2026 16:50
kurtjd
kurtjd previously approved these changes Apr 16, 2026
felipebalbi
felipebalbi previously approved these changes Apr 16, 2026
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.
@jerrysxie jerrysxie dismissed stale reviews from felipebalbi and kurtjd via 1be0064 April 16, 2026 19:33
@jerrysxie jerrysxie requested review from a team as code owners April 16, 2026 19:33
@jerrysxie jerrysxie requested review from philgweber and tullom April 16, 2026 19:33
@jerrysxie
Copy link
Copy Markdown
Contributor Author

@jerrysxie jerrysxie merged commit 3d584db into OpenDevicePartnership:main Apr 17, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKING CHANGE Marks breaking changes cargo vet PRs pending auditor review dependencies Dependencies have been updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants