Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions ector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
edition = "2024"
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"
Expand All @@ -15,27 +15,28 @@ 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", 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]
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",
] }
Expand Down
6 changes: 3 additions & 3 deletions ector/build.rs
Original file line number Diff line number Diff line change
@@ -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");
}
}
2 changes: 1 addition & 1 deletion ector/examples/pingpong.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use {
ector::*,
embassy_time::{Duration, Ticker},
futures::{
future::{join, select, Either},
future::{Either, join, select},
pin_mut,
},
};
Expand Down
2 changes: 1 addition & 1 deletion ector/examples/qmh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
8 changes: 2 additions & 6 deletions ector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down Expand Up @@ -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!(
Expand Down
2 changes: 1 addition & 1 deletion ector/src/testutils.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
12 changes: 6 additions & 6 deletions macros/src/actor.rs
Original file line number Diff line number Diff line change
@@ -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,
},
};

Expand Down Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
edition = "2021"
edition = "2024"
imports_granularity = "One"