Expand description
Load + parse contract.mpir into typed crate::ir::MoonIr.
Wire format is RFC 8949 CBOR. See the patched compactc fork’s
compiler/cbor.ss and compiler/runtime-ir-passes.ss for the
emitter side; the schema itself is unchanged from the JSON era and
is documented in compact/doc/runtime-ir.md.
Constants§
- MIN_
SCHEMA_ VERSION - The oldest schema version this consumer understands. Contracts compiled by a pre-0.33 toolchain stay readable.
- MOON_
IR_ FILENAME - Canonical filename for a compiled Moonproof IR artifact inside a contract
build directory (
<out>/contract.mpiror<out>/compiler/contract.mpir). - SUPPORTED_
SCHEMA_ VERSION - The newest schema version this consumer understands.
Functions§
- from_
cbor_ slice - Parse a runtime-ir CBOR byte slice using the zero-copy single-pass decoder.
- from_
path - Read + parse a runtime-ir CBOR file.
- to_
cbor_ vec - Encode a
MoonIrinto RFC 8949 CBOR bytes using the direct fast encoder. - write_
cbor - Append a
MoonIr’s RFC 8949 CBOR bytes intoout.