2024-12-05 23:30:02 +00:00
|
|
|
package wasi:cli@0.2.0;
|
|
|
|
|
2024-12-05 23:36:10 +00:00
|
|
|
interface environment {
|
|
|
|
get-environment: func() -> list<tuple<string, string>>;
|
2024-12-05 23:30:02 +00:00
|
|
|
|
2024-12-05 23:36:10 +00:00
|
|
|
get-arguments: func() -> list<string>;
|
2024-12-05 23:30:02 +00:00
|
|
|
|
2024-12-05 23:36:10 +00:00
|
|
|
initial-cwd: func() -> option<string>;
|
|
|
|
}
|
2024-12-05 23:30:02 +00:00
|
|
|
|
2024-12-05 23:36:10 +00:00
|
|
|
interface exit {
|
|
|
|
exit: func(status: result);
|
2024-12-05 23:30:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
interface stdin {
|
|
|
|
use wasi:io/streams@0.2.0.{input-stream};
|
|
|
|
|
|
|
|
get-stdin: func() -> input-stream;
|
|
|
|
}
|
|
|
|
|
2024-12-05 23:36:10 +00:00
|
|
|
interface stdout {
|
|
|
|
use wasi:io/streams@0.2.0.{output-stream};
|
2024-12-05 23:30:02 +00:00
|
|
|
|
2024-12-05 23:36:10 +00:00
|
|
|
get-stdout: func() -> output-stream;
|
2024-12-05 23:30:02 +00:00
|
|
|
}
|
|
|
|
|
2024-12-05 23:36:10 +00:00
|
|
|
interface stderr {
|
|
|
|
use wasi:io/streams@0.2.0.{output-stream};
|
|
|
|
|
|
|
|
get-stderr: func() -> output-stream;
|
2024-12-05 23:30:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
interface terminal-input {
|
|
|
|
resource terminal-input;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface terminal-output {
|
|
|
|
resource terminal-output;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface terminal-stdin {
|
|
|
|
use terminal-input.{terminal-input};
|
|
|
|
|
|
|
|
get-terminal-stdin: func() -> option<terminal-input>;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface terminal-stdout {
|
|
|
|
use terminal-output.{terminal-output};
|
|
|
|
|
|
|
|
get-terminal-stdout: func() -> option<terminal-output>;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface terminal-stderr {
|
|
|
|
use terminal-output.{terminal-output};
|
|
|
|
|
|
|
|
get-terminal-stderr: func() -> option<terminal-output>;
|
|
|
|
}
|
|
|
|
|