API Reference flatbuf v#0.1.0

Copy Markdown View Source

Modules

flatbuf — pure-Elixir FlatBuffers with compile-time, file-emitting code generation.

Entry point for code generation.

Emits an Elixir module for a FlatBuffers enum declaration.

Centralized fully-qualified-name → Elixir-module-name mapping.

Emits an Elixir module for a FlatBuffers struct declaration.

Emits an Elixir module for a FlatBuffers table declaration.

Emits an Elixir module for a FlatBuffers union declaration.

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

Shared helpers for the flatbuf.gen, flatbuf.gen.check, and compile.flatbuf Mix tasks.

Resolved FlatBuffers schema IR.

A FlatBuffers enum declaration.

A single field in a table or struct.

Lexer for FlatBuffers schema (.fbs) source.

Recursive-descent parser for FlatBuffers .fbs source.

CST → %Flatbuf.Schema{} normalization.

A FlatBuffers struct declaration.

A FlatBuffers table declaration.

A FlatBuffers union declaration.

Opt-in behaviour that generated FlatBuffers table modules implement when the project enables the :behaviour nicety.

Mix Tasks

Mix compiler that regenerates Elixir source from .fbs schemas before the Elixir compiler runs. Wire it into your project by adding :flatbuf to the :compilers list in mix.exs and configuring schema paths in application config

Generate Elixir modules from one or more FlatBuffers .fbs files.

Re-run the flatbuf.gen pipeline and compare its output to the files currently on disk. Exits 0 if every emitted artifact already matches the committed source, non-zero otherwise. Nothing is written.