Skip to content

datagram@2: the default framing - #26

Merged
Kinflou merged 1 commit into
mainfrom
feat/datagram2
Oct 24, 2026
Merged

Kinflou merged 1 commit into
mainfrom
feat/datagram2

Conversation

@Kinflou

@Kinflou Kinflou commented Oct 24, 2026

Copy link
Copy Markdown
Member

Closes #25. Part of Stage 5 of the package wire defaults (proposal).

  • WireFraming::Datagram2(number) frames through the runtime's Datagram2Framing: [kind][protocol varint][call_id][request_id][params], with replies tagged the same way. The number is the protocol's position among every protocol in the project, which is how the generators number it.
  • Framing / FramingChoice gain "datagram@2". Auto follows the protocol's resolved framing. Once the playground passes core's injected framing through, that's datagram@2 unless the protocol says otherwise.
  • The compare matrix adds datagram@2/json and datagram@2/msgpack, so it has 5 combos now. The playground's compare view lists whatever comes back.
  • Fixtures: the chat fixture is on datagram@2, the default.
  • Pins runtime 4d6e1c5 (from 87446e3). Builds for wasm32.

Not here: a packed@1 codec. The simulator encodes untyped JSON values, and packed@1 has no tags or widths on the wire, so it needs an encoder driven by the schema's types. That's a follow-up.

- `WireFraming::Datagram2(number)` frames through the runtime's
  `Datagram2Framing`; the number is the protocol's position among every
  protocol in the project, as the generators give it.
- The shape and the connection choice spell it `datagram@2`; `Auto`
  follows a protocol's resolved framing, which is now `datagram@2`
  unless it says otherwise.
- The compare matrix runs datagram@2 with JSON and MessagePack too.
- The chat fixture is on datagram@2, the default.
- Pins runtime 4d6e1c5.
@Kinflou
Kinflou merged commit 580af50 into main Oct 24, 2026
1 check passed
@Kinflou
Kinflou deleted the feat/datagram2 branch October 24, 2026 22:39
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.

Simulate datagram@2 and packed@1

1 participant