Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
452eb2f
feat(session): implement Phase 2 connector-session contracts and serv…
lxsaah May 29, 2026
9204692
port aimdb_client to the shared session engine
lxsaah May 29, 2026
f108bc5
feat(session): split Dispatch into shared Dispatch + per-connection S…
lxsaah May 29, 2026
4d8d07e
feat(session): port AimX server onto serve/run_session (UdsListener +…
lxsaah May 29, 2026
654cf23
feat(session): subscribe-ack + pump_client record mirroring (AimxClie…
lxsaah May 29, 2026
40ba95c
format
lxsaah May 29, 2026
cf969b5
feat(client): grow AimxConnection to the full tool surface
lxsaah May 29, 2026
13d9063
Refactor AimxClient to AimxConnection across aimdb-cli and aimdb-mcp
lxsaah May 30, 2026
370bd37
Refactor WebSocket connector and session management
lxsaah May 30, 2026
85b23de
refactor: clean up code formatting and improve readability in WebSock…
lxsaah May 30, 2026
6f0ec89
feat: enable remote access for embedded no_std environments with toki…
lxsaah May 30, 2026
0e6c185
feat: enhance WebSocket connector build and test processes for server…
lxsaah May 30, 2026
d85e2a8
refactor: update clippy command to include 'client' feature and clean…
lxsaah May 30, 2026
2b8c1f4
Refactor session engine to be runtime-neutral and integrate TimeOps
lxsaah May 31, 2026
3cc6d27
feat: implement connection timeout handling and cleanup on engine exit
lxsaah May 31, 2026
332272f
Refactor AimX transport and codec for UDS integration
lxsaah May 31, 2026
a050be2
feat: Enhance MQTT connector with query-based configuration and refactor
lxsaah May 31, 2026
98420e7
feat: Enhance subscription management to free cap slots on natural st…
lxsaah May 31, 2026
f07f16b
feat: Enable remote access for embedded no_std environments with UDS …
lxsaah May 31, 2026
7e39a31
Refactor documentation and improve clarity across various modules
lxsaah May 31, 2026
8c928b6
feat: Update documentation and code comments for clarity and consiste…
lxsaah Jun 1, 2026
2dd106d
feat: Update UDS connector to use "uds" scheme for remote access and …
lxsaah Jun 1, 2026
3f5e389
feat: Enable UDS connector for remote access and update related docum…
lxsaah Jun 1, 2026
c56ca20
feat: Enhance WebSocket connector with improved routing and snapshot …
lxsaah Jun 2, 2026
f840451
feat: Implement robust error handling in client and pump for improved…
lxsaah Jun 2, 2026
7eff202
feat: implement WebSocket server with client management and broadcasting
lxsaah Jun 2, 2026
b1ae505
feat: add runnable WebSocket client and server examples for demonstra…
lxsaah Jun 2, 2026
03e5624
feat: improve documentation for latest value retrieval in records and…
lxsaah Jun 2, 2026
63facee
feat: enhance record retrieval logic for ring buffers and improve Web…
lxsaah Jun 2, 2026
9e394b7
feat: update record retrieval logic for SpmcRing and enhance document…
lxsaah Jun 2, 2026
a105a90
feat: enable remote access for embedded no-std environments with Send…
lxsaah Jun 3, 2026
769bd71
feat: update connector-session documentation and improve SendFutureWr…
lxsaah Jun 3, 2026
7573c11
feat: update changelogs for remote access enhancements and shared Sen…
lxsaah Jun 3, 2026
89a745c
feat: update connection handling in record tools for improved perform…
lxsaah Jun 3, 2026
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
> - [aimdb-mqtt-connector/CHANGELOG.md](aimdb-mqtt-connector/CHANGELOG.md)
> - [aimdb-knx-connector/CHANGELOG.md](aimdb-knx-connector/CHANGELOG.md)
> - [aimdb-websocket-connector/CHANGELOG.md](aimdb-websocket-connector/CHANGELOG.md)
> - [aimdb-uds-connector/CHANGELOG.md](aimdb-uds-connector/CHANGELOG.md)
> - [aimdb-ws-protocol/CHANGELOG.md](aimdb-ws-protocol/CHANGELOG.md)
> - [aimdb-wasm-adapter/CHANGELOG.md](aimdb-wasm-adapter/CHANGELOG.md)
> - [aimdb-sync/CHANGELOG.md](aimdb-sync/CHANGELOG.md)
Expand All @@ -29,11 +30,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Remote access via connectors — Phases 0–6: converge four hand-rolled networking stacks onto two shared engines (Issue #39, [design doc](docs/design/remote-access-via-connectors.md)).** AimX remote access (and any future transport) now rides the connector layer instead of a bespoke I/O abstraction. New, runtime-neutral `aimdb-core::session` module (feature `connector-session`, `no_std + alloc`): the three-layer substrate (`Connection`/`Listener`/`Dialer` + `EnvelopeCodec` + `Dispatch`/`Session`), the reactive **server** engine (`serve`/`run_session`) and proactive **client** engine (`run_client`/`pump_client`), the `pump_sink`/`pump_source` data-plane toolkit, and the transport-agnostic `SessionClientConnector`/`SessionServerConnector`. The AimX-v2 NDJSON protocol (`session::aimx`: `AimxCodec` + `AimxDispatch`) and the WebSocket connector are ports onto this substrate, so the AimX server/client and WS server/client stacks collapse onto the two engines. New **`aimdb-uds-connector`** crate carries the UDS transport (`UdsClient`/`UdsServer`). ([aimdb-core](aimdb-core/CHANGELOG.md), [aimdb-uds-connector](aimdb-uds-connector/CHANGELOG.md), [aimdb-websocket-connector](aimdb-websocket-connector/CHANGELOG.md), [aimdb-client](aimdb-client/CHANGELOG.md), [aimdb-mqtt-connector](aimdb-mqtt-connector/CHANGELOG.md), [aimdb-knx-connector](aimdb-knx-connector/CHANGELOG.md), [aimdb-embassy-adapter](aimdb-embassy-adapter/CHANGELOG.md))
- **M16 — JSON codec extracted behind the `json-serialize` feature; `RecordValue::as_json()` now works on `no_std + alloc`, not just `std` ([Design 032](docs/design/032-M16-aimx-json-codec.md)).** New `aimdb-core::codec` module: `RemoteSerialize` (blanket-impl'd for every `serde` `Serialize + DeserializeOwned` type), the object-safe `JsonCodec<T>`, and the zero-sized `SerdeJsonCodec`. `serde_json` runs on `alloc`, so embedded targets can opt in; `std` enables the feature transitively, so std builds are unaffected. ([aimdb-core](aimdb-core/CHANGELOG.md))
- **Embassy buffer + join-queue tests now run in CI (Issue #85).** The join-queue tests previously sat behind `embassy-runtime`, which pulls `embassy-executor`'s cortex-m assembly and can't compile under `cargo test` on x86_64 — so ordering / backpressure / clone-routing regressions were never caught. The `join_queue` module is now gated on `embassy-sync`, and `make test` runs the embassy adapter's unit tests + doctests on the host (no executor). Also adds `EmbassyBuffer::peek()` and fixes a stale `EmbassyBuffer` doc example. ([aimdb-embassy-adapter](aimdb-embassy-adapter/CHANGELOG.md))

### Changed (breaking)

- **`AimDbBuilder::with_remote_access(config)` removed — remote-access servers are now registered like any other connector (Issue #39).** Replace `.with_remote_access(config)` with `.with_connector(aimdb_uds_connector::UdsServer::from_config(config))`. The AimX wire was reshaped to **v2** (NDJSON tagged frames mapping onto the engine's role-neutral message set) and is **not** backward-compatible with the legacy AimX v1 framing; the bundled `aimdb-client` / CLI / MCP speak v2. The UDS transport types moved out of `aimdb-core` into `aimdb-uds-connector`. ([aimdb-core](aimdb-core/CHANGELOG.md), [aimdb-uds-connector](aimdb-uds-connector/CHANGELOG.md), [aimdb-client](aimdb-client/CHANGELOG.md))
- **M15 — `latest_snapshot` removed; point-in-time reads go through the new buffer-native `DynBuffer::peek()` ([Design 031](docs/design/031-M15-remove-latest-snapshot.md)).** `TypedRecord::latest()` and AimX `record.get` read the buffer directly instead of a per-record snapshot mutex (one lock + clone off the `produce()` hot path). Consequences: a `.with_remote_access()` record with **no buffer** now fails `build()` (was a silent runtime no-op); `record.get` / `latest()` on an `SpmcRing` record returns `not_found` / `None` (rings have no canonical latest — use `record.drain` / `record.subscribe`); `SingleLatest` and `Mailbox` are unaffected. `TypedRecord::produce` is removed — all writes go through `WriteHandle::push`. Adapters implement `peek()` per buffer type. ([aimdb-core](aimdb-core/CHANGELOG.md), [aimdb-tokio-adapter](aimdb-tokio-adapter/CHANGELOG.md), [aimdb-embassy-adapter](aimdb-embassy-adapter/CHANGELOG.md), [aimdb-wasm-adapter](aimdb-wasm-adapter/CHANGELOG.md))
- **M16 — `with_remote_access()` now requires the `json-serialize` feature (transitively enabled by `std`); `with_read_only_serialization()` removed ([Design 032](docs/design/032-M16-aimx-json-codec.md)).** The stored serializer/deserializer closures are replaced by a type-erased `Arc<dyn JsonCodec<T>>`. A `Serialize`-only record can no longer be exposed read-only over remote access. ([aimdb-core](aimdb-core/CHANGELOG.md))

Expand Down
64 changes: 63 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ members = [
"aimdb-mqtt-connector",
"aimdb-knx-connector",
"aimdb-websocket-connector",
"aimdb-uds-connector",
"aimdb-ws-protocol",
"aimdb-wasm-adapter",
"tools/aimdb-cli",
Expand Down
75 changes: 57 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# AimDB Makefile
# Simple automation for common development tasks

.PHONY: help build test clean fmt fmt-check clippy doc all check test-embedded test-wasm wasm wasm-test examples deny audit security publish publish-check
.PHONY: help build test clean clean-embedded fmt fmt-check clippy doc all check test-embedded test-wasm wasm wasm-test examples deny audit security publish publish-check
.DEFAULT_GOAL := help

# Separate target dir for embedded checks so an interrupted example build
# (cargo build --target thumbv7em-none-eabihf) cannot leave corrupted .rmeta
# files that break the next cargo check run (E0786). Clean it with
# `make clean-embedded`.
EMBEDDED_CHECK_TARGET_DIR := target/embedded-check

# Disable incremental compilation to avoid "Stale file handle" linker errors
# on Docker overlay filesystems when many cargo invocations run in sequence
# with different feature sets (as the test/check targets do).
export CARGO_INCREMENTAL := 0

# Colors for output
GREEN := \033[0;32m
YELLOW := \033[0;33m
Expand Down Expand Up @@ -63,6 +74,10 @@ build:
cargo build --package aimdb-core --features "std,tracing,profiling"
@printf "$(YELLOW) → Building aimdb-core (no_std + alloc + metrics)$(NC)\n"
cargo build --package aimdb-core --no-default-features --features "alloc,metrics"
@printf "$(YELLOW) → Building aimdb-core (no_std + alloc + connector-session contracts)$(NC)\n"
cargo build --package aimdb-core --no-default-features --features "alloc,connector-session"
@printf "$(YELLOW) → Building aimdb-core (std + connector-session engines)$(NC)\n"
cargo build --package aimdb-core --features "std,connector-session"
@printf "$(YELLOW) → Building tokio adapter$(NC)\n"
cargo build --package aimdb-tokio-adapter --features "tokio-runtime,tracing,metrics"
@printf "$(YELLOW) → Building tokio adapter (with profiling)$(NC)\n"
Expand All @@ -83,8 +98,10 @@ build:
cargo build --package aimdb-knx-connector --features "std,tokio-runtime"
@printf "$(YELLOW) → Building WS protocol$(NC)\n"
cargo build --package aimdb-ws-protocol
@printf "$(YELLOW) → Building WebSocket connector$(NC)\n"
cargo build --package aimdb-websocket-connector --features "tokio-runtime"
@printf "$(YELLOW) → Building WebSocket connector (server + client)$(NC)\n"
cargo build --package aimdb-websocket-connector --features "server,client"
@printf "$(YELLOW) → Building UDS connector$(NC)\n"
cargo build --package aimdb-uds-connector
@printf "$(YELLOW) → Building WASM adapter$(NC)\n"
cargo build --package aimdb-wasm-adapter --target wasm32-unknown-unknown --features "wasm-runtime"

Expand All @@ -108,6 +125,12 @@ test:
cargo test --package aimdb-core --no-default-features --features "alloc,json-serialize"
@printf "$(YELLOW) → Testing aimdb-core remote module$(NC)\n"
cargo test --package aimdb-core --lib --features "std" remote::
@printf "$(YELLOW) → Testing aimdb-core connector-session (contracts object-safety)$(NC)\n"
cargo test --package aimdb-core --lib --features "std,connector-session" session::
@printf "$(YELLOW) → Testing aimdb-core connector-session engines (session_engine)$(NC)\n"
cargo test --package aimdb-core --features "std,connector-session" --test session_engine
@printf "$(YELLOW) → Testing aimdb-client (engine-based AimX client + UDS round-trip)$(NC)\n"
cargo test --package aimdb-client
@printf "$(YELLOW) → Testing tokio adapter$(NC)\n"
cargo test --package aimdb-tokio-adapter --features "tokio-runtime,tracing"
@printf "$(YELLOW) → Testing tokio adapter (with metrics)$(NC)\n"
Expand All @@ -134,8 +157,12 @@ test:
cargo test --package aimdb-knx-connector --features "std,tokio-runtime"
@printf "$(YELLOW) → Testing WS protocol$(NC)\n"
cargo test --package aimdb-ws-protocol
@printf "$(YELLOW) → Testing WebSocket connector$(NC)\n"
cargo test --package aimdb-websocket-connector --features "tokio-runtime"
@printf "$(YELLOW) → Testing WebSocket connector (server + client: unit, real-socket e2e, AimDB round-trip)$(NC)\n"
cargo test --package aimdb-websocket-connector --features "server,client"
@printf "$(YELLOW) → Testing WebSocket connector client-only build$(NC)\n"
cargo test --package aimdb-websocket-connector --no-default-features --features "client" --lib
@printf "$(YELLOW) → Testing UDS connector$(NC)\n"
cargo test --package aimdb-uds-connector

fmt:
@printf "$(GREEN)Formatting code (workspace members only)...$(NC)\n"
Expand Down Expand Up @@ -206,7 +233,9 @@ clippy:
@printf "$(YELLOW) → Clippy on WS protocol$(NC)\n"
cargo clippy --package aimdb-ws-protocol --all-targets -- -D warnings
@printf "$(YELLOW) → Clippy on WebSocket connector$(NC)\n"
cargo clippy --package aimdb-websocket-connector --features "tokio-runtime" --all-targets -- -D warnings
cargo clippy --package aimdb-websocket-connector --features "tokio-runtime,client" --all-targets -- -D warnings
@printf "$(YELLOW) → Clippy on UDS connector$(NC)\n"
cargo clippy --package aimdb-uds-connector --all-targets -- -D warnings
@printf "$(YELLOW) → Clippy on WASM adapter$(NC)\n"
cargo clippy --package aimdb-wasm-adapter --target wasm32-unknown-unknown --features "wasm-runtime" -- -D warnings

Expand Down Expand Up @@ -245,6 +274,12 @@ doc:
clean:
@printf "$(GREEN)Cleaning...$(NC)\n"
cargo clean
@rm -rf $(EMBEDDED_CHECK_TARGET_DIR)

clean-embedded:
@printf "$(GREEN)Cleaning embedded check artifacts...$(NC)\n"
@rm -rf $(EMBEDDED_CHECK_TARGET_DIR)
cargo clean --target thumbv7em-none-eabihf

## Testing commands
test-wasm:
Expand All @@ -256,29 +291,33 @@ test-wasm:
test-embedded:
@printf "$(BLUE)Testing embedded/MCU cross-compilation compatibility...$(NC)\n"
@printf "$(YELLOW) → Checking aimdb-data-contracts (no_std + alloc) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-data-contracts --target thumbv7em-none-eabihf --no-default-features --features alloc
cargo check --package aimdb-data-contracts --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features alloc
@printf "$(YELLOW) → Checking aimdb-core (no_std minimal) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-core --target thumbv7em-none-eabihf --no-default-features --features alloc
cargo check --package aimdb-core --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features alloc
@printf "$(YELLOW) → Checking aimdb-core (no_std + alloc + json-serialize) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-core --target thumbv7em-none-eabihf --no-default-features --features "alloc,json-serialize"
cargo check --package aimdb-core --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "alloc,json-serialize"
@printf "$(YELLOW) → Checking aimdb-core session engines (no_std + connector-session) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-core --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "alloc,connector-session"
@printf "$(YELLOW) → Checking aimdb-core AimX codec (no_std + connector-session + json-serialize) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-core --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "alloc,connector-session,json-serialize"
@printf "$(YELLOW) → Checking aimdb-core (no_std/embassy) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-core --target thumbv7em-none-eabihf --no-default-features --features alloc
cargo check --package aimdb-core --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features alloc
@printf "$(YELLOW) → Checking aimdb-embassy-adapter on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-embassy-adapter --target thumbv7em-none-eabihf --no-default-features --features "embassy-runtime"
cargo check --package aimdb-embassy-adapter --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "embassy-runtime"
@printf "$(YELLOW) → Checking aimdb-embassy-adapter with network support on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-embassy-adapter --target thumbv7em-none-eabihf --no-default-features --features "embassy-runtime,embassy-net-support"
cargo check --package aimdb-embassy-adapter --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "embassy-runtime,embassy-net-support"
@printf "$(YELLOW) → Checking aimdb-embassy-adapter with profiling on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-embassy-adapter --target thumbv7em-none-eabihf --no-default-features --features "embassy-runtime,profiling"
cargo check --package aimdb-embassy-adapter --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "embassy-runtime,profiling"
@printf "$(YELLOW) → Checking aimdb-embassy-adapter with metrics on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-embassy-adapter --target thumbv7em-none-eabihf --no-default-features --features "embassy-runtime,metrics"
cargo check --package aimdb-embassy-adapter --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "embassy-runtime,metrics"
@printf "$(YELLOW) → Checking aimdb-mqtt-connector (Embassy) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-mqtt-connector --target thumbv7em-none-eabihf --no-default-features --features "embassy-runtime"
cargo check --package aimdb-mqtt-connector --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "embassy-runtime"
@printf "$(YELLOW) → Checking aimdb-mqtt-connector (Embassy + defmt) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-mqtt-connector --target thumbv7em-none-eabihf --no-default-features --features "embassy-runtime,defmt"
cargo check --package aimdb-mqtt-connector --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "embassy-runtime,defmt"
@printf "$(YELLOW) → Checking aimdb-knx-connector (Embassy) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-knx-connector --target thumbv7em-none-eabihf --no-default-features --features "embassy-runtime"
cargo check --package aimdb-knx-connector --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "embassy-runtime"
@printf "$(YELLOW) → Checking aimdb-knx-connector (Embassy + defmt) on thumbv7em-none-eabihf target$(NC)\n"
cargo check --package aimdb-knx-connector --target thumbv7em-none-eabihf --no-default-features --features "embassy-runtime,defmt"
cargo check --package aimdb-knx-connector --target thumbv7em-none-eabihf --target-dir $(EMBEDDED_CHECK_TARGET_DIR) --no-default-features --features "embassy-runtime,defmt"

## Example projects
examples:
Expand Down
2 changes: 1 addition & 1 deletion _external/embassy
Submodule embassy updated 221 files
Loading