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

Commit 9fb0d63

Browse files
authored
Merge pull request #71 from WebAssembly/pch/rc-2023-11-10
set wasi:sockets package version to 0.2.0-rc-2023-11-10
2 parents ecce14c + 33c5191 commit 9fb0d63

File tree

10 files changed

+91
-66
lines changed

10 files changed

+91
-66
lines changed

imports.md

Lines changed: 46 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
<ul>
33
<li>Imports:
44
<ul>
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>
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>
1415
</ul>
1516
</li>
1617
</ul>
17-
<h2><a name="wasi:sockets_network">Import interface wasi:sockets/network</a></h2>
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>
1819
<hr />
1920
<h3>Types</h3>
2021
<h4><a name="network"><code>resource network</code></a></h4>
@@ -225,7 +226,7 @@ combined with a couple of errors that are always possible:</p>
225226
<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>
226227
<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>
227228
</ul>
228-
<h2><a name="wasi:sockets_instance_network">Import interface wasi:sockets/instance-network</a></h2>
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>
229230
<p>This interface provides a value-export of the default network handle..</p>
230231
<hr />
231232
<h3>Types</h3>
@@ -240,7 +241,7 @@ combined with a couple of errors that are always possible:</p>
240241
<ul>
241242
<li><a name="instance_network.0"></a> own&lt;<a href="#network"><a href="#network"><code>network</code></a></a>&gt;</li>
242243
</ul>
243-
<h2><a name="wasi:io_poll">Import interface wasi:io/poll</a></h2>
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>
244245
<p>A poll API intended to let users wait for I/O events on multiple handles
245246
at once.</p>
246247
<hr />
@@ -290,7 +291,7 @@ being reaedy for I/O.</p>
290291
<ul>
291292
<li><a name="poll.0"></a> list&lt;<code>u32</code>&gt;</li>
292293
</ul>
293-
<h2><a name="wasi:sockets_udp">Import interface wasi:sockets/udp</a></h2>
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>
294295
<hr />
295296
<h3>Types</h3>
296297
<h4><a name="pollable"><code>type pollable</code></a></h4>
@@ -652,7 +653,7 @@ It's planned to be removed when <code>future</code> is natively supported in Pre
652653
<ul>
653654
<li><a name="method_udp_socket.subscribe.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
654655
</ul>
655-
<h2><a name="wasi:sockets_udp_create_socket">Import interface wasi:sockets/udp-create-socket</a></h2>
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>
656657
<hr />
657658
<h3>Types</h3>
658659
<h4><a name="network"><code>type network</code></a></h4>
@@ -697,18 +698,41 @@ the socket is effectively an in-memory configuration object, unable to communica
697698
<ul>
698699
<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>
699700
</ul>
700-
<h2><a name="wasi:io_streams">Import interface wasi:io/streams</a></h2>
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>
701723
<p>WASI I/O is an I/O abstraction API which is currently focused on providing
702724
stream types.</p>
703725
<p>In the future, the component model is expected to add built-in stream types;
704726
when it does, they are expected to subsume this API.</p>
705727
<hr />
706728
<h3>Types</h3>
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>
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)
709734
<p>
710-
#### <a name="error">`resource error`</a>
711-
<h4><a name="stream_error"><code>variant stream-error</code></a></h4>
735+
#### <a name="stream_error">`variant stream-error`</a>
712736
<p>An error for input-stream and output-stream operations.</p>
713737
<h5>Variant Cases</h5>
714738
<ul>
@@ -728,20 +752,6 @@ future operations.
728752
<h4><a name="output_stream"><code>resource output-stream</code></a></h4>
729753
<hr />
730754
<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>
745755
<h4><a name="method_input_stream.read"><code>[method]input-stream.read: func</code></a></h4>
746756
<p>Perform a non-blocking read from the stream.</p>
747757
<p>This function returns a list of bytes containing the read data,
@@ -1012,7 +1022,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
10121022
<ul>
10131023
<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>
10141024
</ul>
1015-
<h2><a name="wasi:sockets_tcp">Import interface wasi:sockets/tcp</a></h2>
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>
10161026
<hr />
10171027
<h3>Types</h3>
10181028
<h4><a name="input_stream"><code>type input-stream</code></a></h4>
@@ -1492,7 +1502,7 @@ operations on the <a href="#output_stream"><code>output-stream</code></a> associ
14921502
<ul>
14931503
<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>
14941504
</ul>
1495-
<h2><a name="wasi:sockets_tcp_create_socket">Import interface wasi:sockets/tcp-create-socket</a></h2>
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>
14961506
<hr />
14971507
<h3>Types</h3>
14981508
<h4><a name="network"><code>type network</code></a></h4>
@@ -1537,7 +1547,7 @@ is called, the socket is effectively an in-memory configuration object, unable t
15371547
<ul>
15381548
<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>
15391549
</ul>
1540-
<h2><a name="wasi:sockets_ip_name_lookup">Import interface wasi:sockets/ip-name-lookup</a></h2>
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>
15411551
<hr />
15421552
<h3>Types</h3>
15431553
<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 = "fb76f4449eea54d06b56fc6a7ca988da51bd84a54d2021cf18da67b5e2c7ebcf"
4-
sha512 = "c005e2a91522958a9537827a49ae344e1cb39d66e85492901a86bcc7e322ba8d0a7f1a02c9b9f840c123b4ad97e297355fac98d4822536d1426d1096dd1d73ac"
3+
sha256 = "f2e6127b235c37c06be675a904d6acf08db953ea688d78c42892c6ad3bd194e4"
4+
sha512 = "32feefbc115c34bf6968cb6e9dc15e755698ee90648e5a5d84448917c36a318bd61b401195eb64330e2475e1d098bfb8dee1440d594a68e0797748762bd84ae5"

wit/deps/io/error.wit

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package wasi:io@0.2.0-rc-2023-11-10;
2+
3+
4+
interface error {
5+
/// A resource which represents some error information.
6+
///
7+
/// The only method provided by this resource is `to-debug-string`,
8+
/// which provides some human-readable information about the error.
9+
///
10+
/// In the `wasi:io` package, this resource is returned through the
11+
/// `wasi:io/streams/stream-error` type.
12+
///
13+
/// To provide more specific error information, other interfaces may
14+
/// provide functions to further "downcast" this error into more specific
15+
/// error information. For example, `error`s returned in streams derived
16+
/// from filesystem types to be described using the filesystem's own
17+
/// error-code type, using the function
18+
/// `wasi:filesystem/types/filesystem-error-code`, which takes a parameter
19+
/// `borrow<error>` and returns
20+
/// `option<wasi:filesystem/types/error-code>`.
21+
///
22+
/// The set of functions which can "downcast" an `error` into a more
23+
/// concrete type is open.
24+
resource error {
25+
/// Returns a string that is suitable to assist humans in debugging
26+
/// this error.
27+
///
28+
/// WARNING: The returned string should not be consumed mechanically!
29+
/// It may change across platforms, hosts, or other implementation
30+
/// details. Parsing this string is a major platform-compatibility
31+
/// hazard.
32+
to-debug-string: func() -> string;
33+
}
34+
}

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;
1+
package wasi:io@0.2.0-rc-2023-11-10;
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: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
package wasi:io;
1+
package wasi:io@0.2.0-rc-2023-11-10;
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};
910
use poll.{pollable};
1011

1112
/// An error for input-stream and output-stream operations.
@@ -20,26 +21,6 @@ interface streams {
2021
closed
2122
}
2223

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-
4324
/// An input bytestream.
4425
///
4526
/// `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;
1+
package wasi:io@0.2.0-rc-2023-11-10;
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.{pollable};
3+
use wasi:io/poll@0.2.0-rc-2023-11-10.{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.{input-stream, output-stream};
4-
use wasi:io/poll.{pollable};
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};
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.{pollable};
3+
use wasi:io/poll@0.2.0-rc-2023-11-10.{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;
1+
package wasi:sockets@0.2.0-rc-2023-11-10;
22

33
world imports {
44
import instance-network;

0 commit comments

Comments
 (0)