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

Commit 191eab7

Browse files
authored
Merge pull request #131 from WebAssembly/release-v0.2.7
Release v0.2.7
2 parents c2b436e + 28e8c71 commit 191eab7

File tree

15 files changed

+60
-120
lines changed

15 files changed

+60
-120
lines changed

imports.md

Lines changed: 31 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
<ul>
33
<li>Imports:
44
<ul>
5-
<li>interface <a href="#wasi_io_error_0_2_6"><code>wasi:io/error@0.2.6</code></a></li>
6-
<li>interface <a href="#wasi_sockets_network_0_2_6"><code>wasi:sockets/network@0.2.6</code></a></li>
7-
<li>interface <a href="#wasi_sockets_instance_network_0_2_6"><code>wasi:sockets/instance-network@0.2.6</code></a></li>
8-
<li>interface <a href="#wasi_io_poll_0_2_6"><code>wasi:io/poll@0.2.6</code></a></li>
9-
<li>interface <a href="#wasi_sockets_udp_0_2_6"><code>wasi:sockets/udp@0.2.6</code></a></li>
10-
<li>interface <a href="#wasi_sockets_udp_create_socket_0_2_6"><code>wasi:sockets/udp-create-socket@0.2.6</code></a></li>
11-
<li>interface <a href="#wasi_io_streams_0_2_6"><code>wasi:io/streams@0.2.6</code></a></li>
12-
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_6"><code>wasi:clocks/monotonic-clock@0.2.6</code></a></li>
13-
<li>interface <a href="#wasi_sockets_tcp_0_2_6"><code>wasi:sockets/tcp@0.2.6</code></a></li>
14-
<li>interface <a href="#wasi_sockets_tcp_create_socket_0_2_6"><code>wasi:sockets/tcp-create-socket@0.2.6</code></a></li>
15-
<li>interface <a href="#wasi_sockets_ip_name_lookup_0_2_6"><code>wasi:sockets/ip-name-lookup@0.2.6</code></a></li>
5+
<li>interface <a href="#wasi_io_error_0_2_7"><code>wasi:io/error@0.2.7</code></a></li>
6+
<li>interface <a href="#wasi_sockets_network_0_2_7"><code>wasi:sockets/network@0.2.7</code></a></li>
7+
<li>interface <a href="#wasi_sockets_instance_network_0_2_7"><code>wasi:sockets/instance-network@0.2.7</code></a></li>
8+
<li>interface <a href="#wasi_io_poll_0_2_7"><code>wasi:io/poll@0.2.7</code></a></li>
9+
<li>interface <a href="#wasi_sockets_udp_0_2_7"><code>wasi:sockets/udp@0.2.7</code></a></li>
10+
<li>interface <a href="#wasi_sockets_udp_create_socket_0_2_7"><code>wasi:sockets/udp-create-socket@0.2.7</code></a></li>
11+
<li>interface <a href="#wasi_io_streams_0_2_7"><code>wasi:io/streams@0.2.7</code></a></li>
12+
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_7"><code>wasi:clocks/monotonic-clock@0.2.7</code></a></li>
13+
<li>interface <a href="#wasi_sockets_tcp_0_2_7"><code>wasi:sockets/tcp@0.2.7</code></a></li>
14+
<li>interface <a href="#wasi_sockets_tcp_create_socket_0_2_7"><code>wasi:sockets/tcp-create-socket@0.2.7</code></a></li>
15+
<li>interface <a href="#wasi_sockets_ip_name_lookup_0_2_7"><code>wasi:sockets/ip-name-lookup@0.2.7</code></a></li>
1616
</ul>
1717
</li>
1818
</ul>
19-
<h2><a id="wasi_io_error_0_2_6"></a>Import interface wasi:io/error@0.2.6</h2>
19+
<h2><a id="wasi_io_error_0_2_7"></a>Import interface wasi:io/error@0.2.7</h2>
2020
<hr />
2121
<h3>Types</h3>
2222
<h4><a id="error"></a><code>resource error</code></h4>
@@ -49,7 +49,7 @@ hazard.</p>
4949
<ul>
5050
<li><a id="method_error_to_debug_string.0"></a> <code>string</code></li>
5151
</ul>
52-
<h2><a id="wasi_sockets_network_0_2_6"></a>Import interface wasi:sockets/network@0.2.6</h2>
52+
<h2><a id="wasi_sockets_network_0_2_7"></a>Import interface wasi:sockets/network@0.2.7</h2>
5353
<hr />
5454
<h3>Types</h3>
5555
<h4><a id="error"></a><code>type error</code></h4>
@@ -264,7 +264,7 @@ errors are network-related errors.</p>
264264
<ul>
265265
<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>
266266
</ul>
267-
<h2><a id="wasi_sockets_instance_network_0_2_6"></a>Import interface wasi:sockets/instance-network@0.2.6</h2>
267+
<h2><a id="wasi_sockets_instance_network_0_2_7"></a>Import interface wasi:sockets/instance-network@0.2.7</h2>
268268
<p>This interface provides a value-export of the default network handle..</p>
269269
<hr />
270270
<h3>Types</h3>
@@ -279,7 +279,7 @@ errors are network-related errors.</p>
279279
<ul>
280280
<li><a id="instance_network.0"></a> own&lt;<a href="#network"><a href="#network"><code>network</code></a></a>&gt;</li>
281281
</ul>
282-
<h2><a id="wasi_io_poll_0_2_6"></a>Import interface wasi:io/poll@0.2.6</h2>
282+
<h2><a id="wasi_io_poll_0_2_7"></a>Import interface wasi:io/poll@0.2.7</h2>
283283
<p>A poll API intended to let users wait for I/O events on multiple handles
284284
at once.</p>
285285
<hr />
@@ -332,7 +332,7 @@ being ready for I/O.</p>
332332
<ul>
333333
<li><a id="poll.0"></a> list&lt;<code>u32</code>&gt;</li>
334334
</ul>
335-
<h2><a id="wasi_sockets_udp_0_2_6"></a>Import interface wasi:sockets/udp@0.2.6</h2>
335+
<h2><a id="wasi_sockets_udp_0_2_7"></a>Import interface wasi:sockets/udp@0.2.7</h2>
336336
<hr />
337337
<h3>Types</h3>
338338
<h4><a id="pollable"></a><code>type pollable</code></h4>
@@ -746,7 +746,7 @@ It's planned to be removed when <code>future</code> is natively supported in Pre
746746
<ul>
747747
<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>
748748
</ul>
749-
<h2><a id="wasi_sockets_udp_create_socket_0_2_6"></a>Import interface wasi:sockets/udp-create-socket@0.2.6</h2>
749+
<h2><a id="wasi_sockets_udp_create_socket_0_2_7"></a>Import interface wasi:sockets/udp-create-socket@0.2.7</h2>
750750
<hr />
751751
<h3>Types</h3>
752752
<h4><a id="network"></a><code>type network</code></h4>
@@ -791,7 +791,7 @@ the socket is effectively an in-memory configuration object, unable to communica
791791
<ul>
792792
<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>
793793
</ul>
794-
<h2><a id="wasi_io_streams_0_2_6"></a>Import interface wasi:io/streams@0.2.6</h2>
794+
<h2><a id="wasi_io_streams_0_2_7"></a>Import interface wasi:io/streams@0.2.7</h2>
795795
<p>WASI I/O is an I/O abstraction API which is currently focused on providing
796796
stream types.</p>
797797
<p>In the future, the component model is expected to add built-in stream types;
@@ -964,25 +964,13 @@ the last call to check-write provided a permit.</p>
964964
<h4><a id="method_output_stream_blocking_write_and_flush"></a><code>[method]output-stream.blocking-write-and-flush: func</code></h4>
965965
<p>Perform a write of up to 4096 bytes, and then flush the stream. Block
966966
until all of these operations are complete, or an error occurs.</p>
967-
<p>This is a convenience wrapper around the use of <code>check-write</code>,
968-
<code>subscribe</code>, <code>write</code>, and <code>flush</code>, and is implemented with the
969-
following pseudo-code:</p>
970-
<pre><code class="language-text">let pollable = this.subscribe();
971-
while !contents.is_empty() {
972-
// Wait for the stream to become writable
973-
pollable.block();
974-
let Ok(n) = this.check-write(); // eliding error handling
975-
let len = min(n, contents.len());
976-
let (chunk, rest) = contents.split_at(len);
977-
this.write(chunk ); // eliding error handling
978-
contents = rest;
979-
}
980-
this.flush();
981-
// Wait for completion of `flush`
982-
pollable.block();
983-
// Check for any errors that arose during `flush`
984-
let _ = this.check-write(); // eliding error handling
985-
</code></pre>
967+
<p>Returns success when all of the contents written are successfully
968+
flushed to output. If an error occurs at any point before all
969+
contents are successfully flushed, that error is returned as soon as
970+
possible. If writing and flushing the complete contents causes the
971+
stream to become closed, this call should return success, and
972+
subsequent calls to check-write or other interfaces should return
973+
stream-error::closed.</p>
986974
<h5>Params</h5>
987975
<ul>
988976
<li><a id="method_output_stream_blocking_write_and_flush.self"></a><code>self</code>: borrow&lt;<a href="#output_stream"><a href="#output_stream"><code>output-stream</code></a></a>&gt;</li>
@@ -1056,24 +1044,8 @@ that should be written.</p>
10561044
<p>Perform a write of up to 4096 zeroes, and then flush the stream.
10571045
Block until all of these operations are complete, or an error
10581046
occurs.</p>
1059-
<p>This is a convenience wrapper around the use of <code>check-write</code>,
1060-
<code>subscribe</code>, <code>write-zeroes</code>, and <code>flush</code>, and is implemented with
1061-
the following pseudo-code:</p>
1062-
<pre><code class="language-text">let pollable = this.subscribe();
1063-
while num_zeroes != 0 {
1064-
// Wait for the stream to become writable
1065-
pollable.block();
1066-
let Ok(n) = this.check-write(); // eliding error handling
1067-
let len = min(n, num_zeroes);
1068-
this.write-zeroes(len); // eliding error handling
1069-
num_zeroes -= len;
1070-
}
1071-
this.flush();
1072-
// Wait for completion of `flush`
1073-
pollable.block();
1074-
// Check for any errors that arose during `flush`
1075-
let _ = this.check-write(); // eliding error handling
1076-
</code></pre>
1047+
<p>Functionality is equivelant to <code>blocking-write-and-flush</code> with
1048+
contents given as a list of len containing only zeroes.</p>
10771049
<h5>Params</h5>
10781050
<ul>
10791051
<li><a id="method_output_stream_blocking_write_zeroes_and_flush.self"></a><code>self</code>: borrow&lt;<a href="#output_stream"><a href="#output_stream"><code>output-stream</code></a></a>&gt;</li>
@@ -1121,7 +1093,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
11211093
<ul>
11221094
<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>
11231095
</ul>
1124-
<h2><a id="wasi_clocks_monotonic_clock_0_2_6"></a>Import interface wasi:clocks/monotonic-clock@0.2.6</h2>
1096+
<h2><a id="wasi_clocks_monotonic_clock_0_2_7"></a>Import interface wasi:clocks/monotonic-clock@0.2.7</h2>
11251097
<p>WASI Monotonic Clock is a clock API intended to let users measure elapsed
11261098
time.</p>
11271099
<p>It is intended to be portable at least between Unix-family platforms and
@@ -1180,7 +1152,7 @@ elapsed from the time this function is invoked.</p>
11801152
<ul>
11811153
<li><a id="subscribe_duration.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
11821154
</ul>
1183-
<h2><a id="wasi_sockets_tcp_0_2_6"></a>Import interface wasi:sockets/tcp@0.2.6</h2>
1155+
<h2><a id="wasi_sockets_tcp_0_2_7"></a>Import interface wasi:sockets/tcp@0.2.7</h2>
11841156
<hr />
11851157
<h3>Types</h3>
11861158
<h4><a id="input_stream"></a><code>type input-stream</code></h4>
@@ -1771,7 +1743,7 @@ has no effect and returns <code>ok</code>.</p>
17711743
<ul>
17721744
<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>
17731745
</ul>
1774-
<h2><a id="wasi_sockets_tcp_create_socket_0_2_6"></a>Import interface wasi:sockets/tcp-create-socket@0.2.6</h2>
1746+
<h2><a id="wasi_sockets_tcp_create_socket_0_2_7"></a>Import interface wasi:sockets/tcp-create-socket@0.2.7</h2>
17751747
<hr />
17761748
<h3>Types</h3>
17771749
<h4><a id="network"></a><code>type network</code></h4>
@@ -1816,7 +1788,7 @@ is called, the socket is effectively an in-memory configuration object, unable t
18161788
<ul>
18171789
<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>
18181790
</ul>
1819-
<h2><a id="wasi_sockets_ip_name_lookup_0_2_6"></a>Import interface wasi:sockets/ip-name-lookup@0.2.6</h2>
1791+
<h2><a id="wasi_sockets_ip_name_lookup_0_2_7"></a>Import interface wasi:sockets/ip-name-lookup@0.2.7</h2>
18201792
<hr />
18211793
<h3>Types</h3>
18221794
<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 = "59b8db7b6f3f8a72418510453c1fa9e437c7c7c2369c0bd5da83aa5d6d1d9b73"
4-
sha512 = "06ce14bbf34d5588ed0c26bd932d46b3025c16723d5b4558def5b8107781b2251471c1f7170640342e3d4f78efb560d5ff6383c6a127c1d9e757e83db31a0185"
3+
sha256 = "d0a8d048c41b566b978cd8ecd03fa51ec1f65af4c26be2f0fc9cfdd7dd6f34f3"
4+
sha512 = "8d1c9ddaaea70ae54376bfc02dcdd0437336fb4fc67f89763ce09540caefe84cbae89a8de3605aa7613c49188636e925047bcd150c2c60685850095fefb68b73"
55

66
[io]
77
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
8-
sha256 = "671761f464d312e6c26bcaab5e79fe14ac876b72267867579d5c65e053fe2301"
9-
sha512 = "57e5ed34fa85f35899b324ac7a2473c5fa5cece51d07e6f077637191fadd3c8b6f79324d31a8d497a6ce7b92cfb2a2505ab894337e2c82889f1bdb21f4f24634"
8+
sha256 = "62ae80f2e340cddbac8e94f78e6270735aea536367ecb98de5f4ac6aef66b5c4"
9+
sha512 = "a02a1ebd261ae884b0315b3528d1a93819ddc4b616f66c77f2bea9dd1de888208dc3b9004a553363f5e8491ea925d65ebbd0d68eaa87238316b47469a3bf97bb"

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.6;
1+
package wasi:clocks@0.2.7;
22
/// WASI Monotonic Clock is a clock API intended to let users measure elapsed
33
/// time.
44
///
@@ -10,7 +10,7 @@ package wasi:clocks@0.2.6;
1010
@since(version = 0.2.0)
1111
interface monotonic-clock {
1212
@since(version = 0.2.0)
13-
use wasi:io/poll@0.2.6.{pollable};
13+
use wasi:io/poll@0.2.7.{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.6;
1+
package wasi:clocks@0.2.7;
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.6;
1+
package wasi:clocks@0.2.7;
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.6;
1+
package wasi:clocks@0.2.7;
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.6;
1+
package wasi:io@0.2.7;
22

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

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.6;
1+
package wasi:io@0.2.7;
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: 10 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.6;
1+
package wasi:io@0.2.7;
22

33
/// WASI I/O is an I/O abstraction API which is currently focused on providing
44
/// stream types.
@@ -154,27 +154,13 @@ interface streams {
154154
/// Perform a write of up to 4096 bytes, and then flush the stream. Block
155155
/// until all of these operations are complete, or an error occurs.
156156
///
157-
/// This is a convenience wrapper around the use of `check-write`,
158-
/// `subscribe`, `write`, and `flush`, and is implemented with the
159-
/// following pseudo-code:
160-
///
161-
/// ```text
162-
/// let pollable = this.subscribe();
163-
/// while !contents.is_empty() {
164-
/// // Wait for the stream to become writable
165-
/// pollable.block();
166-
/// let Ok(n) = this.check-write(); // eliding error handling
167-
/// let len = min(n, contents.len());
168-
/// let (chunk, rest) = contents.split_at(len);
169-
/// this.write(chunk ); // eliding error handling
170-
/// contents = rest;
171-
/// }
172-
/// this.flush();
173-
/// // Wait for completion of `flush`
174-
/// pollable.block();
175-
/// // Check for any errors that arose during `flush`
176-
/// let _ = this.check-write(); // eliding error handling
177-
/// ```
157+
/// Returns success when all of the contents written are successfully
158+
/// flushed to output. If an error occurs at any point before all
159+
/// contents are successfully flushed, that error is returned as soon as
160+
/// possible. If writing and flushing the complete contents causes the
161+
/// stream to become closed, this call should return success, and
162+
/// subsequent calls to check-write or other interfaces should return
163+
/// stream-error::closed.
178164
@since(version = 0.2.0)
179165
blocking-write-and-flush: func(
180166
contents: list<u8>
@@ -227,26 +213,8 @@ interface streams {
227213
/// Block until all of these operations are complete, or an error
228214
/// occurs.
229215
///
230-
/// This is a convenience wrapper around the use of `check-write`,
231-
/// `subscribe`, `write-zeroes`, and `flush`, and is implemented with
232-
/// the following pseudo-code:
233-
///
234-
/// ```text
235-
/// let pollable = this.subscribe();
236-
/// while num_zeroes != 0 {
237-
/// // Wait for the stream to become writable
238-
/// pollable.block();
239-
/// let Ok(n) = this.check-write(); // eliding error handling
240-
/// let len = min(n, num_zeroes);
241-
/// this.write-zeroes(len); // eliding error handling
242-
/// num_zeroes -= len;
243-
/// }
244-
/// this.flush();
245-
/// // Wait for completion of `flush`
246-
/// pollable.block();
247-
/// // Check for any errors that arose during `flush`
248-
/// let _ = this.check-write(); // eliding error handling
249-
/// ```
216+
/// Functionality is equivelant to `blocking-write-and-flush` with
217+
/// contents given as a list of len containing only zeroes.
250218
@since(version = 0.2.0)
251219
blocking-write-zeroes-and-flush: func(
252220
/// The number of zero-bytes to write

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

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

0 commit comments

Comments
 (0)