Expand description
Forma Module IR: binary format definitions and parsers.
This crate provides the IR parser and native server-side HTML walker.
Fragment walking is internal; server consumers render the page with
walk_to_html or walk_to_html_counted. Neither historical path is public:
ⓘ
use forma_ir::walk_island;ⓘ
use forma_ir::walker::walk_island;ⓘ
use forma_ir::walker::walk_island_with_limits;Test features do not expose a fragment renderer either:
ⓘ
use forma_ir::parser::test_helpers::walk_island;Re-exports§
pub use props::PageProps;pub use format::IrError;pub use format::IrHeader;pub use format::IslandEntry;pub use format::IslandTrigger;pub use format::ListKeyReason;pub use format::ListKeyViolation;pub use format::Opcode;pub use format::SectionDescriptor;pub use format::SectionTable;pub use format::SlotEntry;pub use format::SlotSource;pub use format::SlotType;pub use format::HEADER_SIZE;pub use format::IR_VERSION;pub use format::SECTION_ENTRY_SIZE;pub use format::SIGNATURE;pub use format::TABLE_PREFIX_SIZE;pub use parser::IrModule;pub use parser::IslandTableParsed;pub use parser::SlotTable;pub use parser::StringTable;pub use slot::json_to_slot_value;pub use slot::SlotData;pub use slot::SlotValue;pub use walker::walk_to_html;pub use walker::walk_to_html_counted;pub use walker::walk_to_html_counted_with_mode;pub use walker::walk_to_html_with_limits;pub use walker::IslandState;pub use walker::RenderMode;pub use walker::WalkCounts;pub use walker::WalkFailure;pub use walker::WalkLimits;pub use walker::WalkOutput;pub use walker::DEFAULT_MAX_LIST_ITERATIONS;pub use walker::DEFAULT_MAX_OUTPUT_BYTES;
Modules§
- dump
- Human-readable text dump of a module, for debugging and diffing. Lossless, deterministic FMIR v3 text representation shared with the compiler.
- format
- On-disk FMIR layout: header, section table, opcodes, and the table entry
types. See
docs/FMIR-FORMAT.mdfor the stability contract. FMIR binary format definition and parsers. - parser
- Bounds-checked parsing and one-shot structural validation of an FMIR file. Parsers for FMIR data tables: string table, slot table, and island table.
- props
- Derived page contracts, schema comparison and checked value encoding. Declared page props: derived Rust metadata compared with FMIR’s actual schema, followed by projection and checked encoding of only the declared fields.
- schema
- Typed props schema, key paths and source positions carried by FMIR v3. FMIR v3 schema, key-path and source-position tables.
- slot
- Runtime slot values and the dense
SlotDataa page handler populates. - walker
- The SSR walker: opcode stream plus slot values in, HTML out. Static HTML walker — walks the IR opcode stream to produce HTML output.
Derive Macros§
- Page
Props - Derive a named props struct or unit enum. Derive a named props struct or unit enum from the supported closed type set.