Abstract POSIX filesystem functions (#2585)
To allow non-POSIX platforms such as Windows to support WASI libc filesystem functionality, create a set of wrapper functions which provide a platform-agnostic interface to interact with the host filesystem. For now, the Windows implementation is stubbed but this will be implemented properly in a future PR. There are no functional changes in this change, just a reorganization of code to move any direct POSIX references out of posix.c in the libc implementation into posix_file.c under the shared POSIX sources. See https://github.com/bytecodealliance/wasm-micro-runtime/issues/2495 for a more detailed overview of the plan to port the WASI libc filesystem to Windows.
This commit is contained in:
@ -198,6 +198,12 @@ include_directories (${SHARED_DIR}/include
|
||||
|
||||
enable_language (ASM)
|
||||
|
||||
if (NOT MINGW AND NOT MSVC)
|
||||
set(WAMR_BUILD_LIBC_WASI 1)
|
||||
else()
|
||||
set(WAMR_BUILD_LIBC_UVWASI 1)
|
||||
endif()
|
||||
|
||||
include (${SHARED_DIR}/platform/${WAMR_BUILD_PLATFORM}/shared_platform.cmake)
|
||||
include (${SHARED_DIR}/mem-alloc/mem_alloc.cmake)
|
||||
include (${SHARED_DIR}/utils/shared_utils.cmake)
|
||||
|
||||
Reference in New Issue
Block a user