CST → %Flatbuf.Schema{} normalization.
- Resolves
include "..."paths recursively (cycle-safe). - Threads
namespacedeclarations through all subsequent decls. - Assigns vtable slots to table fields in declaration order.
- Computes struct layouts (offsets, total size, alignment).
- Computes enum values (implicit increment, explicit overrides).
- Validates type references against the loaded type table.
Summary
Functions
Resolve a .fbs file from disk, following include statements recursively.
Resolve a single schema source string with no includes.
Functions
@spec resolve_path( Path.t(), keyword() ) :: {:ok, Flatbuf.Schema.t()} | {:error, term()}
Resolve a .fbs file from disk, following include statements recursively.
Options:
:include_paths— list of additional directories to search for included files. Mirrors flatc's-I PATHflag. The directory of the including file is always tried first; the search paths are tried in order if that fails.
@spec resolve_source(binary()) :: {:ok, Flatbuf.Schema.t()} | {:error, term()}
Resolve a single schema source string with no includes.
Used by tests and code that constructs schemas in memory.