private void Initialize(Interop.EngineHandle engine) { if (engine.IsInvalid) { throw new WasmtimeException("Failed to create Wasmtime engine."); } var store = Interop.wasm_store_new(engine); if (store.IsInvalid) { throw new WasmtimeException("Failed to create Wasmtime store."); } var linker = Interop.wasmtime_linker_new(store); if (linker.IsInvalid) { throw new WasmtimeException("Failed to create Wasmtime linker."); } Interop.wasmtime_linker_allow_shadowing(linker, allowShadowing: true); Engine = engine; Store = store; Linker = linker; }
private void Initialize(Interop.EngineHandle engine) { if (engine.IsInvalid) { throw new WasmtimeException("Failed to create Wasmtime engine."); } var store = Interop.wasm_store_new(engine); if (store.IsInvalid) { throw new WasmtimeException("Failed to create Wasmtime store."); } _engine = engine; _handle = store; }