Skip to content

Commit

Permalink
Remove wasi-libc header dependency from platform layer
Browse files Browse the repository at this point in the history
In order to get rid of the dependency of platform headers on
wasmtime_ssp.h, create a new header platform_wasi.h which defines the
WASI types. The platform filesystem implementations as well as the
wasi-libc code can then depend on this header without introducing any
dependency issues. Also, rename and move wasi_errno.h to libc_errno.h
under common platform sources since it has no depedencies except the
wasi types and libc errno codes.
  • Loading branch information
zoraaver committed Oct 18, 2023
1 parent 6f67da9 commit 899aaf6
Show file tree
Hide file tree
Showing 17 changed files with 1,836 additions and 1,815 deletions.
1 change: 0 additions & 1 deletion core/iwasm/common/wasm_runtime_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#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"
Expand Down
1 change: 1 addition & 0 deletions core/iwasm/libraries/libc-wasi/libc_wasi_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "bh_platform.h"
#include "wasm_export.h"
#include "wasm_runtime_common.h"
#include "wasmtime_ssp.h"

#if WASM_ENABLE_THREAD_MGR != 0
#include "../../../thread-mgr/thread_manager.h"
Expand Down
1 change: 0 additions & 1 deletion core/iwasm/libraries/libc-wasi/libc_wasi_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef _LIBC_WASI_WRAPPER_H
#define _LIBC_WASI_WRAPPER_H

#include "wasmtime_ssp.h"
#include "posix.h"

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit 899aaf6

Please sign in to comment.