Closed DarumaDocker closed 2 years ago
Could you also provide the wasm file?
https://github.com/second-state/WasmEdge-go-examples/tree/master/go_ExternRef
Only change
vm.LoadWasmFile(os.Args[1])
to
b, er := ioutil.ReadFile(os.Args[1])
if er != nil {
log.Fatal(er)
}
er = vm.LoadWasmBuffer(b)
if er != nil {
log.Fatal(er)
}
You will get the error.
This is fixed in the v0.9.0-rc1.
If I load wasm using vm.LoadWasmBuffer, then the vm.Validate() will result with an error: 'magic header not detected'