Skip to content
Open
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
14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@ _alloc = []
# bringing `Arc<Mutex<E2ERegistry>>` / `Arc<RwLock<SubscriptionManager>>` /
# / `TokioTransport` / `TokioTimer` defaults into scope, and forces
# `std`.
server = ["dep:futures-util", "_alloc"]
#
# `server` itself is alloc-free: the no-alloc path is
# `Server::new_with_handles` + `run_with_buffers` with static handles and
# a `&'static AtomicBool` run latch. The allocator-backed conveniences
# (`new_with_deps`/`new_passive_with_deps`, `run`/`run_inner`'s 64 KiB
# buffers, the `Arc` `StartedLatch`) are gated behind `_alloc`, which
# `std` / `server-tokio` / `embassy_channels` still pull in.
server = ["dep:futures-util"]
server-tokio = ["server", "std", "dep:tokio", "dep:socket2"]
# Marks a build as intended for bare-metal / no_std consumption.
# Activates embassy-sync as the channel backend, the `static_channels`
Expand Down Expand Up @@ -169,6 +176,11 @@ harness = false
name = "bare_metal_server"
required-features = ["server", "bare_metal"]

[[test]]
name = "no_alloc_server_witness"
required-features = ["server", "bare_metal"]
harness = false

[[test]]
name = "bare_metal_e2e"
required-features = ["client", "server", "bare_metal"]
1 change: 1 addition & 0 deletions examples/bare_metal_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ async fn main() {
timer: MockTimer,
e2e_registry: e2e,
subscriptions: subs,
non_sd_observer: None,
},
config,
false, // multicast_loopback
Expand Down
1 change: 1 addition & 0 deletions examples/embassy_net_client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ async fn main() {
timer: LocalTimer,
e2e_registry: server_e2e,
subscriptions: InMemorySubscriptions::default(),
non_sd_observer: None,
};

// Default `H = Arc<F::Socket>`. Annotation is explicit
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ pub use client::{
// `ClientChannelTypes` elaboration limit at the wrong call site.
pub use e2e::{E2ECheckStatus, E2EKey, E2EProfile};
#[cfg(feature = "server")]
pub use server::{Server, ServerDeps, ServerHandles, ServerStorage, SubscriptionHandle};
pub use server::{
NonSdRequestCallback, Server, ServerDeps, ServerHandles, ServerStorage, SubscriptionHandle,
};
#[cfg(any(feature = "client-tokio", feature = "server-tokio"))]
pub use tokio_transport::{TokioChannels, TokioSocket, TokioSpawner, TokioTimer, TokioTransport};
#[cfg(feature = "bare_metal")]
Expand Down
Loading