componentized/directory

wasi:cli

interface dependency

WASI CLI interfaces for command-line programs

interface terminal-stdin wasi:cli/terminal-stdin@0.2.12 since 0.2.0

An interface providing an optional terminal-input for stdin as a link-time authority.

Types

use resource terminal-inputsince 0.2.0

from wasi:cli/terminal-input@0.2.12

The input side of a terminal.

Functions

functionget-terminal-stdin: func() -> option<terminal-input>since 0.2.0

If stdin is connected to a terminal, return a terminal-input handle allowing further interaction with it.

WIT

/// An interface providing an optional `terminal-input` for stdin as a
/// link-time authority.
@since(version = 0.2.0)
interface terminal-stdin {
  @since(version = 0.2.0)
  use terminal-input.{terminal-input};

  /// If stdin is connected to a terminal, return a `terminal-input` handle
  /// allowing further interaction with it.
  @since(version = 0.2.0)
  get-terminal-stdin: func() -> option<terminal-input>;
}