Repository navigation
v0.5.0
Fixed
- codegen: generated codecs silently omitted
<data>(variable-length) fields; the module compiled, looked complete, and could not round-trip its own messages (#59, #60). Decoders now expose<name>()/<name>_as_str()and encodersset_<name>(&[u8])for message-level var data. The length header width (uint8 / uint16 / uint32) comes from thelengthmember of the referenced composite. - codegen: the second and later repeating groups were placed at
block_length + 4 * i, ignoring the entries of the preceding group. Decoders now walk the group headers on the wire and encoders append groups at a write cursor, so multi-group messages round-trip (#60). - codegen:
SbeDecoder::encoded_length()now covers header, fixed block, repeating groups and var data; the encoder'sencoded_length()reports the bytes actually written.
Breaking changes
ironsbe-codegen:Generator::generate()andMessageGenerator::generate()returnResult<String, CodegenError>.generate_from_xml/generate_from_filekeep their signatures.ironsbe-codegen: newCodegenError::Unsupported { feature, context }variant. Codegen now fails, instead of emitting incomplete code, for<data>inside a repeating group (any depth),<data>in a message whose groups have nested groups, and length headers other than uint8 / uint16 / uint32. A<data>type not declared in<types>returnsCodegenError::UnknownType.
Testing
- New workspace member
ironsbe-codegen-tests(not published):build.rsruns the generator on an inline schema and the integration tests compile and round-trip the emitted code, including exact wire layout.
Full changelog: v0.4.2...v0.5.0