Expand description
The binary wire for Go and Java: values cross as compact bytes whose encoders and decoders are generated per type on both sides, without JSON text or reflection.
Layout, little endian: I64 and F64 as 8 bytes, Bool as 1 byte. Str, List, Map
and Struct start with a presence byte (0 for null/nil, 1 otherwise); strings then carry a
u32 length and UTF-8 bytes, lists and maps a u32 count and their items (maps as string key,
value). Opt is a presence byte and the value. Tuple (several results) is its items in order.
Enums§
- Ty
- A source-language type the wire carries.
nativeis the type as the source spells it.
Constants§
- WIRE_RS
src/wire.rsof a generated crate: the reader, the writer, and schema-driven conversion ofserde_json::Value(for ports that keep structured values as JSON values).
Functions§
- rust_
read - Rust code reading a value of
tinto the port typerustfrom readerr;Nonewhen the port type does not fit the wire type (the function then keeps the JSON bridge). - rust_
read_ args - Rust statements that read every argument of a port function from
r;Nonewhen one does not fit. - rust_
write - Rust statements writing
expr(a reference to the port typerust) astinto writerw. - schema_
expr - The
wire::Schemaconstant expression for a type, forread_value/write_value.