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

Commit e8e1b4c

Browse files
authored
Merge pull request #72 from WebAssembly/revert-71-pch/rc-2023-11-10
Revert " set wasi:sockets package version to 0.2.0-rc-2023-11-10"
2 parents 9fb0d63 + b8a2720 commit e8e1b4c

File tree

10 files changed

+66
-91
lines changed

10 files changed

+66
-91
lines changed

imports.md

Lines changed: 36 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
<ul>
33
<li>Imports:
44
<ul>
5-
<li>interface <a href="#wasi:sockets_network_0.2.0_rc_2023_11_10"><code>wasi:sockets/network@0.2.0-rc-2023-11-10</code></a></li>
6-
<li>interface <a href="#wasi:sockets_instance_network_0.2.0_rc_2023_11_10"><code>wasi:sockets/instance-network@0.2.0-rc-2023-11-10</code></a></li>
7-
<li>interface <a href="#wasi:io_poll_0.2.0_rc_2023_11_10"><code>wasi:io/poll@0.2.0-rc-2023-11-10</code></a></li>
8-
<li>interface <a href="#wasi:sockets_udp_0.2.0_rc_2023_11_10"><code>wasi:sockets/udp@0.2.0-rc-2023-11-10</code></a></li>
9-
<li>interface <a href="#wasi:sockets_udp_create_socket_0.2.0_rc_2023_11_10"><code>wasi:sockets/udp-create-socket@0.2.0-rc-2023-11-10</code></a></li>
10-
<li>interface <a href="#wasi:io_error_0.2.0_rc_2023_11_10"><code>wasi:io/error@0.2.0-rc-2023-11-10</code></a></li>
11-
<li>interface <a href="#wasi:io_streams_0.2.0_rc_2023_11_10"><code>wasi:io/streams@0.2.0-rc-2023-11-10</code></a></li>
12-
<li>interface <a href="#wasi:sockets_tcp_0.2.0_rc_2023_11_10"><code>wasi:sockets/tcp@0.2.0-rc-2023-11-10</code></a></li>
13-
<li>interface <a href="#wasi:sockets_tcp_create_socket_0.2.0_rc_2023_11_10"><code>wasi:sockets/tcp-create-socket@0.2.0-rc-2023-11-10</code></a></li>
14-
<li>interface <a href="#wasi:sockets_ip_name_lookup_0.2.0_rc_2023_11_10"><code>wasi:sockets/ip-name-lookup@0.2.0-rc-2023-11-10</code></a></li>
5+
<li>interface <a href="#wasi:sockets_network"><code>wasi:sockets/network</code></a></li>
6+
<li>interface <a href="#wasi:sockets_instance_network"><code>wasi:sockets/instance-network</code></a></li>
7+
<li>interface <a href="#wasi:io_poll"><code>wasi:io/poll</code></a></li>
8+
<li>interface <a href="#wasi:sockets_udp"><code>wasi:sockets/udp</code></a></li>
9+
<li>interface <a href="#wasi:sockets_udp_create_socket"><code>wasi:sockets/udp-create-socket</code></a></li>
10+
<li>interface <a href="#wasi:io_streams"><code>wasi:io/streams</code></a></li>
11+
<li>interface <a href="#wasi:sockets_tcp"><code>wasi:sockets/tcp</code></a></li>
12+
<li>interface <a href="#wasi:sockets_tcp_create_socket"><code>wasi:sockets/tcp-create-socket</code></a></li>
13+
<li>interface <a href="#wasi:sockets_ip_name_lookup"><code>wasi:sockets/ip-name-lookup</code></a></li>
1514
</ul>
1615
</li>
1716
</ul>
18-
<h2><a name="wasi:sockets_network_0.2.0_rc_2023_11_10">Import interface wasi:sockets/network@0.2.0-rc-2023-11-10</a></h2>
17+
<h2><a name="wasi:sockets_network">Import interface wasi:sockets/network</a></h2>
1918
<hr />
2019
<h3>Types</h3>
2120
<h4><a name="network"><code>resource network</code></a></h4>
@@ -226,7 +225,7 @@ combined with a couple of errors that are always possible:</p>
226225
<li><a name="ip_socket_address.ipv4"><code>ipv4</code></a>: <a href="#ipv4_socket_address"><a href="#ipv4_socket_address"><code>ipv4-socket-address</code></a></a></li>
227226
<li><a name="ip_socket_address.ipv6"><code>ipv6</code></a>: <a href="#ipv6_socket_address"><a href="#ipv6_socket_address"><code>ipv6-socket-address</code></a></a></li>
228227
</ul>
229-
<h2><a name="wasi:sockets_instance_network_0.2.0_rc_2023_11_10">Import interface wasi:sockets/instance-network@0.2.0-rc-2023-11-10</a></h2>
228+
<h2><a name="wasi:sockets_instance_network">Import interface wasi:sockets/instance-network</a></h2>
230229
<p>This interface provides a value-export of the default network handle..</p>
231230
<hr />
232231
<h3>Types</h3>
@@ -241,7 +240,7 @@ combined with a couple of errors that are always possible:</p>
241240
<ul>
242241
<li><a name="instance_network.0"></a> own&lt;<a href="#network"><a href="#network"><code>network</code></a></a>&gt;</li>
243242
</ul>
244-
<h2><a name="wasi:io_poll_0.2.0_rc_2023_11_10">Import interface wasi:io/poll@0.2.0-rc-2023-11-10</a></h2>
243+
<h2><a name="wasi:io_poll">Import interface wasi:io/poll</a></h2>
245244
<p>A poll API intended to let users wait for I/O events on multiple handles
246245
at once.</p>
247246
<hr />
@@ -291,7 +290,7 @@ being reaedy for I/O.</p>
291290
<ul>
292291
<li><a name="poll.0"></a> list&lt;<code>u32</code>&gt;</li>
293292
</ul>
294-
<h2><a name="wasi:sockets_udp_0.2.0_rc_2023_11_10">Import interface wasi:sockets/udp@0.2.0-rc-2023-11-10</a></h2>
293+
<h2><a name="wasi:sockets_udp">Import interface wasi:sockets/udp</a></h2>
295294
<hr />
296295
<h3>Types</h3>
297296
<h4><a name="pollable"><code>type pollable</code></a></h4>
@@ -653,7 +652,7 @@ It's planned to be removed when <code>future</code> is natively supported in Pre
653652
<ul>
654653
<li><a name="method_udp_socket.subscribe.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
655654
</ul>
656-
<h2><a name="wasi:sockets_udp_create_socket_0.2.0_rc_2023_11_10">Import interface wasi:sockets/udp-create-socket@0.2.0-rc-2023-11-10</a></h2>
655+
<h2><a name="wasi:sockets_udp_create_socket">Import interface wasi:sockets/udp-create-socket</a></h2>
657656
<hr />
658657
<h3>Types</h3>
659658
<h4><a name="network"><code>type network</code></a></h4>
@@ -698,41 +697,18 @@ the socket is effectively an in-memory configuration object, unable to communica
698697
<ul>
699698
<li><a name="create_udp_socket.0"></a> result&lt;own&lt;<a href="#udp_socket"><a href="#udp_socket"><code>udp-socket</code></a></a>&gt;, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
700699
</ul>
701-
<h2><a name="wasi:io_error_0.2.0_rc_2023_11_10">Import interface wasi:io/error@0.2.0-rc-2023-11-10</a></h2>
702-
<hr />
703-
<h3>Types</h3>
704-
<h4><a name="error"><code>resource error</code></a></h4>
705-
<hr />
706-
<h3>Functions</h3>
707-
<h4><a name="method_error.to_debug_string"><code>[method]error.to-debug-string: func</code></a></h4>
708-
<p>Returns a string that is suitable to assist humans in debugging
709-
this error.</p>
710-
<p>WARNING: The returned string should not be consumed mechanically!
711-
It may change across platforms, hosts, or other implementation
712-
details. Parsing this string is a major platform-compatibility
713-
hazard.</p>
714-
<h5>Params</h5>
715-
<ul>
716-
<li><a name="method_error.to_debug_string.self"><code>self</code></a>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
717-
</ul>
718-
<h5>Return values</h5>
719-
<ul>
720-
<li><a name="method_error.to_debug_string.0"></a> <code>string</code></li>
721-
</ul>
722-
<h2><a name="wasi:io_streams_0.2.0_rc_2023_11_10">Import interface wasi:io/streams@0.2.0-rc-2023-11-10</a></h2>
700+
<h2><a name="wasi:io_streams">Import interface wasi:io/streams</a></h2>
723701
<p>WASI I/O is an I/O abstraction API which is currently focused on providing
724702
stream types.</p>
725703
<p>In the future, the component model is expected to add built-in stream types;
726704
when it does, they are expected to subsume this API.</p>
727705
<hr />
728706
<h3>Types</h3>
729-
<h4><a name="error"><code>type error</code></a></h4>
730-
<p><a href="#error"><a href="#error"><code>error</code></a></a></p>
731-
<p>
732-
#### <a name="pollable">`type pollable`</a>
733-
[`pollable`](#pollable)
707+
<h4><a name="pollable"><code>type pollable</code></a></h4>
708+
<p><a href="#pollable"><a href="#pollable"><code>pollable</code></a></a></p>
734709
<p>
735-
#### <a name="stream_error">`variant stream-error`</a>
710+
#### <a name="error">`resource error`</a>
711+
<h4><a name="stream_error"><code>variant stream-error</code></a></h4>
736712
<p>An error for input-stream and output-stream operations.</p>
737713
<h5>Variant Cases</h5>
738714
<ul>
@@ -752,6 +728,20 @@ future operations.
752728
<h4><a name="output_stream"><code>resource output-stream</code></a></h4>
753729
<hr />
754730
<h3>Functions</h3>
731+
<h4><a name="method_error.to_debug_string"><code>[method]error.to-debug-string: func</code></a></h4>
732+
<p>Returns a string that's suitable to assist humans in debugging this
733+
error.</p>
734+
<p>The returned string will change across platforms and hosts which
735+
means that parsing it, for example, would be a
736+
platform-compatibility hazard.</p>
737+
<h5>Params</h5>
738+
<ul>
739+
<li><a name="method_error.to_debug_string.self"><code>self</code></a>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
740+
</ul>
741+
<h5>Return values</h5>
742+
<ul>
743+
<li><a name="method_error.to_debug_string.0"></a> <code>string</code></li>
744+
</ul>
755745
<h4><a name="method_input_stream.read"><code>[method]input-stream.read: func</code></a></h4>
756746
<p>Perform a non-blocking read from the stream.</p>
757747
<p>This function returns a list of bytes containing the read data,
@@ -1022,7 +1012,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
10221012
<ul>
10231013
<li><a name="method_output_stream.blocking_splice.0"></a> result&lt;<code>u64</code>, <a href="#stream_error"><a href="#stream_error"><code>stream-error</code></a></a>&gt;</li>
10241014
</ul>
1025-
<h2><a name="wasi:sockets_tcp_0.2.0_rc_2023_11_10">Import interface wasi:sockets/tcp@0.2.0-rc-2023-11-10</a></h2>
1015+
<h2><a name="wasi:sockets_tcp">Import interface wasi:sockets/tcp</a></h2>
10261016
<hr />
10271017
<h3>Types</h3>
10281018
<h4><a name="input_stream"><code>type input-stream</code></a></h4>
@@ -1502,7 +1492,7 @@ operations on the <a href="#output_stream"><code>output-stream</code></a> associ
15021492
<ul>
15031493
<li><a name="method_tcp_socket.shutdown.0"></a> result&lt;_, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
15041494
</ul>
1505-
<h2><a name="wasi:sockets_tcp_create_socket_0.2.0_rc_2023_11_10">Import interface wasi:sockets/tcp-create-socket@0.2.0-rc-2023-11-10</a></h2>
1495+
<h2><a name="wasi:sockets_tcp_create_socket">Import interface wasi:sockets/tcp-create-socket</a></h2>
15061496
<hr />
15071497
<h3>Types</h3>
15081498
<h4><a name="network"><code>type network</code></a></h4>
@@ -1547,7 +1537,7 @@ is called, the socket is effectively an in-memory configuration object, unable t
15471537
<ul>
15481538
<li><a name="create_tcp_socket.0"></a> result&lt;own&lt;<a href="#tcp_socket"><a href="#tcp_socket"><code>tcp-socket</code></a></a>&gt;, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
15491539
</ul>
1550-
<h2><a name="wasi:sockets_ip_name_lookup_0.2.0_rc_2023_11_10">Import interface wasi:sockets/ip-name-lookup@0.2.0-rc-2023-11-10</a></h2>
1540+
<h2><a name="wasi:sockets_ip_name_lookup">Import interface wasi:sockets/ip-name-lookup</a></h2>
15511541
<hr />
15521542
<h3>Types</h3>
15531543
<h4><a name="pollable"><code>type pollable</code></a></h4>

wit/deps.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[io]
22
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
3-
sha256 = "f2e6127b235c37c06be675a904d6acf08db953ea688d78c42892c6ad3bd194e4"
4-
sha512 = "32feefbc115c34bf6968cb6e9dc15e755698ee90648e5a5d84448917c36a318bd61b401195eb64330e2475e1d098bfb8dee1440d594a68e0797748762bd84ae5"
3+
sha256 = "fb76f4449eea54d06b56fc6a7ca988da51bd84a54d2021cf18da67b5e2c7ebcf"
4+
sha512 = "c005e2a91522958a9537827a49ae344e1cb39d66e85492901a86bcc7e322ba8d0a7f1a02c9b9f840c123b4ad97e297355fac98d4822536d1426d1096dd1d73ac"

wit/deps/io/error.wit

Lines changed: 0 additions & 34 deletions
This file was deleted.

wit/deps/io/poll.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.0-rc-2023-11-10;
1+
package wasi:io;
22

33
/// A poll API intended to let users wait for I/O events on multiple handles
44
/// at once.

wit/deps/io/streams.wit

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
package wasi:io@0.2.0-rc-2023-11-10;
1+
package wasi:io;
22

33
/// WASI I/O is an I/O abstraction API which is currently focused on providing
44
/// stream types.
55
///
66
/// In the future, the component model is expected to add built-in stream types;
77
/// when it does, they are expected to subsume this API.
88
interface streams {
9-
use error.{error};
109
use poll.{pollable};
1110

1211
/// An error for input-stream and output-stream operations.
@@ -21,6 +20,26 @@ interface streams {
2120
closed
2221
}
2322

23+
/// Contextual error information about the last failure that happened on
24+
/// a read, write, or flush from an `input-stream` or `output-stream`.
25+
///
26+
/// This type is returned through the `stream-error` type whenever an
27+
/// operation on a stream directly fails or an error is discovered
28+
/// after-the-fact, for example when a write's failure shows up through a
29+
/// later `flush` or `check-write`.
30+
///
31+
/// Interfaces such as `wasi:filesystem/types` provide functionality to
32+
/// further "downcast" this error into interface-specific error information.
33+
resource error {
34+
/// Returns a string that's suitable to assist humans in debugging this
35+
/// error.
36+
///
37+
/// The returned string will change across platforms and hosts which
38+
/// means that parsing it, for example, would be a
39+
/// platform-compatibility hazard.
40+
to-debug-string: func() -> string;
41+
}
42+
2443
/// An input bytestream.
2544
///
2645
/// `input-stream`s are *non-blocking* to the extent practical on underlying

wit/deps/io/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.0-rc-2023-11-10;
1+
package wasi:io;
22

33
world imports {
44
import streams;

wit/ip-name-lookup.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
interface ip-name-lookup {
3-
use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
3+
use wasi:io/poll.{pollable};
44
use network.{network, error-code, ip-address, ip-address-family};
55

66

wit/tcp.wit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
interface tcp {
3-
use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream, output-stream};
4-
use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
3+
use wasi:io/streams.{input-stream, output-stream};
4+
use wasi:io/poll.{pollable};
55
use network.{network, error-code, ip-socket-address, ip-address-family};
66

77
enum shutdown-type {

wit/udp.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
interface udp {
3-
use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
3+
use wasi:io/poll.{pollable};
44
use network.{network, error-code, ip-socket-address, ip-address-family};
55

66

wit/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:sockets@0.2.0-rc-2023-11-10;
1+
package wasi:sockets;
22

33
world imports {
44
import instance-network;

0 commit comments

Comments
 (0)