From ab8f8ef5d81250f917422560ed4131da6120c6df Mon Sep 17 00:00:00 2001 From: Sendil Kumar Date: Thu, 13 Jun 2019 01:00:04 +0200 Subject: [PATCH] Adds an explicit way to use the args inside the WebAssembly Module --- docs/WASI-api.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/WASI-api.md b/docs/WASI-api.md index af3a76fa10..39bf49e9fa 100644 --- a/docs/WASI-api.md +++ b/docs/WASI-api.md @@ -1596,10 +1596,12 @@ Used by many functions in this API. As in POSIX, three file descriptor numbers are provided to instances on startup -- 0, 1, and 2, (a.k.a. `STDIN_FILENO`, `STDOUT_FILENO`, and `STDERR_FILENO`). Starting at 3 follow a possibly-entry sequence -of preopened file descriptors provided by the host environment; +of preopened file descriptors provided by the host environment or the argument passed to the wasmtime command; information about these may be obtained through [`__wasi_fd_prestat_get()`](#fd_prestat_get). +i.e., if we have called `wasmtime --dir=. ` we can specify `3` that will refer to the `--dir` value. + Other than these, WASI implementations are not required to allocate new file descriptors in ascending order.