Skip to content

v0.5.0

Choose a tag to compare

@joaquinbejar joaquinbejar released this 03 Sep 11:57
· 31 commits to main since this release

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 encoders set_<name>(&[u8]) for message-level var data. The length header width (uint8 / uint16 / uint32) comes from the length member 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's encoded_length() reports the bytes actually written.

Breaking changes

  • ironsbe-codegen: Generator::generate() and MessageGenerator::generate() return Result<String, CodegenError>. generate_from_xml / generate_from_file keep their signatures.
  • ironsbe-codegen: new CodegenError::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> returns CodegenError::UnknownType.

Testing

  • New workspace member ironsbe-codegen-tests (not published): build.rs runs 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