Implement some more of the WASI API - #12704
Conversation
3b8b688 to
701830c
Compare
701830c to
f6f415f
Compare
| # TODO(sbc): Find a better way to identify wasi syscalls | ||
| syscall_prefixes = ('__sys', 'fd_') | ||
| syscalls = [d for d in declares if d.startswith(syscall_prefixes)] | ||
| syscalls = [d for d in declares if d.startswith(syscall_prefixes) or d in ['path_open']] |
There was a problem hiding this comment.
building.py's metadce() has a WASI_IMPORTS list - maybe we can move that to a global position?
| }, | ||
|
|
||
| #ifdef PURE_WASI | ||
| $preopens: "{3: '/'}", |
There was a problem hiding this comment.
Clearly this needs work yes :)
This basically says expose the whole of emscriptens VFS (the virtual filesytem created by the FS code) and make that available to WASI via the preopen system. Pre-open file descriptors start at 3, right after stdin, stdout and stderr.
This really needs integration with the FS layer... I think I should probably fix that even before landing this..
|
Is this blocked on anything? Anything I can do on the tests side? 🙃 |
No, just lack time :) I will try to get this landed before the end of the year. |
f6f415f to
127cac8
Compare
127cac8 to
db450d7
Compare
|
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
38511a2 to
9fe8743
Compare
e3f66a4 to
09d0f62
Compare
4f70dc0 to
3346632
Compare
|
@kripken I'm trying to revive this old PR. I've improved it a bunch and it runs more tests now. |
e15be6a to
fce6a0f
Compare
In order to test our WASI API implementation I've added `wasi-test-suite` as submodule. This submodule is only needed for testing.
fce6a0f to
530aca7
Compare
|
The emscripten roller seems to be erroring after this landed. Seems like something with the new submodule directory? |
|
Should be fixed in https://chromium-review.googlesource.com/c/emscripten-releases/+/4391454 |
Followup to emscripten-core#12704.
In order to test our WASI API implementation I've added
wasi-test-suiteas submodule. This submodule is onlyneeded for testing.