-
Notifications
You must be signed in to change notification settings - Fork 0
phase 13.5: no-tokio Client construction #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/phase13_feature_flag_detangle
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -58,27 +58,41 @@ | |||||
| //! - Phase 12: `TransportSocket` GATs — `SendFuture` / `RecvFuture` | ||||||
| //! express `Send` bounds without RTN; `Socket = TokioSocket` pin | ||||||
| //! removed from `bind_*` functions | ||||||
| //! - Phase 13 (partial): client-side feature-flag split. `client` no | ||||||
| //! longer pulls tokio + socket2; the tokio convenience defaults | ||||||
| //! - Phase 13a: client-side feature-flag split. `client` no longer | ||||||
| //! pulls tokio + socket2; the tokio convenience defaults | ||||||
| //! (`Client::new`, `TokioSpawner`, etc.) live behind a new | ||||||
| //! `client-tokio` feature. | ||||||
| //! - Phase 13.5: `Client` is now constructible without | ||||||
| //! `client-tokio`. `Inner` carries `F: TransportFactory` and | ||||||
| //! `T: Timer` generics, and the new | ||||||
| //! `Client::new_with_factory_spawner_timer_and_loopback` | ||||||
| //! constructor takes everything explicitly. Witness: | ||||||
| //! `tests/bare_metal_client.rs` (gated on `client + bare_metal`). | ||||||
| //! `service_registry` swapped its `HashMap` for `heapless::FnvIndexMap`. | ||||||
| //! `EmbassySyncChannels` extracted from `tokio_transport` to | ||||||
| //! `crate::embassy_channels` so it is reachable from no-tokio builds. | ||||||
| //! | ||||||
| //! **Remaining gaps:** | ||||||
| //! 1. **Server-side feature-flag split** (Phase 13 server half, | ||||||
| //! deferred to Phase 14): `feature = "server"` still pulls in | ||||||
| //! tokio + socket2 because `server::sd_state` and | ||||||
| //! `server::subscription_manager` reference `tokio::net::UdpSocket` | ||||||
| //! / `tokio::sync::RwLock` / `socket2::Socket` directly. Phase 14 | ||||||
| //! (server parallel) is the phase that retargets the server to the | ||||||
| //! trait surface; once that lands, `server` will gain the same | ||||||
| //! 1. **Server-side feature-flag split** (deferred to Phase 14): | ||||||
| //! `feature = "server"` still pulls in tokio + socket2 because | ||||||
| //! `server::sd_state` and `server::subscription_manager` reference | ||||||
| //! `tokio::net::UdpSocket` / `tokio::sync::RwLock` / | ||||||
| //! `socket2::Socket` directly. Phase 14 retargets the server to | ||||||
| //! the trait surface; once that lands, `server` will gain the same | ||||||
| //! `server` + `server-tokio` split. | ||||||
| //! 2. **No-alloc Client**: `Client` / `Inner` still depend on | ||||||
| //! `alloc` (heapless internals are fine, but `EmbassySyncChannels` | ||||||
| //! uses `Arc`, and `e2e_registry` uses `Arc<Mutex<_>>`). Phase 16 | ||||||
| //! is the verification phase that lights up an alloc-panicking | ||||||
| //! harness; the no-alloc port itself is its own follow-on phase. | ||||||
| //! | ||||||
| //! # Recommendation for `no_alloc` consumers today | ||||||
| //! | ||||||
| //! Do NOT route through `Client::new_with_spawner_and_loopback`. | ||||||
| //! Instead, depend on `simple-someip` with `default-features = false, | ||||||
| //! features = ["bare_metal"]` and consume the already-portable layers | ||||||
| //! directly: | ||||||
| //! Do NOT route through `Client::new_with_factory_spawner_timer_and_loopback` | ||||||
|
||||||
| //! Do NOT route through `Client::new_with_factory_spawner_timer_and_loopback` | |
| //! Do NOT route through `Client::new_with_deps` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docstring references a
Client::new_with_factory_spawner_timer_and_loopbackconstructor, but the client’s no-tokio entry point in this PR isClient::new_with_deps(and the other constructors are behindclient-tokio). Update the example documentation to reflect the actual API name.