-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abstract POSIX filesystem functions #2585
Abstract POSIX filesystem functions #2585
Conversation
9aa004e
to
1607e49
Compare
c94244d
to
fd8398a
Compare
99bc902
to
1723235
Compare
6c4f8e1
to
9120fdc
Compare
2a68f80
to
cc7c07a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
899aaf6
to
07ed266
Compare
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 bytecodealliance#2495 for a more detailed overview of the plan to port the WASI libc filesystem to Windows.
013166c
to
be7df3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/include/wasmtime_ssp.h
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
be7df3b
to
559ea99
Compare
addressed the comment 👍 |
fa5e9d7
into
bytecodealliance:dev/wasi-libc-windows
Follows up the change in bytecodealliance#2585 to include libc utils when targeting zephyr, which abstracts posix filesystem functions. Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
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 bytecodealliance#2495 for a more detailed overview of the plan to port the WASI libc filesystem to Windows.
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 #2495 for a
more detailed overview of the plan to port the WASI libc filesystem to Windows.