You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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 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.