Follow-up to #39 / design doc 041. Deliberately excluded from the Phase 6 foundation PR to keep that change low-risk; tracked here on the roadmap.
Context
The Phase 6 foundation PR landed: generic SessionClientConnector/SessionServerConnector, the aimdb-uds-connector crate (UDS triple + socket-setup relocated out of core), with_remote_access(config) removed in favor of .with_connector(UdsServer::from_config(cfg)), and AimxCodec made no_std + alloc (the embedded client path — a sensor dialing a gateway).
What's not done: the AimX server dispatch (AimxDispatch/AimxSession) is still #[cfg(feature = "std")]. That unblocks the "board serves host over serial" scenario (an MCU answering record.list/drain/subscribe/write).
Why it was split out
Tracing the dependency to the bottom, making the dispatch no_std is a cross-cutting refactor of core's central record API, not a mechanical re-gate:
Verification target
cargo check -p aimdb-core --no-default-features \
--features "alloc,connector-session,json-serialize" \
--target thumbv7em-none-eabihf
must build the AimX dispatch (not just the codec, which already cross-compiles). Add the line to the Makefile test-embedded target.
Out of scope (separate follow-ups, also from doc 041)
aimdb-serial-connector (COBS framing, tokio + Embassy halves)
aimdb-tcp-connector (tokio + embassy-net)
- host client
AimxConnection::connect_over / connect_url
- cli/mcp
--connect <url> / AIMDB_CONNECT resolver
Each builds on the foundation already merged.
Follow-up to #39 / design doc 041. Deliberately excluded from the Phase 6 foundation PR to keep that change low-risk; tracked here on the roadmap.
Context
The Phase 6 foundation PR landed: generic
SessionClientConnector/SessionServerConnector, theaimdb-uds-connectorcrate (UDS triple + socket-setup relocated out of core),with_remote_access(config)removed in favor of.with_connector(UdsServer::from_config(cfg)), andAimxCodecmadeno_std + alloc(the embedded client path — a sensor dialing a gateway).What's not done: the AimX server dispatch (
AimxDispatch/AimxSession) is still#[cfg(feature = "std")]. That unblocks the "board serves host over serial" scenario (an MCU answeringrecord.list/drain/subscribe/write).Why it was split out
Tracing the dependency to the bottom, making the dispatch
no_stdis a cross-cutting refactor of core's central record API, not a mechanical re-gate:AnyRecordtrait methodscollect_metadata/latest_json/subscribe_json/set_from_json(all#[cfg(std)]today) off the std gate — a trait every record type implements.RecordMetadataTracker:std::sync::Mutex→spin::Mutex, std atomics →core/portable-atomic,SystemTime::now()→ cfg'd (zeroed timestamps on an MCU — no wall clock).remotemodule:AimxConfig.socket_pathPathBuf→String,SecurityPolicyHashSet→hashbrown, gate thethiserror/std::io::Errorbits (RemoteError). Re-gate fromstdtojson-serialize.AimDb/AimDbInnerJSON API (list_records/try_latest_as_json/set_record_from_json) off std.AimxDispatch/AimxSessiontoconnector-session+json-serialize; swapstd::collections→hashbrown,std::sync::Arc→alloc::sync::Arc.Verification target
must build the AimX dispatch (not just the codec, which already cross-compiles). Add the line to the Makefile
test-embeddedtarget.Out of scope (separate follow-ups, also from doc 041)
aimdb-serial-connector(COBS framing, tokio + Embassy halves)aimdb-tcp-connector(tokio +embassy-net)AimxConnection::connect_over/connect_url--connect <url>/AIMDB_CONNECTresolverEach builds on the foundation already merged.