@gmitch215/folio - v1.0.1
    Preparing search index...

    Function bakeModule

    • 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.

      Parameters

      Returns Promise<Uint8Array<ArrayBufferLike>>