Returns the module with the image pages as active data segments after its own segments, and
the image's changed mutable globals written as their initial values. Adjacent pages merge into
one segment, split at maxSegmentBytes. The module must have exactly one memory.
An imported memory is left alone: whoever instantiates the baked module creates it with at least
imagePages(image).memoryPages pages. A defined memory whose initial pages are below the image
size has them raised to the image size (only the memory section changes); its maximum, shared
flag and memory64 flag stay as they are, and one already large enough is untouched.
Throws ImageMismatchError for a wrong module digest (taken over bytes as passed), a module
with no memory or with more than one, an image over the memory maximum, a global that cannot be rewritten and changed
table slots (unless allowTableChanges). A start function is refused because it would run
again over the captured state.
Returns the module with the image pages as active data segments after its own segments, and the image's changed mutable globals written as their initial values. Adjacent pages merge into one segment, split at
maxSegmentBytes. The module must have exactly one memory.An imported memory is left alone: whoever instantiates the baked module creates it with at least
imagePages(image).memoryPagespages. A defined memory whose initial pages are below the image size has them raised to the image size (only the memory section changes); its maximum, shared flag and memory64 flag stay as they are, and one already large enough is untouched.Throws
ImageMismatchErrorfor a wrong module digest (taken overbytesas passed), a module with no memory or with more than one, an image over the memory maximum, a global that cannot be rewritten and changed table slots (unlessallowTableChanges). A start function is refused because it would run again over the captured state.