Skip to content

Pick a supported serialization format for host<->macro communication #3872

@davidmorgan

Description

@davidmorgan

The dart_model exploration currently uses JSON but there is no particular reason to think that's a good choice :)

Even if we don't follow the dart_model direction, it seems likely we want to formalize the serialization format so that we can have stable serialization. Some well-supported system that allows specification of a schema is probably needed so we can actually have guarantees of compatibility.

It looks like macros often do only trivial computation and so they are going to spend most of their run time deserializing then serializing. The best way to optimize this is to do less work, to send less data; but even then it might be beneficial to also have the fastest possible serialization and deserialization.

Protocol buffers are an obvious possibility, flat buffers might be more interesting since they are explicitly for cases where deserialization/serialization are an important overhead. If we follow the dart_model direction then capability to quickly compute deltas and apply deltas will also be important.

Sending this straight to the backlog since the precise format doesn't matter too much yet.

@jakemac53 @scheglov FYI :)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions