Add wasm_runtime_get_wasi_exit_code (#1748)

Refer to https://github.com/bytecodealliance/wasm-micro-runtime/issues/1738
This commit is contained in:
YAMAMOTO Takashi
2022-11-24 21:26:18 +09:00
committed by GitHub
parent 8dc9d6dc4f
commit 1032aac60b
7 changed files with 103 additions and 28 deletions

View File

@ -450,6 +450,18 @@ wasm_runtime_is_wasi_mode(wasm_module_inst_t module_inst);
WASM_RUNTIME_API_EXTERN wasm_function_inst_t
wasm_runtime_lookup_wasi_start_function(wasm_module_inst_t module_inst);
/**
* Get WASI exit code.
*
* After a WASI command completed its execution, an embedder can
* call this function to get its exit code. (that is, the value given
* to proc_exit.)
*
* @param module_inst the module instance
*/
WASM_RUNTIME_API_EXTERN uint32_t
wasm_runtime_get_wasi_exit_code(wasm_module_inst_t module_inst);
/**
* Lookup an exported function in the WASM module instance.
*