Closed KILLinefficiency closed 1 year ago
@KILLinefficiency how did you solve this issue?
@regnaio I didn't. I was no longer working on it, so I closed the issue.
@KILLinefficiency I was trying this library today
https://github.com/regnaio/havok-go/blob/main/main.go
Missing import: `go`.`debug`
means that debug
(a function?) under namespace go
was not registered to importObject
In the code snippet above, there's an example of registering env
._emval_get_method_caller
and more
I uploaded the .wasm
file to https://webassembly.github.io/wabt/demo/wasm2wat/ to get a more readable .wat
text showing the namespaces and names we need to register. For example:
(import "env" "_emval_get_method_caller" (func $env._emval_get_method_caller (type $t4)))
(import "env" "_emval_call_void_method" (func $env._emval_call_void_method (type $t6)))
(import "env" "_embind_register_value_array" (func $env._embind_register_value_array (type $t7)))
...
Hopefully this can help
Thanks for the bug report!
Describe the bug
I have written a simple Go module with a simple function and generated a
.wasm
file via the Go compiler. While loading the same.wasm
file in another Go module, theNewInstance()
function returns an error:Expected behavior
The
NewInstance()
function should return a value of type*wasmer.Instance
andnil
as error.Actual behavior
The
NewInstance
function returnsnil
as the primary value instead of*wasmer.Instance
variable. And the error is returned to be:The exact line is: