data := &def.CryptoDummy{Context: "2022"}
fmt.Println(data)
HelloWorld, err := instance.Exports.GetFunction("HelloWorld")
check(err)
result, err := HelloWorld(data)
// if fact the code returns error as 2 parameters needed.
// so as workaround I make the code as
result, err := HelloWorld(1,1)
// I wanna to see Hello 2022 here.
// but just Hello
but it won't work.
as far as further research, I know it seems to invoke with a structure, I should pass and invokes as
HelloWorld(memory_begin,memory_end)
but
how should I define the memory?
how should I pass the data from golang code into memory?
how should I reload the data from memory at webassembly code?
what's the length of the memory?
what if a large object over the memory?
I hope we can re-enable the echo example in example folder.
Summary
Happy new year.
A clear and concise summary of your question.
I am study this project and I want to do an echo sample as type defined:
webassembly code as:
and I want to invoke the
module.wasm
asbut it won't work. as far as further research, I know it seems to invoke with a structure, I should pass and invokes as
but
I hope we can re-enable the echo example in example folder.
Additional details
Provide any additional details here.
I found as: https://github.com/wasmerio/wasmer-go/pull/30/files
But... it seems the sample been removed.