Flatbuf.Codegen.Wire (flatbuf v0.1.0)

Copy Markdown View Source

Emits the <Root>.Flatbuf.Wire helper module.

The emitted module is the only piece of code the generated readers/writers depend on at runtime. It is itself dependency-free Elixir source. The template here changes only when the wire format changes; the user re-runs mix flatbuf.gen and the file gets refreshed alongside their typed modules.

Summary

Functions

Generate the wire helper module source.

Functions

generate(module_name)

@spec generate(module()) :: {module(), String.t()}

Generate the wire helper module source.

Returns {module_name_atom, source_string}.