Skip to content

Commit 7513b67

Browse files
committed
in_exec_wasi: change wasm_runtime_call_wasm to wasm_application_execute_main to support latest version of tinygo
1 parent 4a4e016 commit 7513b67

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/wasm/flb_wasm.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,7 @@ char *flb_wasm_call_function_format_msgpack(struct flb_wasm *fw, const char *fun
376376
int flb_wasm_call_wasi_main(struct flb_wasm *fw)
377377
{
378378
#if WASM_ENABLE_LIBC_WASI != 0
379-
wasm_function_inst_t func = NULL;
380-
381-
if (!(func = wasm_runtime_lookup_wasi_start_function(fw->module_inst))) {
382-
flb_error("The wasi mode main function is not found.");
383-
return -1;
384-
}
385-
386-
return wasm_runtime_call_wasm(fw->exec_env, func, 0, NULL);
379+
return wasm_application_execute_main(fw->module_inst, 0, NULL);
387380
#else
388381
return -1;
389382
#endif

0 commit comments

Comments
 (0)