Skip to main content

Module ir

Module ir 

Source
Expand description

Active Infinity’s in-memory module model.

This is the canonical IR: the encoder is a pure function of it, and the decoder reproduces it exactly. It deliberately does not mirror the active-core arena layout: the wire format is versioned independently of any dependency’s semver (see ADR-0002). Interop with the text language IR lives in crate::interop behind the active-core feature.

Structural invariants upheld by InfinityModule::validate_structure:

  • every referenced node id exists (no dangling references);
  • table fields, binding names and array nodes are unique where required;
  • the dependency graph is acyclic (Active rejects cycles before any value exists);
  • nesting depth stays within the caller’s budget.

Secret material is held in SecretBytes, which has no Display, Debug, Serialize or equality path that can reveal it.

Structs§

Annotation
One annotation attached to a node.
InfinityModule
A canonical Active Infinity module.
ModuleBuilder
Builder helpers that keep the node graph consistent while constructing a module by hand or from another IR.
NodeId
Index into the module arena.
ProvEntry
One provenance entry: a typed key/value pair.
Provenance
Module provenance: who produced this module, when, with what, from what.
SchemaFieldSpec
One schema field’s constraints.
SecretBytes
A secret string held structurally.

Enums§

AnnotationKind
Annotation kinds (spec/annotations.md §2–§4).
BinOp
Binary operators, with permanent wire codes.
Constraint
A runtime constraint attached to a node (@constraint predicates and schema bounds).
Inode
A module node.
InterpPart
One interpolation part.
PatchOp
A structural patch operation.
ProvKind
Kinds of provenance entries.
ProvValue
A provenance value.
SemanticTag
Semantic tag for a multi-line string block.
SerializedKind
Stable node-kind identity, usable without depending on wire ids.
TypeSpec
Declared value type of a schema field.
UnOp
Unary operators, with permanent wire codes.

Functions§

hash_hex
Lowercase hex of a 32-byte digest.
parse_hash_hex
Parse a 64-character hex digest.