Skip to content

packed@1, laid out by the schema's types - #27

Merged
Kinflou merged 3 commits into
mainfrom
feat/packed-format
Oct 25, 2026
Merged

Kinflou merged 3 commits into
mainfrom
feat/packed-format

Conversation

@Kinflou

@Kinflou Kinflou commented Oct 25, 2026 •

Copy link
Copy Markdown
Member
  • Codec::Packed (packed@1), the default for new connections. A saved link with no wireFormat still opens as JSON.
  • The simulator's values are untyped JSON, and packed@1 carries no tags, so the new packed module drives the runtime's own Packed serializer and deserializer from the schema's types. A test checks the bytes match a #[derive(Serialize)] Rust mirror, and the documented Player example encodes to 19 bytes.
  • TypeDef::Alias: aliases resolve to their target.
  • The engine encodes call arguments, return values and error bodies by type. The frame inspector decodes them by type, and the compare matrix has 7 combos. JSON-RPC still needs JSON.
  • A behaviour's reply that isn't the declared type (for example Echo returning the args) now faults with a note instead of leaving the call to hang.

Pin: comline-runtime is at runtime#28's merge (6a208d7).

Kinflou added 3 commits October 25, 2026 09:20
The simulator's values are untyped JSON and packed@1 puts no tags on the
wire, so the schema's types drive the runtime's own Packed serializer and
deserializer (via Packed::decode_seed): the bytes are the ones a generated
peer writes.

- packed@1 is the default codec for a new connection; a saved link with no
  wireFormat still opens as JSON.
- TypeDef::Alias, so an alias resolves to its target.
- The engine, the frame inspector and the compare matrix (now 7 combos) all
  lay bodies out by the called function's arguments / return type or the
  raised error's fields.
- A reply that doesn't fit the declared type faults instead of hanging.
The playground sends a call's arguments named, and behaviours and scripts
read them by name (params.text). packed@1 now takes them named or in
order, and decodes them named, so every format shows the same shape.
@Kinflou
Kinflou merged commit 4e8e5e3 into main Oct 25, 2026
1 check passed
@Kinflou
Kinflou deleted the feat/packed-format branch October 25, 2026 02:09
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