I'm confused on how preopened fds are numbered. The API doc currently says
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).
Other than these, WASI implementations are not required to allocate new file descriptors in ascending order.
So how do programs find the preopened fds? Wasmtime currently seems to monotonically increment the fds. Should this be considered part of the spec?
I'm confused on how preopened fds are numbered. The API doc currently says
So how do programs find the preopened
fds? Wasmtime currently seems to monotonically increment thefds. Should this be considered part of the spec?