From 6ac0671cc37c76d86c0e339f8e07f28cba591a11 Mon Sep 17 00:00:00 2001 From: xgroleau Date: Fri, 5 Dec 2025 11:24:49 +0100 Subject: [PATCH 1/3] chore: bump deps --- ector/Cargo.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ector/Cargo.toml b/ector/Cargo.toml index 611dba4..fd2591f 100644 --- a/ector/Cargo.toml +++ b/ector/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "ector" -version = "0.7.0" +version = "0.9.0" description = "Ector is an open source async, no-alloc actor framework for embedded devices." documentation = "https://docs.rs/ector" readme = "../README.md" @@ -15,9 +15,9 @@ exclude = [".github"] doctest = false [dependencies] -embassy-executor = { version = "0.7", default-features = false } +embassy-executor = { version = "0.9", default-features = false } embassy-sync = { version = "0.7", default-features = false } -portable-atomic = { version = "1.3", default-features = false } +portable-atomic = { version = "1.11", default-features = false } log = { version = "0.4", optional = true } defmt = { version = "1.0.1", optional = true } @@ -28,14 +28,14 @@ static_cell = "2.1" [dev-dependencies] -embassy-executor = { version = "0.7", default-features = false, features = [ +embassy-executor = { version = "0.9", default-features = false, features = [ "arch-std", "executor-thread", ] } -embassy-time = { version = "0.4", default-features = false, features = [ +embassy-time = { version = "0.5", default-features = false, features = [ "std", ] } -embassy-futures = "0.1.1" +embassy-futures = "0.1.2" futures = { version = "0.3.31", default-features = false, features = [ "executor", ] } From 9c065742b17f2f958ccc0f354c26e436c03ff89a Mon Sep 17 00:00:00 2001 From: xgroleau Date: Fri, 5 Dec 2025 11:28:14 +0100 Subject: [PATCH 2/3] chore: bump edition --- ector/Cargo.toml | 2 +- ector/build.rs | 6 +++--- ector/examples/pingpong.rs | 2 +- ector/examples/qmh.rs | 2 +- ector/src/lib.rs | 8 ++------ ector/src/testutils.rs | 2 +- macros/Cargo.toml | 2 +- macros/src/actor.rs | 12 ++++++------ macros/src/lib.rs | 2 +- rustfmt.toml | 2 +- 10 files changed, 18 insertions(+), 22 deletions(-) diff --git a/ector/Cargo.toml b/ector/Cargo.toml index fd2591f..366ac3f 100644 --- a/ector/Cargo.toml +++ b/ector/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "ector" version = "0.9.0" description = "Ector is an open source async, no-alloc actor framework for embedded devices." diff --git a/ector/build.rs b/ector/build.rs index dc2fee5..ff3a8cf 100644 --- a/ector/build.rs +++ b/ector/build.rs @@ -1,5 +1,5 @@ fn main() { - if std::env::var_os("CARGO_FEATURE_NIGHTLY").is_some() { - println!("cargo:rustc-cfg=nightly"); - } + if std::env::var_os("CARGO_FEATURE_NIGHTLY").is_some() { + println!("cargo:rustc-cfg=nightly"); + } } diff --git a/ector/examples/pingpong.rs b/ector/examples/pingpong.rs index 49e8b0b..459a15e 100644 --- a/ector/examples/pingpong.rs +++ b/ector/examples/pingpong.rs @@ -2,7 +2,7 @@ use { ector::*, embassy_time::{Duration, Ticker}, futures::{ - future::{join, select, Either}, + future::{Either, join, select}, pin_mut, }, }; diff --git a/ector/examples/qmh.rs b/ector/examples/qmh.rs index 1a22b9d..2c7b8b5 100644 --- a/ector/examples/qmh.rs +++ b/ector/examples/qmh.rs @@ -38,7 +38,7 @@ pub mod qmh_actor { use core::future::pending; use ector::{mutex::NoopRawMutex, *}; use embassy_executor::SpawnError; - use embassy_futures::select::{select, Either}; + use embassy_futures::select::{Either, select}; use embassy_sync::channel::Sender; use embassy_time::{Duration, Instant, Timer}; diff --git a/ector/src/lib.rs b/ector/src/lib.rs index eb1dcfa..3fae2c8 100644 --- a/ector/src/lib.rs +++ b/ector/src/lib.rs @@ -84,9 +84,7 @@ macro_rules! actor { ) }}; - ($spawner:ident, $name:ident, $ty:ty, $instance:expr, $mutex:ty) => {{ - ::ector::actor!($spawner, $name, $ty, $instance, $mutex, 1) - }}; + ($spawner:ident, $name:ident, $ty:ty, $instance:expr, $mutex:ty) => {{ ::ector::actor!($spawner, $name, $ty, $instance, $mutex, 1) }}; ($spawner:ident, $name:ident, $ty:ty, $instance:expr, $queue_size:expr) => {{ ::ector::actor!( @@ -129,9 +127,7 @@ macro_rules! spawn_context { ) }}; - ($context:ident, $spawner:ident, $name:ident, $ty:ty, $instance:expr, $mutex:ty) => {{ - ::ector::spawn_context!($context, $spawner, $name, $ty, $instance, $mutex, 1) - }}; + ($context:ident, $spawner:ident, $name:ident, $ty:ty, $instance:expr, $mutex:ty) => {{ ::ector::spawn_context!($context, $spawner, $name, $ty, $instance, $mutex, 1) }}; ($context:ident, $spawner:ident, $name:ident, $ty:ty, $instance:expr, $queue_size:expr) => {{ ::ector::spawn_context!( diff --git a/ector/src/testutils.rs b/ector/src/testutils.rs index 4927f4b..cb6269e 100644 --- a/ector/src/testutils.rs +++ b/ector/src/testutils.rs @@ -1,7 +1,7 @@ use { crate::{Actor, DynamicAddress, Inbox}, core::{cell::RefCell, future::Future, pin::Pin}, - embassy_executor::{raw, Spawner}, + embassy_executor::{Spawner, raw}, embassy_sync::{blocking_mutex::raw::CriticalSectionRawMutex, signal::Signal}, portable_atomic::{AtomicBool, Ordering}, static_cell::StaticCell, diff --git a/macros/Cargo.toml b/macros/Cargo.toml index df3b7ed..9bb96fc 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "ector-macros" version = "0.5.1" description = "Ector is an open source async, no-alloc actor framework for embedded devices." diff --git a/macros/src/actor.rs b/macros/src/actor.rs index 3bc932f..e5e4531 100644 --- a/macros/src/actor.rs +++ b/macros/src/actor.rs @@ -1,14 +1,14 @@ use { proc_macro2::{Span, TokenStream}, - quote::{quote, quote_spanned, ToTokens}, + quote::{ToTokens, quote, quote_spanned}, syn::{ + Attribute, Block, FnArg, GenericArgument, GenericParam, ImplItem, ImplItemType, ItemImpl, + Lifetime, Pat, Receiver, Signature, Token, Type, TypeReference, WhereClause, parse::{Error, Parse, ParseStream, Result}, parse_quote, parse_quote_spanned, punctuated::Punctuated, spanned::Spanned, visit_mut::{self, VisitMut}, - Attribute, Block, FnArg, GenericArgument, GenericParam, ImplItem, ImplItemType, ItemImpl, - Lifetime, Pat, Receiver, Signature, Token, Type, TypeReference, WhereClause, }, }; @@ -96,11 +96,11 @@ impl VisitMut for CollectLifetimes { visit_mut::visit_type_reference_mut(self, ty); } - fn visit_generic_argument_mut(&mut self, gen: &mut GenericArgument) { - if let GenericArgument::Lifetime(lifetime) = gen { + fn visit_generic_argument_mut(&mut self, gen_args: &mut GenericArgument) { + if let GenericArgument::Lifetime(lifetime) = gen_args { self.visit_lifetime(lifetime); } - visit_mut::visit_generic_argument_mut(self, gen); + visit_mut::visit_generic_argument_mut(self, gen_args); } } diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 925412f..1773626 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -5,7 +5,7 @@ extern crate proc_macro; mod actor; use { - actor::{generate_actor, Item}, + actor::{Item, generate_actor}, proc_macro::TokenStream, quote::quote, syn::{ diff --git a/rustfmt.toml b/rustfmt.toml index 97708e6..6f043d0 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,2 +1,2 @@ -edition = "2021" +edition = "2024" imports_granularity = "One" From 037c89144a358786348eccaf1a2d28a7d9ea7cb0 Mon Sep 17 00:00:00 2001 From: xgroleau Date: Fri, 5 Dec 2025 11:36:24 +0100 Subject: [PATCH 3/3] nit: reduce version requirements --- ector/Cargo.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ector/Cargo.toml b/ector/Cargo.toml index 366ac3f..c6fa498 100644 --- a/ector/Cargo.toml +++ b/ector/Cargo.toml @@ -17,14 +17,15 @@ doctest = false [dependencies] embassy-executor = { version = "0.9", default-features = false } embassy-sync = { version = "0.7", default-features = false } -portable-atomic = { version = "1.11", default-features = false } +portable-atomic = { version = "1", default-features = false } log = { version = "0.4", optional = true } -defmt = { version = "1.0.1", optional = true } +defmt = { version = "1", optional = true } -ector-macros = { version = "0.5.1", path = "../macros" } futures = { version = "0.3", default-features = false } -static_cell = "2.1" +static_cell = "2" + +ector-macros = { version = "0.5.1", path = "../macros" } [dev-dependencies]