Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit 16483cd

Browse files
committed
WIP: stdio stream errors
1 parent 965cbde commit 16483cd

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

wit-0.3.0-draft/stdio.wit

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1+
@since(version = 0.3.0-rc-2025-08-15)
2+
interface stdio {
3+
@since(version = 0.3.0-rc-2025-08-15)
4+
enum error-code {
5+
// TBD - some subset of wasi:filesystem/types.error-code
6+
}
7+
}
8+
19
@since(version = 0.3.0-rc-2025-08-15)
210
interface stdin {
311
@since(version = 0.3.0-rc-2025-08-15)
4-
get-stdin: func() -> stream<u8>;
12+
read-stdin: async func() -> tuple<stream<u8>, future<result<_, error-code>>>;
513
}
614

715
@since(version = 0.3.0-rc-2025-08-15)
816
interface stdout {
917
@since(version = 0.3.0-rc-2025-08-15)
10-
set-stdout: func(data: stream<u8>);
18+
append-stdout: async func(data: stream<u8>) -> result<_, error-code>;
1119
}
1220

1321
@since(version = 0.3.0-rc-2025-08-15)
1422
interface stderr {
1523
@since(version = 0.3.0-rc-2025-08-15)
16-
set-stderr: func(data: stream<u8>);
24+
append-stderr: async func(data: stream<u8>) -> result<_, error-code>;
1725
}

0 commit comments

Comments
 (0)