Skip to content

Commit 9089cbd

Browse files
authored
Merge pull request #188 from WebAssembly/revert-186-update-wit-0.3.0-rc-2025-09-16
Revert "Update 0.3.0 WIT definitions to 0.3.0-rc-2025-09-16"
2 parents 4f28d09 + fa963a4 commit 9089cbd

File tree

5 files changed

+13
-55
lines changed

5 files changed

+13
-55
lines changed

wit-0.3.0-draft/deps.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[cli]
22
url = "https://github.com/WebAssembly/wasi-cli/archive/main.tar.gz"
33
subdir = "wit-0.3.0-draft"
4-
sha256 = "5ff03c236a6fed89d2968c3fd5d9e2b3f4fcd7a606dc94ead51df5357bdabe76"
5-
sha512 = "d0277a9b3692de917ef8b1bbe6be9247157d548962dde181b159788064a06513c6f6d775fcca94a3170fe2149ca75d609664938716f4dc877ef65cd7db07eb76"
4+
sha256 = "7f9cf181100ca1cadcb49a1efa3e80828d375df2d5ddf10a8f66e848d423aea5"
5+
sha512 = "569f6b4ed2a3bec913e5e06fd35caab564048cf31632795c2fbdd8c40ddb5f5eea7b1cc59d33c80e5d7b642ed246ba4a3e40d3edeaaa2c6a5c4bcd02e0b67212"
66
deps = ["clocks", "filesystem", "random", "sockets"]
77

88
[clocks]

wit-0.3.0-draft/deps/cli/run.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
interface run {
33
/// Run the program.
44
@since(version = 0.3.0-rc-2025-08-15)
5-
run: async func() -> result;
5+
run: func() -> result;
66
}

wit-0.3.0-draft/deps/cli/stdio.wit

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,17 @@
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-
/// Input/output error
6-
io,
7-
/// Invalid or incomplete multibyte or wide character
8-
illegal-byte-sequence,
9-
/// Broken pipe
10-
pipe,
11-
}
12-
}
13-
141
@since(version = 0.3.0-rc-2025-08-15)
152
interface stdin {
16-
/// Return a stream for reading from stdin.
17-
///
18-
/// This function returns a stream which provides data read from stdin,
19-
/// and a future to signal read results.
20-
///
21-
/// If the stream's readable end is dropped the future will resolve to success.
22-
///
23-
/// If the stream's writable end is dropped the future will either resolve to
24-
/// success if stdin was closed by the writer or to an error-code if reading
25-
/// failed for some other reason.
26-
///
27-
/// Multiple streams may be active at the same time. The behavior of concurrent
28-
/// reads is implementation-specific.
293
@since(version = 0.3.0-rc-2025-08-15)
30-
read-via-stream: func() -> tuple<stream<u8>, future<result<_, error-code>>>;
4+
get-stdin: func() -> stream<u8>;
315
}
326

337
@since(version = 0.3.0-rc-2025-08-15)
348
interface stdout {
35-
/// Write the given stream to stdout.
36-
///
37-
/// If the stream's writable end is dropped this function will either return
38-
/// success once the entire contents of the stream have been written or an
39-
/// error-code representing a failure.
40-
///
41-
/// Otherwise if there is an error the readable end of the stream will be
42-
/// dropped and this function will return an error-code.
439
@since(version = 0.3.0-rc-2025-08-15)
44-
write-via-stream: async func(data: stream<u8>) -> result<_, error-code>;
10+
set-stdout: func(data: stream<u8>);
4511
}
4612

4713
@since(version = 0.3.0-rc-2025-08-15)
4814
interface stderr {
49-
/// Write the given stream to stderr.
50-
///
51-
/// If the stream's writable end is dropped this function will either return
52-
/// success once the entire contents of the stream have been written or an
53-
/// error-code representing a failure.
54-
///
55-
/// Otherwise if there is an error the readable end of the stream will be
56-
/// dropped and this function will return an error-code.
5715
@since(version = 0.3.0-rc-2025-08-15)
58-
write-via-stream: async func(data: stream<u8>) -> result<_, error-code>;
16+
set-stderr: func(data: stream<u8>);
5917
}

wit-0.3.0-draft/proxy.wit

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
package wasi:http@0.3.0-rc-2025-09-16;
1+
package wasi:http@0.3.0-rc-2025-08-15;
22

33
/// The `wasi:http/imports` world imports all the APIs for HTTP proxies.
44
/// It is intended to be `include`d in other worlds.
55
world imports {
66
/// HTTP proxies have access to time and randomness.
7-
include wasi:clocks/imports@0.3.0-rc-2025-09-16;
8-
import wasi:random/random@0.3.0-rc-2025-09-16;
7+
include wasi:clocks/imports@0.3.0-rc-2025-08-15;
8+
import wasi:random/random@0.3.0-rc-2025-08-15;
99

1010
/// Proxies have standard output and error streams which are expected to
1111
/// terminate in a developer-facing console provided by the host.
12-
import wasi:cli/stdout@0.3.0-rc-2025-09-16;
13-
import wasi:cli/stderr@0.3.0-rc-2025-09-16;
12+
import wasi:cli/stdout@0.3.0-rc-2025-08-15;
13+
import wasi:cli/stderr@0.3.0-rc-2025-08-15;
1414

1515
/// TODO: this is a temporary workaround until component tooling is able to
1616
/// gracefully handle the absence of stdin. Hosts must return an eof stream
1717
/// for this import, which is what wasi-libc + tooling will do automatically
1818
/// when this import is properly removed.
19-
import wasi:cli/stdin@0.3.0-rc-2025-09-16;
19+
import wasi:cli/stdin@0.3.0-rc-2025-08-15;
2020

2121
/// This is the default handler to use when user code simply wants to make an
2222
/// HTTP request (e.g., via `fetch()`).

wit-0.3.0-draft/types.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// This interface defines all of the types and methods for implementing HTTP
22
/// Requests and Responses, as well as their headers, trailers, and bodies.
33
interface types {
4-
use wasi:clocks/monotonic-clock@0.3.0-rc-2025-09-16.{duration};
4+
use wasi:clocks/monotonic-clock@0.3.0-rc-2025-08-15.{duration};
55

66
/// This type corresponds to HTTP standard Methods.
77
variant method {

0 commit comments

Comments
 (0)