Expand description
Language-neutral LE-binary codec plan.
This crate lowers a Wesley L1 IR into a small, target-agnostic description of what the codec does — which values are scalars, enums, nested structs, options, or lists, and in what field order. The Rust and TypeScript emitters consume this one plan and only decide how to spell it in their language, so the structural logic (nullable → option, list → length-prefixed, scalar → primitive, named type → sub-codec) lives in exactly one place and the two backends cannot drift on the wire.
Names in the plan are the source GraphQL names; each backend applies its
own casing (rust_field_name, pascalCase, …).
Structs§
- Field
Plan - One field of a struct, in wire (declaration) order.
Enums§
- Codec
Def - A top-level codec, emitted as an
encode_*/decode_*pair. - CodecOp
- How to read or write a single value. Recurses for options and lists; a
CodecOp::Nameddefers to anotherCodecDef’s codec by source name. - Scalar
Kind - A primitive wire scalar.
- Struct
Kind - Which SDL declaration a struct codec came from. Carried so a backend can label the declaration in its own idiom; it does not affect the wire format.
Functions§
- plan
- Lower a Wesley L1 IR and its operations into the codec plan.