Skip to content

feat: MessagePack WireFormat + Envelope round-trip tests (rollout step 7b) - #2

Merged
Kinflou merged 1 commit into
mainfrom
feat/runtime-msgpack-wireformat
Sep 1, 2026
Merged

feat: MessagePack WireFormat + Envelope round-trip tests (rollout step 7b)#2
Kinflou merged 1 commit into
mainfrom
feat/runtime-msgpack-wireformat

Conversation

@Kinflou

@Kinflou Kinflou commented Sep 1, 2026

Copy link
Copy Markdown
Member

Follows #1.

  • format::MsgPack — a WireFormat over rmp-serde.
    • encode serialises straight into the caller's BufMut via a std::io::Write adapter — no intermediate Vec.
    • decode borrows from the input — a #[serde(borrow)] &'de str field decodes as a view into the receive buffer (test proves it).
    • std-gated: rmp-serde 1.3 needs std::io. A no_std MessagePack path (on the no_std rmp crate) comes later.
  • 7 unit tests: msgpack owned + borrowed round-trip, garbage → RuntimeError::Serialization, encode-doesn't-realloc; Envelope Ok/Err round-trip and malformed-frame rejection (empty / unknown tag / truncated id).
  • serde derive added to [dev-dependencies] for the test structs.

Verified

comline-runtime builds in all three feature configs (default / --no-default-features / --features alloc); the trimmed workspace cargo test is green (7 passed, 1 ignored — the stubbed setup/ integration test).

Next (7c)

Wire Dispatch into a call system: a generated-dispatcher shape end to end (params → handler → Envelope → transport), then rework the stubbed setup/.

format::MsgPack — a WireFormat over rmp-serde. encode serialises straight
into the caller's BufMut via a std::io::Write adapter (no intermediate Vec);
decode borrows from the input (a #[serde(borrow)] &'de str field decodes as a
view into the buffer — test proves it). std-gated: rmp-serde needs std::io; a
no_std msgpack path comes later.

7 unit tests: msgpack owned/borrowed round-trip, garbage → Serialization,
no-realloc encode; Envelope ok/err round-trip and malformed-frame rejection.

All three feature configs build; the trimmed workspace is green.
@Kinflou
Kinflou merged commit 0ccf718 into main Sep 1, 2026
6 checks passed
@Kinflou
Kinflou deleted the feat/runtime-msgpack-wireformat branch September 2, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant