Repository navigation
v0.6.0
Added
- codegen:
<data>(variable-length) fields inside repeating group entries are now generated instead of rejected (#61, #62). Entry decoders expose<name>()/<name>_as_str()andend_offset(); entry encoders exposeset_<name>(&[u8]). SBE 1.0 lays out an entry as fixed fields, then nested groups, then var data, and the generated codecs follow that order. - codegen: nested repeating groups are reachable from entry codecs:
entry.<group>()on decoders andentry.<group>_count(n)on encoders (#62). Until now the nested types were emitted but nothing reached them. - codegen: group decoders gain
end_offset(), O(1) for fixed-stride groups and a walk over the remaining entries otherwise; group encoders gaincount().
Changed
- codegen: generated encoders thread one write cursor from the message encoder through group and entry encoders.
<Group>Encoder::wrap(buffer, limit: &mut usize, count)replaceswrap(buffer, offset, count), and the group encoder'sencoded_length()reports the bytes written so far instead of4 + BLOCK_LENGTH * count. Entries of groups that carry nested groups or var data take the cursor as a thirdwrapargument; entries of flat groups keep the 0.5 shape. Theironsbe-codegencrate's own Rust API is unchanged (cargo semver-checks --release-type patchpasses all 223 checks against 0.5.0). - codegen: message decoders position later groups and message-level var data after the true end of a variable-stride group by walking each group's
end_offset(). Flat groups keep byte-identical wire output and O(1) positioning. - codegen: private decoder helpers are prefixed
sbe_(sbe_group_offset,sbe_<name>_offset) so schema field names such asgroupOffsetcannot collide with them. - codegen:
messages.rsis split intofields.rs,var_data.rsandgroups.rs; no change in generated output for existing schemas.
Testing
ironsbe-codegen-testscovers the issue #61 schema shape and a nested-group schema with 10 new compiled round-trips, including exact wire bytes and a flat group placed after a variable one.
Known follow-ups
- Unwritten
<data>fields are not guarded by the generated encoders (#63). - Random access after a variable-stride group re-walks it on every call; a sequential cursor-style decoder is tracked in #64.
Full changelog: v0.5.0...v0.6.0