Instantiate the module in the given store See
(store: &mut Store, module: &Module, imports: Option<Imports>)
| 183 | /// |
| 184 | /// See <https://webassembly.github.io/spec/core/exec/modules.html#exec-instantiation> |
| 185 | pub fn instantiate(store: &mut Store, module: &Module, imports: Option<Imports>) -> Result<Self> { |
| 186 | let instance = ModuleInstance::instantiate_no_start(store, module, imports)?; |
| 187 | let _ = instance.start(store)?; |
| 188 | Ok(instance) |
| 189 | } |
| 190 | |
| 191 | /// Instantiate the module in the given store (without running the start function) |
| 192 | /// |