add uvwasi implementation to support wasi on windows [experimental] (#534)

add uvwasi implementation to support wasi on windows [experimental] and update windows.yml

Co-authored-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Xu Jun
2021-02-22 14:17:46 +08:00
committed by GitHub
parent 370cc83fbd
commit fc50404115
13 changed files with 1394 additions and 16 deletions

View File

@ -13,8 +13,12 @@
#include "../include/wasm_export.h"
#include "../interpreter/wasm.h"
#if WASM_ENABLE_LIBC_WASI != 0
#if WASM_ENABLE_UVWASI == 0
#include "wasmtime_ssp.h"
#include "posix.h"
#else
#include "uvwasi.h"
#endif
#endif
#ifdef __cplusplus
@ -73,6 +77,7 @@ typedef struct WASMModuleInstMemConsumption {
} WASMModuleInstMemConsumption;
#if WASM_ENABLE_LIBC_WASI != 0
#if WASM_ENABLE_UVWASI == 0
typedef struct WASIContext {
struct fd_table *curfds;
struct fd_prestats *prestats;
@ -82,6 +87,9 @@ typedef struct WASIContext {
char *env_buf;
char **env_list;
} WASIContext;
#else
typedef uvwasi_t WASIContext;
#endif
#endif
#if WASM_ENABLE_MULTI_MODULE != 0