Modules
Encodes and decodes Kiwi messages as Elixir structs.
Helpers for Kiwi chunk containers with an 8-byte magic and little-endian chunk lengths.
Compile-time DSL behind use KiwiCodec.
Raised when Kiwi wire data or binary schema data cannot be decoded.
Decodes Kiwi wire binaries into generated Kiwi structs.
Raised when a value cannot be encoded as Kiwi wire data.
Encodes generated Kiwi structs into Kiwi wire iodata.
Writes generated Elixir source files from .kiwi schema text or parsed schemas.
Builds compiled metadata for modules generated with use KiwiCodec.
Emits enum, struct, and message shape code for modules generated with use KiwiCodec.
Builds typespec AST for generated Kiwi modules.
Shared Inspect implementation for generated Kiwi structs.
Compiled metadata attached to generated Kiwi modules.
Compiled metadata for one field in a generated Kiwi module.
Compiles .kiwi schema text or parsed schemas into Elixir modules in memory.
Generates Elixir source modules from parsed Kiwi schemas.
Kiwi primitive type metadata.
Generates Rust that decodes Kiwi data for a schema inside a Rustler NIF.
Interns the atoms generated sparse decoders put in every map: the module name, the
__kiwi_module__ key, and each field name.
The Decoder<'a> generated decoders read Kiwi data with.
Generates NIFs decoding a binary as one definition, which kiwi_decode_binary does with
the definition's full decoder, rejecting trailing bytes.
How a generated decoder reads or skips a schema field: once, repeated for an array, or as
a whole byte array for byte[].
Generates full decoders: a struct or message decodes as its generated Elixir struct, an
enum as its variant's atom; see KiwiCodec.RustlerGenerator.Full.Helpers.
Full decoders: a struct or message decodes as its generated Elixir struct, every field
set. kiwi_struct_decoder! and kiwi_message_decoder! define one; enums use
KiwiCodec.RustlerGenerator.Values' kiwi_enum_decoder!.
The Rust names generated decoders give schema definitions and the functions reading their
values: decode_node_change_from_decoder decodes a NodeChange fully,
decode_sparse_node_change_from_decoder to the fields present, and
skip_node_change_from_decoder skips one.
How generated decoders read and skip Kiwi's primitive values with the Decoder.
Generates native Kiwi records: decoded values Rust code can read, change, and share without building Elixir terms, and encode later as the sparse maps generated decoders return.
Selects schema definitions and their dependencies for Rustler generation.
Generates skip decoders, which read past a value without building a term; see
KiwiCodec.RustlerGenerator.Skip.Helpers.
Skip decoders: they read past a value without building a term, for callers projecting a few fields out of a large message.
kiwi_skip_message_decoder!, which defines a message's skip decoder from one row per
field, sorted by id; see KiwiCodec.RustlerGenerator.Skip.Helpers.
Generates sparse decoders: maps of the fields present, with __kiwi_module__ naming the
generated Elixir module; see KiwiCodec.RustlerGenerator.Sparse.Helpers.
Sparse decoders: a struct or message decodes as a map of the fields present, keyed by their
atoms, with __kiwi_module__ naming its generated Elixir module.
kiwi_sparse_message_decoder!, which defines a message's sparse decoder from one row per
field, sorted by id; see KiwiCodec.RustlerGenerator.Sparse.Helpers.
kiwi_sparse_skip_message_decoder!, which defines both a message's sparse decoder and its
skip decoder from one row per field, sorted by id, when both are generated; see
KiwiCodec.RustlerGenerator.Sparse.Helpers and KiwiCodec.RustlerGenerator.Skip.Helpers.
The shared Rust generated decoders call: each feature's helper module, whole, with the
kiwi_unknown_field the :unknown_fields mode chooses, and for full decoders the Rustler
helpers caching their atoms and building their structs.
KiwiRuntimeSchema, a schema read with the data, and the kiwi_unknown_field that skips a
message field the compiled schema lacks with it; see
KiwiCodec.RustlerGenerator.UnknownFields.
Selects how generated Rustler decoders handle message fields the compiled schema does not define.
What full and sparse decoders share: reading primitive values and enums as terms, and a field's value, once or repeated, with the function decoding its type.
Parsed Kiwi schema.
Encoder and decoder for Kiwi's compact binary schema format.
Encodes and decodes type references in Kiwi's compact binary schema format.
Kiwi enum definition.
Kiwi enum variant.
Kiwi struct or message field.
Kiwi message definition.
Parser for .kiwi schema text.
Kiwi struct definition.
Source token with line and column information for schema parse errors.
Tokenizes .kiwi schema text with source positions.
Validates parsed Kiwi schemas after grammar parsing.
Interpreter for parsed Kiwi schemas without generated modules.
Indexed Kiwi schema for repeated runtime interpretation.
Hook behaviour for custom Kiwi encode/decode normalization.
Kiwi primitive wire encoders and decoders.
Kiwi variable-length 32-bit float wire encoding.
Kiwi integer wire encoding.
Mix Tasks
Generates Elixir modules from a .kiwi schema.