nodejs / uvwasi

WASI syscall API built atop libuv
MIT License
228 stars 51 forks source link

make stdio configurable #102

Closed cjihrig closed 4 years ago

cjihrig commented 4 years ago

This PR adds options to uvwasi_init() to allow setting the stdio file descriptors. This will allow embedders like Node.js to run multiple WASI applications in the same process without sharing stdio.

Unfortunately, Windows doesn't seem to like the use of the names stdin, stdout, and stderr as struct members, which is why I went with in, out, and err.

cjihrig commented 4 years ago

Tested these changes in the Node test suite (on macOS) and everything seems fine. Thanks for the review Anna.