Skip to content

Commit ab8f8ef

Browse files
sendilkumarnsunfishcode
authored andcommitted
Adds an explicit way to use the args inside the WebAssembly Module
1 parent 7ac6666 commit ab8f8ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/WASI-api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1596,10 +1596,12 @@ Used by many functions in this API.
15961596
As in POSIX, three file descriptor numbers are provided to instances
15971597
on startup -- 0, 1, and 2, (a.k.a. `STDIN_FILENO`, `STDOUT_FILENO`,
15981598
and `STDERR_FILENO`). Starting at 3 follow a possibly-entry sequence
1599-
of preopened file descriptors provided by the host environment;
1599+
of preopened file descriptors provided by the host environment or the argument passed to the wasmtime command;
16001600
information about these may be obtained through
16011601
[`__wasi_fd_prestat_get()`](#fd_prestat_get).
16021602

1603+
i.e., if we have called `wasmtime --dir=. <some command inside>` we can specify `3` that will refer to the `--dir` value.
1604+
16031605
Other than these, WASI implementations are not required to allocate
16041606
new file descriptors in ascending order.
16051607

0 commit comments

Comments
 (0)