Skip to content

Commit 33dbb14

Browse files
authored
Merge pull request #171 from WebAssembly/release-v0.2.7
Release v0.2.7
2 parents ad500ba + c90d6be commit 33dbb14

29 files changed

+133
-221
lines changed

imports.md

Lines changed: 31 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ It is intended to be <code>include</code>d in other worlds.</p>
44
<ul>
55
<li>Imports:
66
<ul>
7-
<li>interface <a href="#wasi_io_poll_0_2_6"><code>wasi:io/[email protected].6</code></a></li>
8-
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_6"><code>wasi:clocks/[email protected].6</code></a></li>
9-
<li>interface <a href="#wasi_clocks_wall_clock_0_2_6"><code>wasi:clocks/[email protected].6</code></a></li>
10-
<li>interface <a href="#wasi_random_random_0_2_6"><code>wasi:random/[email protected].6</code></a></li>
11-
<li>interface <a href="#wasi_io_error_0_2_6"><code>wasi:io/[email protected].6</code></a></li>
12-
<li>interface <a href="#wasi_io_streams_0_2_6"><code>wasi:io/[email protected].6</code></a></li>
13-
<li>interface <a href="#wasi_cli_stdout_0_2_6"><code>wasi:cli/[email protected].6</code></a></li>
14-
<li>interface <a href="#wasi_cli_stderr_0_2_6"><code>wasi:cli/[email protected].6</code></a></li>
15-
<li>interface <a href="#wasi_cli_stdin_0_2_6"><code>wasi:cli/[email protected].6</code></a></li>
16-
<li>interface <a href="#wasi_http_types_0_2_6"><code>wasi:http/[email protected].6</code></a></li>
17-
<li>interface <a href="#wasi_http_outgoing_handler_0_2_6"><code>wasi:http/[email protected].6</code></a></li>
7+
<li>interface <a href="#wasi_io_poll_0_2_7"><code>wasi:io/[email protected].7</code></a></li>
8+
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_7"><code>wasi:clocks/[email protected].7</code></a></li>
9+
<li>interface <a href="#wasi_clocks_wall_clock_0_2_7"><code>wasi:clocks/[email protected].7</code></a></li>
10+
<li>interface <a href="#wasi_random_random_0_2_7"><code>wasi:random/[email protected].7</code></a></li>
11+
<li>interface <a href="#wasi_io_error_0_2_7"><code>wasi:io/[email protected].7</code></a></li>
12+
<li>interface <a href="#wasi_io_streams_0_2_7"><code>wasi:io/[email protected].7</code></a></li>
13+
<li>interface <a href="#wasi_cli_stdout_0_2_7"><code>wasi:cli/[email protected].7</code></a></li>
14+
<li>interface <a href="#wasi_cli_stderr_0_2_7"><code>wasi:cli/[email protected].7</code></a></li>
15+
<li>interface <a href="#wasi_cli_stdin_0_2_7"><code>wasi:cli/[email protected].7</code></a></li>
16+
<li>interface <a href="#wasi_http_types_0_2_7"><code>wasi:http/[email protected].7</code></a></li>
17+
<li>interface <a href="#wasi_http_outgoing_handler_0_2_7"><code>wasi:http/[email protected].7</code></a></li>
1818
</ul>
1919
</li>
2020
</ul>
21-
<h2><a id="wasi_io_poll_0_2_6"></a>Import interface wasi:io/[email protected].6</h2>
21+
<h2><a id="wasi_io_poll_0_2_7"></a>Import interface wasi:io/[email protected].7</h2>
2222
<p>A poll API intended to let users wait for I/O events on multiple handles
2323
at once.</p>
2424
<hr />
@@ -71,7 +71,7 @@ being ready for I/O.</p>
7171
<ul>
7272
<li><a id="poll.0"></a> list&lt;<code>u32</code>&gt;</li>
7373
</ul>
74-
<h2><a id="wasi_clocks_monotonic_clock_0_2_6"></a>Import interface wasi:clocks/[email protected].6</h2>
74+
<h2><a id="wasi_clocks_monotonic_clock_0_2_7"></a>Import interface wasi:clocks/[email protected].7</h2>
7575
<p>WASI Monotonic Clock is a clock API intended to let users measure elapsed
7676
time.</p>
7777
<p>It is intended to be portable at least between Unix-family platforms and
@@ -130,7 +130,7 @@ elapsed from the time this function is invoked.</p>
130130
<ul>
131131
<li><a id="subscribe_duration.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
132132
</ul>
133-
<h2><a id="wasi_clocks_wall_clock_0_2_6"></a>Import interface wasi:clocks/[email protected].6</h2>
133+
<h2><a id="wasi_clocks_wall_clock_0_2_7"></a>Import interface wasi:clocks/[email protected].7</h2>
134134
<p>WASI Wall Clock is a clock API intended to let users query the current
135135
time. The name &quot;wall&quot; makes an analogy to a &quot;clock on the wall&quot;, which
136136
is not necessarily monotonic as it may be reset.</p>
@@ -171,7 +171,7 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
171171
<ul>
172172
<li><a id="resolution.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
173173
</ul>
174-
<h2><a id="wasi_random_random_0_2_6"></a>Import interface wasi:random/[email protected].6</h2>
174+
<h2><a id="wasi_random_random_0_2_7"></a>Import interface wasi:random/[email protected].7</h2>
175175
<p>WASI Random is a random data API.</p>
176176
<p>It is intended to be portable at least between Unix-family platforms and
177177
Windows.</p>
@@ -204,7 +204,7 @@ represented as a <code>u64</code>.</p>
204204
<ul>
205205
<li><a id="get_random_u64.0"></a> <code>u64</code></li>
206206
</ul>
207-
<h2><a id="wasi_io_error_0_2_6"></a>Import interface wasi:io/[email protected].6</h2>
207+
<h2><a id="wasi_io_error_0_2_7"></a>Import interface wasi:io/[email protected].7</h2>
208208
<hr />
209209
<h3>Types</h3>
210210
<h4><a id="error"></a><code>resource error</code></h4>
@@ -237,7 +237,7 @@ hazard.</p>
237237
<ul>
238238
<li><a id="method_error_to_debug_string.0"></a> <code>string</code></li>
239239
</ul>
240-
<h2><a id="wasi_io_streams_0_2_6"></a>Import interface wasi:io/[email protected].6</h2>
240+
<h2><a id="wasi_io_streams_0_2_7"></a>Import interface wasi:io/[email protected].7</h2>
241241
<p>WASI I/O is an I/O abstraction API which is currently focused on providing
242242
stream types.</p>
243243
<p>In the future, the component model is expected to add built-in stream types;
@@ -410,25 +410,13 @@ the last call to check-write provided a permit.</p>
410410
<h4><a id="method_output_stream_blocking_write_and_flush"></a><code>[method]output-stream.blocking-write-and-flush: func</code></h4>
411411
<p>Perform a write of up to 4096 bytes, and then flush the stream. Block
412412
until all of these operations are complete, or an error occurs.</p>
413-
<p>This is a convenience wrapper around the use of <code>check-write</code>,
414-
<code>subscribe</code>, <code>write</code>, and <code>flush</code>, and is implemented with the
415-
following pseudo-code:</p>
416-
<pre><code class="language-text">let pollable = this.subscribe();
417-
while !contents.is_empty() {
418-
// Wait for the stream to become writable
419-
pollable.block();
420-
let Ok(n) = this.check-write(); // eliding error handling
421-
let len = min(n, contents.len());
422-
let (chunk, rest) = contents.split_at(len);
423-
this.write(chunk ); // eliding error handling
424-
contents = rest;
425-
}
426-
this.flush();
427-
// Wait for completion of `flush`
428-
pollable.block();
429-
// Check for any errors that arose during `flush`
430-
let _ = this.check-write(); // eliding error handling
431-
</code></pre>
413+
<p>Returns success when all of the contents written are successfully
414+
flushed to output. If an error occurs at any point before all
415+
contents are successfully flushed, that error is returned as soon as
416+
possible. If writing and flushing the complete contents causes the
417+
stream to become closed, this call should return success, and
418+
subsequent calls to check-write or other interfaces should return
419+
stream-error::closed.</p>
432420
<h5>Params</h5>
433421
<ul>
434422
<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>
@@ -502,24 +490,8 @@ that should be written.</p>
502490
<p>Perform a write of up to 4096 zeroes, and then flush the stream.
503491
Block until all of these operations are complete, or an error
504492
occurs.</p>
505-
<p>This is a convenience wrapper around the use of <code>check-write</code>,
506-
<code>subscribe</code>, <code>write-zeroes</code>, and <code>flush</code>, and is implemented with
507-
the following pseudo-code:</p>
508-
<pre><code class="language-text">let pollable = this.subscribe();
509-
while num_zeroes != 0 {
510-
// Wait for the stream to become writable
511-
pollable.block();
512-
let Ok(n) = this.check-write(); // eliding error handling
513-
let len = min(n, num_zeroes);
514-
this.write-zeroes(len); // eliding error handling
515-
num_zeroes -= len;
516-
}
517-
this.flush();
518-
// Wait for completion of `flush`
519-
pollable.block();
520-
// Check for any errors that arose during `flush`
521-
let _ = this.check-write(); // eliding error handling
522-
</code></pre>
493+
<p>Functionality is equivelant to <code>blocking-write-and-flush</code> with
494+
contents given as a list of len containing only zeroes.</p>
523495
<h5>Params</h5>
524496
<ul>
525497
<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>
@@ -567,7 +539,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
567539
<ul>
568540
<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>
569541
</ul>
570-
<h2><a id="wasi_cli_stdout_0_2_6"></a>Import interface wasi:cli/[email protected].6</h2>
542+
<h2><a id="wasi_cli_stdout_0_2_7"></a>Import interface wasi:cli/[email protected].7</h2>
571543
<hr />
572544
<h3>Types</h3>
573545
<h4><a id="output_stream"></a><code>type output-stream</code></h4>
@@ -580,7 +552,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
580552
<ul>
581553
<li><a id="get_stdout.0"></a> own&lt;<a href="#output_stream"><a href="#output_stream"><code>output-stream</code></a></a>&gt;</li>
582554
</ul>
583-
<h2><a id="wasi_cli_stderr_0_2_6"></a>Import interface wasi:cli/[email protected].6</h2>
555+
<h2><a id="wasi_cli_stderr_0_2_7"></a>Import interface wasi:cli/[email protected].7</h2>
584556
<hr />
585557
<h3>Types</h3>
586558
<h4><a id="output_stream"></a><code>type output-stream</code></h4>
@@ -593,7 +565,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
593565
<ul>
594566
<li><a id="get_stderr.0"></a> own&lt;<a href="#output_stream"><a href="#output_stream"><code>output-stream</code></a></a>&gt;</li>
595567
</ul>
596-
<h2><a id="wasi_cli_stdin_0_2_6"></a>Import interface wasi:cli/[email protected].6</h2>
568+
<h2><a id="wasi_cli_stdin_0_2_7"></a>Import interface wasi:cli/[email protected].7</h2>
597569
<hr />
598570
<h3>Types</h3>
599571
<h4><a id="input_stream"></a><code>type input-stream</code></h4>
@@ -606,7 +578,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
606578
<ul>
607579
<li><a id="get_stdin.0"></a> own&lt;<a href="#input_stream"><a href="#input_stream"><code>input-stream</code></a></a>&gt;</li>
608580
</ul>
609-
<h2><a id="wasi_http_types_0_2_6"></a>Import interface wasi:http/[email protected].6</h2>
581+
<h2><a id="wasi_http_types_0_2_7"></a>Import interface wasi:http/[email protected].7</h2>
610582
<p>This interface defines all of the types and methods for implementing
611583
HTTP Requests and Responses, both incoming and outgoing, as well as
612584
their headers, trailers, and bodies.</p>
@@ -1526,7 +1498,7 @@ but those will be reported by the <a href="#incoming_body"><code>incoming-body</
15261498
<ul>
15271499
<li><a id="method_future_incoming_response_get.0"></a> option&lt;result&lt;result&lt;own&lt;<a href="#incoming_response"><a href="#incoming_response"><code>incoming-response</code></a></a>&gt;, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;&gt;&gt;</li>
15281500
</ul>
1529-
<h2><a id="wasi_http_outgoing_handler_0_2_6"></a>Import interface wasi:http/[email protected].6</h2>
1501+
<h2><a id="wasi_http_outgoing_handler_0_2_7"></a>Import interface wasi:http/[email protected].7</h2>
15301502
<p>This interface defines a handler of outgoing HTTP Requests. It should be
15311503
imported by components which wish to make HTTP Requests.</p>
15321504
<hr />

0 commit comments

Comments
 (0)