Skip to content

Commit

Permalink
Adds an explicit way to use the args inside the WebAssembly Module
Browse files Browse the repository at this point in the history
  • Loading branch information
sendilkumarn authored and sunfishcode committed Jun 19, 2019
1 parent 7ac6666 commit ab8f8ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/WASI-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=. <some command inside>` 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.

Expand Down

0 comments on commit ab8f8ef

Please sign in to comment.