Skip to content

Bump embassy-executor to v0.9.0 and remove legacy embassy-usb support#137

Merged
jamesmunns merged 4 commits into
jamesmunns:mainfrom
pperanich:bump-embassy
Oct 23, 2025
Merged

Bump embassy-executor to v0.9.0 and remove legacy embassy-usb support#137
jamesmunns merged 4 commits into
jamesmunns:mainfrom
pperanich:bump-embassy

Conversation

@pperanich

Copy link
Copy Markdown
Contributor

Summary

  • Bump embassy-executor from v0.7.0 to v0.9.0 addressing issue support embassy-executor v0.9.0 #134
  • Update related embassy dependencies (embassy-time 0.4.0 → 0.5.0, embassy-sync 0.6 → 0.7, heapless 0.8.0 → 0.9.1)
  • Remove support for legacy embassy-usb v0.3 and v0.4 versions by deleting the firmware-eusb-v0_3 example

Pending an update to esp-hal to support the latest embassy-executor bump.

Fixes #134

@jamesmunns

Copy link
Copy Markdown
Owner

Sorry for causing merge conflicts! Let me know if you have any issues merging/rebasing.

@jamesmunns

Copy link
Copy Markdown
Owner

#138 is going to cause another release, you might not want to fix those conflicts right right now.

@jamesmunns

Copy link
Copy Markdown
Owner

Hey @pperanich, I'd be happy to help get this up to date/merged, is there anything I can help with, or anything you're not sure about?

I can spend some time next week to get this buttoned up if you want to update anything before then, or would prefer if I take over. Thanks for the work here!

@pperanich

Copy link
Copy Markdown
Contributor Author

I think the remaining issue right now is that esp-hal has not tagged a release since bumping embassy deps in esp-rs/esp-hal#3945. When I patch the dependencies manually with:

[patch.crates-io]
esp-hal = { git = "https://github.com/esp-rs/esp-hal", rev = "36634a4f9283ea4cc6b38a5598aa67af025cef5b" }
esp-hal-embassy = { git = "https://github.com/esp-rs/esp-hal", rev = "36634a4f9283ea4cc6b38a5598aa67af025cef5b" }
esp-bootloader-esp-idf = { git = "https://github.com/esp-rs/esp-hal", rev = "36634a4f9283ea4cc6b38a5598aa67af025cef5b" }

I get an error from the esp smartleds crate since it has not been updated with the unreleased esp-hal changes either.

@jamesmunns

jamesmunns commented Sep 9, 2025

Copy link
Copy Markdown
Owner

If we need to disable the esp32c6 check in CI for now, we can do that, and open an issue that it needs to be fixed.

@pperanich

Copy link
Copy Markdown
Contributor Author

If we do that, I believe this is ready to merge then! Let me know if anything sticks out to you. Note that I did bump some other deps as well, such as maitake-sync.

@pperanich pperanich marked this pull request as ready for review September 9, 2025 15:59
@pperanich

Copy link
Copy Markdown
Contributor Author

Well, the ci script still needs some work, but good besides that! I may let you take over the changes to that if you'd like!

@phenaultBH

Copy link
Copy Markdown

Two comments:

  • The embassy stm32 hal takes a dependency of the executor v 0.7 in hal version 0.3 or higher. This update for me is welcomed.
  • I have this branch running on a STM32H7 and at a surface level seems to work well.

Is there anything I can do to help get it completed?

@kevswims

Copy link
Copy Markdown
Contributor

I've got two commits here: https://github.com/lucimobility/postcard-rpc/pull/3/commits that make this build with the ESP32 example disabled for now.

@felipebalbi

Copy link
Copy Markdown
Collaborator

This diff is missing from the PR, but ESP examples still fail to build.

diff --git a/ci-stubs.sh b/ci-stubs.sh
index 22fb93bda0d7..476567eca337 100755
--- a/ci-stubs.sh
+++ b/ci-stubs.sh
@@ -4,12 +4,6 @@ set -euxo pipefail
 # These tests don't run on Windows, idk.

 # Run stub test checks
-cargo test \
-    --manifest-path source/postcard-rpc/Cargo.toml \
-    --features=embassy-usb-0_3-server
-cargo test \
-    --manifest-path source/postcard-rpc/Cargo.toml \
-    --features=embassy-usb-0_4-server
 cargo test \
     --manifest-path source/postcard-rpc/Cargo.toml \
     --features=embassy-usb-0_5-server
diff --git a/ci.sh b/ci.sh
index 21bd7fe921dc..cf92f1a1213a 100755
--- a/ci.sh
+++ b/ci.sh
@@ -12,8 +12,6 @@ cargo fmt --all --manifest-path source/postcard-rpc/Cargo.toml -- --check
 cargo fmt --all --manifest-path example/workbook-host/Cargo.toml -- --check
 cargo fmt --all --manifest-path example/serial-host/Cargo.toml -- --check
 cargo fmt --all --manifest-path example/firmware/Cargo.toml -- --check
-cargo fmt --all --manifest-path example/firmware-eusb-v0_4/Cargo.toml -- --check
-cargo fmt --all --manifest-path example/firmware-eusb-v0_3/Cargo.toml -- --check
 cargo fmt --all --manifest-path example/nrf52840-serial/Cargo.toml -- --check
 cargo fmt --all --manifest-path example/esp32c6-serial/Cargo.toml -- --check
 cargo fmt --all --manifest-path source/postcard-rpc-test/Cargo.toml -- --check
@@ -51,11 +49,6 @@ RUSTFLAGS="--cfg=web_sys_unstable_apis" \
         --target wasm32-unknown-unknown

 # Embedded + embassy server impl
-cargo check \
-    --manifest-path source/postcard-rpc/Cargo.toml \
-    --no-default-features \
-    --features=embassy-usb-0_3-server,embassy-usb-0_4-server \
-    --target thumbv7em-none-eabihf
 cargo check \
     --manifest-path source/postcard-rpc/Cargo.toml \
     --no-default-features \
@@ -76,13 +69,6 @@ cargo build \
 cargo build \
     --manifest-path example/firmware/Cargo.toml \
     --target thumbv6m-none-eabi
-# Legacy (embassy-usb v0.3/v0.4)
-cargo build \
-    --manifest-path example/firmware-eusb-v0_4/Cargo.toml \
-    --target thumbv6m-none-eabi
-cargo build \
-    --manifest-path example/firmware-eusb-v0_3/Cargo.toml \
-    --target thumbv6m-none-eabi
 # embedded-io support
 cargo build \
     --manifest-path example/nrf52840-serial/Cargo.toml \
diff --git a/example/workbook-host/Cargo.lock b/example/workbook-host/Cargo.lock
index 46d5ea6d67b3..85924f8a2f87 100644
--- a/example/workbook-host/Cargo.lock
+++ b/example/workbook-host/Cargo.lock
@@ -338,9 +338,9 @@ dependencies = [

 [[package]]
 name = "heapless"
-version = "0.8.0"
+version = "0.9.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad"
+checksum = "b1edcd5a338e64688fbdcb7531a846cfd3476a54784dcb918a0844682bc7ada5"
 dependencies = [
  "hash32 0.3.1",
  "stable_deref_trait",
@@ -425,15 +425,17 @@ dependencies = [

 [[package]]
 name = "maitake-sync"
-version = "0.1.2"
+version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6816ab14147f80234c675b80ed6dc4f440d8a1cefc158e766067aedb84c0bcd5"
+checksum = "748f86d9befd480b602c3bebc9ef30dbf2f3dfc8acc4a73d07b90f0117e6de3f"
 dependencies = [
  "cordyceps",
  "loom",
+ "mutex-traits",
  "mycelium-bitfield",
  "pin-project",
  "portable-atomic",
+ "tracing",
 ]

 [[package]]
@@ -484,6 +486,12 @@ dependencies = [
  "winapi",
 ]

+[[package]]
+name = "mutex-traits"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3929f2b5633d29cf7b6624992e5f3c1e9334f1193423e12d17be4faf678cde3f"
+
 [[package]]
 name = "mycelium-bitfield"
 version = "0.1.5"
@@ -630,7 +638,7 @@ name = "postcard-rpc"
 version = "0.11.15"
 dependencies = [
  "cobs 0.4.0",
- "heapless 0.8.0",
+ "heapless 0.9.1",
  "maitake-sync",
  "nusb",
  "portable-atomic",

Comment thread example/esp32c6-serial/Cargo.toml
@jamesmunns jamesmunns merged commit 428cc76 into jamesmunns:main Oct 23, 2025
3 checks passed
@jamesmunns

Copy link
Copy Markdown
Owner

Thank you @pperanich and everyone else! Going to try and roll in some other PRs and then get this released today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support embassy-executor v0.9.0

5 participants