Stream: wasm

Topic: Wasm module instantiation


view this post on Zulip Mats Brorsson (May 24 2023 at 10:22):

I am trying to fully understand the wasm module lifecycle and I wonder of there is some canonical and/or popular description of what is needed to happen during a wasm module instantiation. Can I get any pointers to this, please?

view this post on Zulip Dan Gohman (May 24 2023 at 12:32):

For canonical, there is the definition of instantiation in the core spec.

view this post on Zulip Dan Gohman (May 24 2023 at 12:40):

For popular, I don't know of any references offhand, but it's roughly: given a module and a set of "exports" corresponding to the module's imports: validate the module, check that the exports' types match the module's imports' types, create an instance containing memories, tables, globals, functions, and other items specified in the module, link the module's imports to the provided exports, and then run the start function if present.


Last updated: Nov 22 2024 at 17:03 UTC