Closed axic closed 3 years ago
This seems to be still not working for me on dee9389d831a6ed5101155f31d217e47c4ad8175. m3_FindFunction
seemingly finds the import.
@axic verified on https://github.com/wasm3/wasm3/commit/097da3c788e4db3c5972c156853ee73f01040a50
Simple pywasm3
-based test:
import wasm3
env = wasm3.Environment()
rt = env.new_runtime(1024)
with open("./adler.wasm", "rb") as f:
mod = env.parse_module(f.read())
rt.load(mod)
mod.link_function("env", "adler32", "i(ii)", lambda x, y: 42)
wasm_run = rt.find_function("adler32")
res = wasm_run(100)
print(res)
Output:
4200
Thank you, just confirmed in our benchmarking tool too. That makes sure our integration wasn't broken either.
@vshymanskyy a random question, do you plan to make a release soon (this month)?
@axic , there are several things (technical, mostly) that hold us back. But the intent is to have a release really soon.
In this example
env:adler32
is imported andadler32
is exported:m3_FindFunction
seems to return the function index of the import. I think that is becauseModule_AddFunction
is used both inParseSection_Function
andParseSection_Import
and the underlying function list doesn't differentiate.