Crate sbe_gen

Crate sbe_gen 

Source
Expand description

§SBE code generator

This crate exposes a small API for generating zero‑copy Rust structures from an SBE XML schema. At a high level the process is:

  1. Parse the XML into an intermediate Schema using [parser::parse_schema].
  2. Transform the schema into Rust code strings with [codegen::generate].
  3. Write the resulting files to disk via generate_to.

Generated structs derive the necessary traits from the zerocopy crate and include a parse_prefix helper so that a message can be viewed at the front of a byte buffer without copying.

Structs§

GeneratorOptions
Options that influence how code is generated.

Enums§

GeneratorError
Errors produced by the generator.

Functions§

generate
Parse an XML schema and emit a collection of Rust source files.
generate_to
Read an XML schema and write the generated modules into a target directory. This convenience function creates the directory if it does not exist and writes one .rs file per message.