Skip to content

Commit 4728257

Browse files
github-actions[bot]ricochet
authored andcommitted
Update to v0.2.4
1 parent 048a2cc commit 4728257

File tree

15 files changed

+109
-87
lines changed

15 files changed

+109
-87
lines changed

imports.md

Lines changed: 77 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,60 @@
22
<ul>
33
<li>Imports:
44
<ul>
5-
<li>interface <a href="#wasi_sockets_network_0_2_3"><code>wasi:sockets/network@0.2.3</code></a></li>
6-
<li>interface <a href="#wasi_sockets_instance_network_0_2_3"><code>wasi:sockets/instance-[email protected].3</code></a></li>
7-
<li>interface <a href="#wasi_io_poll_0_2_3"><code>wasi:io/poll@0.2.3</code></a></li>
8-
<li>interface <a href="#wasi_sockets_udp_0_2_3"><code>wasi:sockets/udp@0.2.3</code></a></li>
9-
<li>interface <a href="#wasi_sockets_udp_create_socket_0_2_3"><code>wasi:sockets/udp-create-socket@0.2.3</code></a></li>
10-
<li>interface <a href="#wasi_io_error_0_2_3"><code>wasi:io/error@0.2.3</code></a></li>
11-
<li>interface <a href="#wasi_io_streams_0_2_3"><code>wasi:io/[email protected].3</code></a></li>
12-
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_3"><code>wasi:clocks/[email protected].3</code></a></li>
13-
<li>interface <a href="#wasi_sockets_tcp_0_2_3"><code>wasi:sockets/[email protected].3</code></a></li>
14-
<li>interface <a href="#wasi_sockets_tcp_create_socket_0_2_3"><code>wasi:sockets/[email protected].3</code></a></li>
15-
<li>interface <a href="#wasi_sockets_ip_name_lookup_0_2_3"><code>wasi:sockets/[email protected].3</code></a></li>
5+
<li>interface <a href="#wasi_io_error_0_2_4"><code>wasi:io/error@0.2.4</code></a></li>
6+
<li>interface <a href="#wasi_sockets_network_0_2_4"><code>wasi:sockets/[email protected].4</code></a></li>
7+
<li>interface <a href="#wasi_sockets_instance_network_0_2_4"><code>wasi:sockets/instance-network@0.2.4</code></a></li>
8+
<li>interface <a href="#wasi_io_poll_0_2_4"><code>wasi:io/poll@0.2.4</code></a></li>
9+
<li>interface <a href="#wasi_sockets_udp_0_2_4"><code>wasi:sockets/[email protected].4</code></a></li>
10+
<li>interface <a href="#wasi_sockets_udp_create_socket_0_2_4"><code>wasi:sockets/udp-create-socket@0.2.4</code></a></li>
11+
<li>interface <a href="#wasi_io_streams_0_2_4"><code>wasi:io/[email protected].4</code></a></li>
12+
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_4"><code>wasi:clocks/[email protected].4</code></a></li>
13+
<li>interface <a href="#wasi_sockets_tcp_0_2_4"><code>wasi:sockets/[email protected].4</code></a></li>
14+
<li>interface <a href="#wasi_sockets_tcp_create_socket_0_2_4"><code>wasi:sockets/[email protected].4</code></a></li>
15+
<li>interface <a href="#wasi_sockets_ip_name_lookup_0_2_4"><code>wasi:sockets/[email protected].4</code></a></li>
1616
</ul>
1717
</li>
1818
</ul>
19-
<h2><a id="wasi_sockets_network_0_2_3"></a>Import interface wasi:sockets/network@0.2.3</h2>
19+
<h2><a id="wasi_io_error_0_2_4"></a>Import interface wasi:io/error@0.2.4</h2>
2020
<hr />
2121
<h3>Types</h3>
22-
<h4><a id="network"></a><code>resource network</code></h4>
22+
<h4><a id="error"></a><code>resource error</code></h4>
23+
<p>A resource which represents some error information.</p>
24+
<p>The only method provided by this resource is <code>to-debug-string</code>,
25+
which provides some human-readable information about the error.</p>
26+
<p>In the <code>wasi:io</code> package, this resource is returned through the
27+
<code>wasi:io/streams/stream-error</code> type.</p>
28+
<p>To provide more specific error information, other interfaces may
29+
offer functions to &quot;downcast&quot; this error into more specific types. For example,
30+
errors returned from streams derived from filesystem types can be described using
31+
the filesystem's own error-code type. This is done using the function
32+
<code>wasi:filesystem/types/filesystem-error-code</code>, which takes a <code>borrow&lt;error&gt;</code>
33+
parameter and returns an <code>option&lt;wasi:filesystem/types/error-code&gt;</code>.</p>
34+
<h2>The set of functions which can &quot;downcast&quot; an <a href="#error"><code>error</code></a> into a more
35+
concrete type is open.</h2>
36+
<h3>Functions</h3>
37+
<h4><a id="method_error_to_debug_string"></a><code>[method]error.to-debug-string: func</code></h4>
38+
<p>Returns a string that is suitable to assist humans in debugging
39+
this error.</p>
40+
<p>WARNING: The returned string should not be consumed mechanically!
41+
It may change across platforms, hosts, or other implementation
42+
details. Parsing this string is a major platform-compatibility
43+
hazard.</p>
44+
<h5>Params</h5>
45+
<ul>
46+
<li><a id="method_error_to_debug_string.self"></a><code>self</code>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
47+
</ul>
48+
<h5>Return values</h5>
49+
<ul>
50+
<li><a id="method_error_to_debug_string.0"></a> <code>string</code></li>
51+
</ul>
52+
<h2><a id="wasi_sockets_network_0_2_4"></a>Import interface wasi:sockets/[email protected]</h2>
53+
<hr />
54+
<h3>Types</h3>
55+
<h4><a id="error"></a><code>type error</code></h4>
56+
<p><a href="#error"><a href="#error"><code>error</code></a></a></p>
57+
<p>
58+
#### <a id="network"></a>`resource network`
2359
<p>An opaque resource that represents access to (a subset of) the network.
2460
This enables context-based security for networking.
2561
There is no need for this to map 1:1 to a physical network interface.</p>
@@ -209,7 +245,26 @@ supported size.
209245
<li><a id="ip_socket_address.ipv4"></a><code>ipv4</code>: <a href="#ipv4_socket_address"><a href="#ipv4_socket_address"><code>ipv4-socket-address</code></a></a></li>
210246
<li><a id="ip_socket_address.ipv6"></a><code>ipv6</code>: <a href="#ipv6_socket_address"><a href="#ipv6_socket_address"><code>ipv6-socket-address</code></a></a></li>
211247
</ul>
212-
<h2><a id="wasi_sockets_instance_network_0_2_3"></a>Import interface wasi:sockets/[email protected]</h2>
248+
<hr />
249+
<h3>Functions</h3>
250+
<h4><a id="network_error_code"></a><code>network-error-code: func</code></h4>
251+
<p>Attempts to extract a network-related <a href="#error_code"><code>error-code</code></a> from the stream
252+
<a href="#error"><code>error</code></a> provided.</p>
253+
<p>Stream operations which return <a href="#stream_error.last_operation_failed"><code>stream-error::last-operation-failed</code></a>
254+
have a payload with more information about the operation that failed.
255+
This payload can be passed through to this function to see if there's
256+
network-related information about the error to return.</p>
257+
<p>Note that this function is fallible because not all stream-related
258+
errors are network-related errors.</p>
259+
<h5>Params</h5>
260+
<ul>
261+
<li><a id="network_error_code.err"></a><code>err</code>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
262+
</ul>
263+
<h5>Return values</h5>
264+
<ul>
265+
<li><a id="network_error_code.0"></a> option&lt;<a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
266+
</ul>
267+
<h2><a id="wasi_sockets_instance_network_0_2_4"></a>Import interface wasi:sockets/[email protected]</h2>
213268
<p>This interface provides a value-export of the default network handle..</p>
214269
<hr />
215270
<h3>Types</h3>
@@ -224,7 +279,7 @@ supported size.
224279
<ul>
225280
<li><a id="instance_network.0"></a> own&lt;<a href="#network"><a href="#network"><code>network</code></a></a>&gt;</li>
226281
</ul>
227-
<h2><a id="wasi_io_poll_0_2_3"></a>Import interface wasi:io/[email protected].3</h2>
282+
<h2><a id="wasi_io_poll_0_2_4"></a>Import interface wasi:io/[email protected].4</h2>
228283
<p>A poll API intended to let users wait for I/O events on multiple handles
229284
at once.</p>
230285
<hr />
@@ -277,7 +332,7 @@ being ready for I/O.</p>
277332
<ul>
278333
<li><a id="poll.0"></a> list&lt;<code>u32</code>&gt;</li>
279334
</ul>
280-
<h2><a id="wasi_sockets_udp_0_2_3"></a>Import interface wasi:sockets/[email protected].3</h2>
335+
<h2><a id="wasi_sockets_udp_0_2_4"></a>Import interface wasi:sockets/[email protected].4</h2>
281336
<hr />
282337
<h3>Types</h3>
283338
<h4><a id="pollable"></a><code>type pollable</code></h4>
@@ -691,7 +746,7 @@ It's planned to be removed when <code>future</code> is natively supported in Pre
691746
<ul>
692747
<li><a id="method_outgoing_datagram_stream_subscribe.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
693748
</ul>
694-
<h2><a id="wasi_sockets_udp_create_socket_0_2_3"></a>Import interface wasi:sockets/[email protected].3</h2>
749+
<h2><a id="wasi_sockets_udp_create_socket_0_2_4"></a>Import interface wasi:sockets/[email protected].4</h2>
695750
<hr />
696751
<h3>Types</h3>
697752
<h4><a id="network"></a><code>type network</code></h4>
@@ -736,40 +791,7 @@ the socket is effectively an in-memory configuration object, unable to communica
736791
<ul>
737792
<li><a id="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>
738793
</ul>
739-
<h2><a id="wasi_io_error_0_2_3"></a>Import interface wasi:io/[email protected]</h2>
740-
<hr />
741-
<h3>Types</h3>
742-
<h4><a id="error"></a><code>resource error</code></h4>
743-
<p>A resource which represents some error information.</p>
744-
<p>The only method provided by this resource is <code>to-debug-string</code>,
745-
which provides some human-readable information about the error.</p>
746-
<p>In the <code>wasi:io</code> package, this resource is returned through the
747-
<code>wasi:io/streams/stream-error</code> type.</p>
748-
<p>To provide more specific error information, other interfaces may
749-
offer functions to &quot;downcast&quot; this error into more specific types. For example,
750-
errors returned from streams derived from filesystem types can be described using
751-
the filesystem's own error-code type. This is done using the function
752-
<code>wasi:filesystem/types/filesystem-error-code</code>, which takes a <code>borrow&lt;error&gt;</code>
753-
parameter and returns an <code>option&lt;wasi:filesystem/types/error-code&gt;</code>.</p>
754-
<h2>The set of functions which can &quot;downcast&quot; an <a href="#error"><code>error</code></a> into a more
755-
concrete type is open.</h2>
756-
<h3>Functions</h3>
757-
<h4><a id="method_error_to_debug_string"></a><code>[method]error.to-debug-string: func</code></h4>
758-
<p>Returns a string that is suitable to assist humans in debugging
759-
this error.</p>
760-
<p>WARNING: The returned string should not be consumed mechanically!
761-
It may change across platforms, hosts, or other implementation
762-
details. Parsing this string is a major platform-compatibility
763-
hazard.</p>
764-
<h5>Params</h5>
765-
<ul>
766-
<li><a id="method_error_to_debug_string.self"></a><code>self</code>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
767-
</ul>
768-
<h5>Return values</h5>
769-
<ul>
770-
<li><a id="method_error_to_debug_string.0"></a> <code>string</code></li>
771-
</ul>
772-
<h2><a id="wasi_io_streams_0_2_3"></a>Import interface wasi:io/[email protected]</h2>
794+
<h2><a id="wasi_io_streams_0_2_4"></a>Import interface wasi:io/[email protected]</h2>
773795
<p>WASI I/O is an I/O abstraction API which is currently focused on providing
774796
stream types.</p>
775797
<p>In the future, the component model is expected to add built-in stream types;
@@ -1099,7 +1121,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
10991121
<ul>
11001122
<li><a id="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>
11011123
</ul>
1102-
<h2><a id="wasi_clocks_monotonic_clock_0_2_3"></a>Import interface wasi:clocks/[email protected].3</h2>
1124+
<h2><a id="wasi_clocks_monotonic_clock_0_2_4"></a>Import interface wasi:clocks/[email protected].4</h2>
11031125
<p>WASI Monotonic Clock is a clock API intended to let users measure elapsed
11041126
time.</p>
11051127
<p>It is intended to be portable at least between Unix-family platforms and
@@ -1158,7 +1180,7 @@ elapsed from the time this function is invoked.</p>
11581180
<ul>
11591181
<li><a id="subscribe_duration.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
11601182
</ul>
1161-
<h2><a id="wasi_sockets_tcp_0_2_3"></a>Import interface wasi:sockets/[email protected].3</h2>
1183+
<h2><a id="wasi_sockets_tcp_0_2_4"></a>Import interface wasi:sockets/[email protected].4</h2>
11621184
<hr />
11631185
<h3>Types</h3>
11641186
<h4><a id="input_stream"></a><code>type input-stream</code></h4>
@@ -1749,7 +1771,7 @@ has no effect and returns <code>ok</code>.</p>
17491771
<ul>
17501772
<li><a id="method_tcp_socket_shutdown.0"></a> result&lt;_, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
17511773
</ul>
1752-
<h2><a id="wasi_sockets_tcp_create_socket_0_2_3"></a>Import interface wasi:sockets/[email protected].3</h2>
1774+
<h2><a id="wasi_sockets_tcp_create_socket_0_2_4"></a>Import interface wasi:sockets/[email protected].4</h2>
17531775
<hr />
17541776
<h3>Types</h3>
17551777
<h4><a id="network"></a><code>type network</code></h4>
@@ -1794,7 +1816,7 @@ is called, the socket is effectively an in-memory configuration object, unable t
17941816
<ul>
17951817
<li><a id="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>
17961818
</ul>
1797-
<h2><a id="wasi_sockets_ip_name_lookup_0_2_3"></a>Import interface wasi:sockets/[email protected].3</h2>
1819+
<h2><a id="wasi_sockets_ip_name_lookup_0_2_4"></a>Import interface wasi:sockets/[email protected].4</h2>
17981820
<hr />
17991821
<h3>Types</h3>
18001822
<h4><a id="pollable"></a><code>type pollable</code></h4>

wit/deps.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[clocks]
22
url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
3-
sha256 = "93a701968a7dd3c5d69031bc0601681c468972fdf7e28a93bb6150a67d6ebe8b"
4-
sha512 = "98fca567c7a01887b0fb38981f1772169b6ea8de475b546508f8b86738d84e44ba95cae81def40ac34e8809f5f60e85224077ab8cb6d6d5d6296acc1df73c159"
3+
sha256 = "fc36267c5098ad9ac6455396b27c8ef206ca23cae74f40bd44c57be68e7849b6"
4+
sha512 = "0deed3d3a86f284adda7991cd24c0c4aab806ba2e0cb111da80d7f99c05f10793a602b28451407cad58ab762997f60c0f6d173e919e4a0988773b455d3a410d3"
55

66
[io]
77
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
8-
sha256 = "1cccbfe4122686ea57a25cd368e8cdfc408cbcad089f47fb6685b6f92e96f050"
9-
sha512 = "7a95f964c13da52611141acd89bc8876226497f128e99dd176a4270c5b5efbd8cc847b5fbd1a91258d028c646db99e0424d72590cf1caf20f9f3a3343fad5017"
8+
sha256 = "770a73d479cda8e4c4064dd4006d2654ebcc358952079d74e41af27cf26bddbf"
9+
sha512 = "b790f9750ac6782d9aaaa379845600b66dbde14ecee42f159c29796447eb8e61ee61f3b306e92622993b5e25298834b6ff62d7d9a04f8f18c05f07eda8f47ae0"

wit/deps/clocks/monotonic-clock.wit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.3;
1+
package wasi:clocks@0.2.4;
22
/// WASI Monotonic Clock is a clock API intended to let users measure elapsed
33
/// time.
44
///
@@ -10,7 +10,7 @@ package wasi:[email protected];
1010
@since(version = 0.2.0)
1111
interface monotonic-clock {
1212
@since(version = 0.2.0)
13-
use wasi:io/poll@0.2.3.{pollable};
13+
use wasi:io/poll@0.2.4.{pollable};
1414

1515
/// An instant in time, in nanoseconds. An instant is relative to an
1616
/// unspecified initial value, and can only be compared to instances from

wit/deps/clocks/timezone.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.3;
1+
package wasi:clocks@0.2.4;
22

33
@unstable(feature = clocks-timezone)
44
interface timezone {

wit/deps/clocks/wall-clock.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.3;
1+
package wasi:clocks@0.2.4;
22
/// WASI Wall Clock is a clock API intended to let users query the current
33
/// time. The name "wall" makes an analogy to a "clock on the wall", which
44
/// is not necessarily monotonic as it may be reset.

wit/deps/clocks/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.3;
1+
package wasi:clocks@0.2.4;
22

33
@since(version = 0.2.0)
44
world imports {

wit/deps/io/error.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.3;
1+
package wasi:io@0.2.4;
22

33
@since(version = 0.2.0)
44
interface error {

wit/deps/io/poll.wit

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.3;
1+
package wasi:io@0.2.4;
22

33
/// A poll API intended to let users wait for I/O events on multiple handles
44
/// at once.
@@ -8,19 +8,19 @@ interface poll {
88
@since(version = 0.2.0)
99
resource pollable {
1010

11-
/// Return the readiness of a pollable. This function never blocks.
12-
///
13-
/// Returns `true` when the pollable is ready, and `false` otherwise.
14-
@since(version = 0.2.0)
15-
ready: func() -> bool;
11+
/// Return the readiness of a pollable. This function never blocks.
12+
///
13+
/// Returns `true` when the pollable is ready, and `false` otherwise.
14+
@since(version = 0.2.0)
15+
ready: func() -> bool;
1616

17-
/// `block` returns immediately if the pollable is ready, and otherwise
18-
/// blocks until ready.
19-
///
20-
/// This function is equivalent to calling `poll.poll` on a list
21-
/// containing only this pollable.
22-
@since(version = 0.2.0)
23-
block: func();
17+
/// `block` returns immediately if the pollable is ready, and otherwise
18+
/// blocks until ready.
19+
///
20+
/// This function is equivalent to calling `poll.poll` on a list
21+
/// containing only this pollable.
22+
@since(version = 0.2.0)
23+
block: func();
2424
}
2525

2626
/// Poll for completion on a set of pollables.

wit/deps/io/streams.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.3;
1+
package wasi:io@0.2.4;
22

33
/// WASI I/O is an I/O abstraction API which is currently focused on providing
44
/// stream types.

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.3;
1+
package wasi:io@0.2.4;
22

33
@since(version = 0.2.0)
44
world imports {

0 commit comments

Comments
 (0)