Skip to main content

Module snapshot_layout

Module snapshot_layout 

Source
Expand description

Byte-range annotations for .mbc snapshots (the playground inspector).

describe_bytecode funnels the buffer through read_bytecode first — the full L1 validation — and only then re-walks it, recording one region per format field. Regions are emitted in file order, are never empty, and tile the buffer exactly: the first starts at offset 0, each next region starts where the previous one ends, and the last ends at byte_length. Consumers can therefore render a complete annotated hexdump without gap or overlap handling.

Structs§

SnapshotLayout
SnapshotRegion
One annotated byte range. label names the format field (“magic”, “const[0] tag”, “OpConst 1”); detail explains the decoded value.

Enums§

SnapshotSection

Functions§

describe_bytecode
Annotate every byte of a validated .mbc buffer.