Skip to content

Does WebAssembly/WASI have access to /proc/PID/fd/0, /dev/stdin and equivalent on Apple devices? #152

Answered by pchickey
guest271314 asked this question in Q&A
Discussion options

You must be logged in to vote

The stdin and stdout streams use these interfaces in the wasi-cli package, which are distinct from the filesystem: https://github.com/WebAssembly/wasi-cli/blob/main/wit/stdio.wit . Rather than exposing those streams as files, they are exposed just as the more primitive input-stream and output-stream types from wasi-io. Additional information for implementing isatty is provided in these interfaces https://github.com/WebAssembly/wasi-cli/blob/main/wit/terminal.wit . One of the design principles in WASI is to use more specific types and interfaces, where possible, than the poxix principle of everything is a file.

WASI is specified using the Component Model wit language to define types and fu…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@guest271314
Comment options

@pchickey
Comment options

Answer selected by guest271314
@guest271314
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants