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?
For canonical, there is the definition of instantiation in the core spec.
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: Dec 23 2024 at 12:05 UTC