Skip to content

v0.4.0

Choose a tag to compare

@dannote dannote released this 23 Oct 11:31
· 28 commits to master since this release
167925c
  • Add the :unknown_fields Rustler generator option. :runtime_schema makes
    generated message decoders skip fields the compiled schema does not define,
    using a KiwiRuntimeSchema read from the schema that accompanies the data, so
    data written with a newer, compatible schema decodes instead of failing with
    BadArg. The default, :error, keeps rejecting such fields.
  • Route every generated message decoder's unknown fields through one
    kiwi_unknown_field helper, and pass full message decoders their definition
    name.
  • Accept a :schema option in KiwiCodec.decode/3 to skip message fields the
    generated modules do not define, using the schema the data was written with.
  • Add KiwiCodec.SchemaInterpreter.skip_message_field/4.
  • Add the :records Rustler generator feature. It decodes Kiwi data into
    native records Rust code can read, change, and share without building Elixir
    terms, then encodes them as the sparse maps generated decoders return,
    optionally only some fields. Generated constants name each definition, field,
    and enum value; records have typed getters and helpers that update nested
    records and scalar, string, enum, and float-array fields. See
    KiwiCodec.RustlerGenerator.Records.
  • Sparse decoders intern their module and field-name atoms once instead of for
    every map they build, which took two thirds of the time decoding large files.
  • Require RustQ 1.0.0-rc.13 for code generation.
  • Rename the Rustler generator's skip, sparse, and full decoder helpers by
    family: RustlerGenerator.SkipHelpers, SkipValueHelpers, and
    SkipDescriptor are RustlerGenerator.Skip.Helpers, Skip.ValueHelpers,
    and Skip.Descriptor; SparseHelpers is Sparse.Helpers; and
    FullDecoderHelpers is Full.Helpers.