Expand description
FMIR binary format definition and parsers.
Defines the on-disk layout for Forma Module IR files:
- 16-byte header (magic, version, flags, source hash)
- 32-byte section table (4 sections x 8 bytes each)
- Opcode, SlotType, IslandTrigger, PropsMode enums
- SlotEntry and IslandEntry structs
All multi-byte integers are little-endian.
Structs§
- IrHeader
- FMIR file header — the first 16 bytes of every
.fmirfile. - Island
Entry - An island declaration in the island table.
- Section
Descriptor - A single section descriptor: offset + size (both u32, little-endian).
- Section
Table - Section table — four section descriptors immediately following the header.
- Slot
Entry - A slot declaration in the slot table.
Enums§
- IrError
- Errors that can occur when parsing FMIR binary data.
- Island
Trigger - When an island should be hydrated.
- Opcode
- Bytecode opcodes for the FMIR instruction stream.
- Props
Mode - How island props are delivered.
- Slot
Source - Where the slot value originates at runtime.
- Slot
Type - Data type hint for a slot entry.
Constants§
- HEADER_
SIZE - Size of the file header in bytes.
- IR_
VERSION - Current IR format version.
- MAGIC
- Magic bytes identifying an FMIR file.
- SECTION_
TABLE_ SIZE - Size of the section table in bytes (4 sections x 8 bytes).