Expand description
Typed IR mirroring the contract.mpir schema 1:1.
The JSON schema is specified at compact/doc/runtime-ir.md. Every
variant here corresponds to exactly one shape produced by the
emitter pass compiler/runtime-ir-passes.ss.
Structs§
- AdtOp
Invocation - Argument
- Binding
Target - Capabilities
Meta - Contract-wide governance and capability metadata.
- Capability
Def - Declaration of a contract capability (e.g. Pact
defcap). - Circuit
Body - Circuit
Bounds Meta - Static resource bounds for a single circuit.
- Circuit
CapUsage - Per-circuit summary of capabilities acquired, required, or emitted.
- Constructor
- Contract
Circuit Sig - Debug
Info - Source file list and symbol-to-span maps.
- Frontend
Meta - Identifying metadata for the compiler frontend that emitted the IR.
- IntLit
- An integer literal as it appears anywhere in the runtime IR.
- Ledger
Field - MapEntry
- MoonIr
- Native
- Privacy
Meta - Contract-wide privacy annotations and circuit bounds.
- Source
Span - Source-code span for diagnostics, coverage, and debugging.
- Struct
Field - Tuple
Item - VmInstr
- One VM instruction. We capture the op name + remaining keys as a
raw JSON object since the op-arg shape varies per op. Consumers
that need typed access can match on
opand decode manually, or use the helpers incrate::vm. - Witness
- Workflow
Meta - Multi-step workflow definition grouping ordered step circuits.
- Workflow
Step Meta - One step in a multi-step workflow (e.g. a Pact
defpactstep).
Enums§
- Capability
Kind - Classification of a declared contract capability.
- Expression
- Field
Role - Architectural role of a ledger field for auditing and tooling.
- Field
Type - Which field an operation works in. Spelled exactly as compactc’s
extract-contract-info.ssspells the corresponding type names, so afield-typestring and atype-namestring are the same vocabulary. - Frontend
Language - Source frontend language that produced a
MoonIr. - Governance
Spec - Contract upgrade / administration governance declaration.
- Path
Element - Privacy
Class - Privacy classification for a contract field or value flow.
- Semantic
Type Role - Higher-level semantic role attached to a descriptor entry so codegen and host tooling can recover frontend types lowered onto core IR primitives.
- State
Value - Statement
- Storage
- Storage shape of a ledger field. Discriminated on a
"storage"JSON tag — the wire format compactc emits is: - Type
Descriptor
Functions§
- canonical_
intrinsic_ name - Normalize a Compact bare native name,
"__compactRuntime.*"host symbol, or language-agnostic"mp:*"intrinsic URI to the single canonical intrinsic identifier shared across the runtime, privacy auditor, ZKIR compiler, and multi-language frontends.
Type Aliases§
- VmOp
- One VM-op argument value. This is a recursive structure because
VM ops can carry nested values:
{"vm": "state-value", "kind": "cell", "value": {"vm": "align", ...}}. We model it as untypedRuntimeValuefor flexibility —crate::vm::VmValueprovides a typed interpretation.