MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / instantiate

Method instantiate

crates/tinywasm/src/instance.rs:185–189  ·  view source on GitHub ↗

Instantiate the module in the given store See

(store: &mut Store, module: &Module, imports: Option<Imports>)

Source from the content-addressed store, hash-verified

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 ///

Callers

nothing calls this directly

Calls 1

startMethod · 0.80

Tested by

no test coverage detected