You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the "m3_LinkWASI(module)" to the module when loading a new module. ie.
public init(stackSize: UInt32, module bytes: [UInt8]) throws {
id = nextInstanceIdentifier
idPointer = makeRawPointer(for: id)
guard let environment = m3_NewEnvironment() else {
throw WasmInterpreterError.couldNotLoadEnvironment
}
guard let runtime = m3_NewRuntime(environment, stackSize, idPointer) else {
throw WasmInterpreterError.couldNotLoadRuntime
}
var mod: IM3Module?
try WasmInterpreter.check(m3_ParseModule(environment, &mod, bytes, UInt32(bytes.count)))
guard let module = mod else { throw WasmInterpreterError.couldNotParseModule }
try WasmInterpreter.check(m3_LoadModule(runtime, module))
// New code:
// this must be after the m3_LoadModule
try WasmInterpreter.check(m3_LinkWASI(module))
// end
self.environment = environment
self.runtime = runtime
moduleAndBytes = (module, bytes)
}
The text was updated successfully, but these errors were encountered:
Add the "m3_LinkWASI(module)" to the module when loading a new module. ie.
// New code:
// this must be after the m3_LoadModule
try WasmInterpreter.check(m3_LinkWASI(module))
// end
self.environment = environment
self.runtime = runtime
moduleAndBytes = (module, bytes)
}
The text was updated successfully, but these errors were encountered: