MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / new

Method new

crates/wasmtime/src/runtime/vm/interpreter.rs:61–70  ·  view source on GitHub ↗

Creates a new interpreter ready to interpret code.

(engine: &Engine)

Source from the content-addressed store, hash-verified

59impl Interpreter {
60 /// Creates a new interpreter ready to interpret code.
61 pub fn new(engine: &Engine) -> Result<Interpreter, OutOfMemory> {
62 let ret = Interpreter {
63 pulley: StoreBox::new(VmState {
64 vm: Vm::with_stack(engine.config().max_wasm_stack)?,
65 resume_at_pc: None,
66 })?,
67 };
68 engine.profiler().register_interpreter(&ret);
69 Ok(ret)
70 }
71
72 /// Returns the `InterpreterRef` structure which can be used to actually
73 /// execute interpreted code.

Callers

nothing calls this directly

Calls 5

OkFunction · 0.85
newFunction · 0.50
configMethod · 0.45
register_interpreterMethod · 0.45
profilerMethod · 0.45

Tested by

no test coverage detected