File: terminal.wit

package info (click to toggle)
rust-wasmtime 26.0.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 48,492 kB
  • sloc: ansic: 4,003; sh: 561; javascript: 542; cpp: 254; asm: 175; ml: 96; makefile: 55
file content (62 lines) | stat: -rw-r--r-- 2,021 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/// Terminal input.
///
/// In the future, this may include functions for disabling echoing,
/// disabling input buffering so that keyboard events are sent through
/// immediately, querying supported features, and so on.
@since(version = 0.2.0)
interface terminal-input {
    /// The input side of a terminal.
    @since(version = 0.2.0)
    resource terminal-input;
}

/// Terminal output.
///
/// In the future, this may include functions for querying the terminal
/// size, being notified of terminal size changes, querying supported
/// features, and so on.
@since(version = 0.2.0)
interface terminal-output {
    /// The output side of a terminal.
    @since(version = 0.2.0)
    resource terminal-output;
}

/// 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>;
}

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

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

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

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