Add wasm_runtime_get_wasi_exit_code (#1748)
Refer to https://github.com/bytecodealliance/wasm-micro-runtime/issues/1738
This commit is contained in:
@ -369,9 +369,13 @@ typedef struct WASIContext {
|
||||
char **argv_list;
|
||||
char *env_buf;
|
||||
char **env_list;
|
||||
uint32_t exit_code;
|
||||
} WASIContext;
|
||||
#else
|
||||
typedef uvwasi_t WASIContext;
|
||||
typedef struct WASIContext {
|
||||
uvwasi_t uvwasi;
|
||||
uint32_t exit_code;
|
||||
} WASIContext;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -768,6 +772,10 @@ wasm_runtime_is_wasi_mode(WASMModuleInstanceCommon *module_inst);
|
||||
WASM_RUNTIME_API_EXTERN WASMFunctionInstanceCommon *
|
||||
wasm_runtime_lookup_wasi_start_function(WASMModuleInstanceCommon *module_inst);
|
||||
|
||||
/* See wasm_export.h for description */
|
||||
WASM_RUNTIME_API_EXTERN uint32_t
|
||||
wasm_runtime_get_wasi_exit_code(WASMModuleInstanceCommon *module_inst);
|
||||
|
||||
bool
|
||||
wasm_runtime_init_wasi(WASMModuleInstanceCommon *module_inst,
|
||||
const char *dir_list[], uint32 dir_count,
|
||||
|
||||
Reference in New Issue
Block a user