-
Notifications
You must be signed in to change notification settings - Fork 262
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
Add documentation about starting file descriptors in Preview1. #522
Add documentation about starting file descriptors in Preview1. #522
Conversation
Add documentation mentioning stdin, stdout, and stderr file descriptors, and also preopen file descriptors, and mention that preopen file descriptors can be closed. Allowing preopen file descriptors to be closed is a change from how Wasmtime historically worked, but I think it's more clear now that it's ok to let preopens be closed. We'll change Wasmtime accordingly. This addresses WebAssembly/wasi-testsuite#50.
legacy/application-abi.md
Outdated
@@ -51,6 +51,13 @@ Regardless of the kind, all modules accessing WASI APIs also export a table | |||
with the name `__indirect_function_table`. Function pointers in WASI API calls | |||
are relative to this table's index space. | |||
|
|||
When `_start` or `_initialize` is called, environments shall provide file | |||
descriptors with indices 0, 1, and 2 representing file-like resources for |
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.
what do you mean by "file-like"?
the wording made me think regular files. but i guess it isn't what you meant here.
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.
That's a good point, "file-like" is ambiguous. I've now changed it to say "stream" instead.
This updates the close_preopens test to the latest upstream version, which implements WebAssembly/WASI#522. Preopens may now be closed.
This updates the close_preopens test to the latest upstream version, which implements WebAssembly/WASI#522. Preopens may now be closed.
Add documentation mentioning stdin, stdout, and stderr file descriptors, and also preopen file descriptors, and mention that preopen file descriptors can be closed.
Allowing preopen file descriptors to be closed is a change from how Wasmtime historically worked, but I think it's more clear now that it's ok to let preopens be closed. We'll change Wasmtime accordingly.
This addresses WebAssembly/wasi-testsuite#50.