diff --git a/command.md b/command.md index 2a6139c..f1b5188 100644 --- a/command.md +++ b/command.md @@ -2,43 +2,43 @@ -

Import interface wasi:cli/environment@0.2.6

+

Import interface wasi:cli/environment@0.2.7


Functions

get-environment: func

@@ -65,7 +65,7 @@ directory, interpreting . as shorthand for this.

-

Import interface wasi:cli/exit@0.2.6

+

Import interface wasi:cli/exit@0.2.7


Functions

exit: func

@@ -85,7 +85,7 @@ without the connotation that something bad has happened.

-

Import interface wasi:io/error@0.2.6

+

Import interface wasi:io/error@0.2.7


Types

resource error

@@ -118,7 +118,7 @@ hazard.

-

Import interface wasi:io/poll@0.2.6

+

Import interface wasi:io/poll@0.2.7

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


@@ -171,7 +171,7 @@ being ready for I/O.

-

Import interface wasi:io/streams@0.2.6

+

Import interface wasi:io/streams@0.2.7

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

In the future, the component model is expected to add built-in stream types; @@ -344,25 +344,13 @@ the last call to check-write provided a permit.

[method]output-stream.blocking-write-and-flush: func

Perform a write of up to 4096 bytes, and then flush the stream. Block until all of these operations are complete, or an error occurs.

-

This is a convenience wrapper around the use of check-write, -subscribe, write, and flush, and is implemented with the -following pseudo-code:

-
let pollable = this.subscribe();
-while !contents.is_empty() {
-  // Wait for the stream to become writable
-  pollable.block();
-  let Ok(n) = this.check-write(); // eliding error handling
-  let len = min(n, contents.len());
-  let (chunk, rest) = contents.split_at(len);
-  this.write(chunk  );            // eliding error handling
-  contents = rest;
-}
-this.flush();
-// Wait for completion of `flush`
-pollable.block();
-// Check for any errors that arose during `flush`
-let _ = this.check-write();         // eliding error handling
-
+

Returns success when all of the contents written are successfully +flushed to output. If an error occurs at any point before all +contents are successfully flushed, that error is returned as soon as +possible. If writing and flushing the complete contents causes the +stream to become closed, this call should return success, and +subsequent calls to check-write or other interfaces should return +stream-error::closed.

Params
+ + +

Import interface wasi:cli/environment@0.2.7


Functions

get-environment: func

@@ -60,7 +60,7 @@ directory, interpreting . as shorthand for this.

-

Import interface wasi:cli/exit@0.2.6

+

Import interface wasi:cli/exit@0.2.7


Functions

exit: func

@@ -80,7 +80,7 @@ without the connotation that something bad has happened.

-

Import interface wasi:io/error@0.2.6

+

Import interface wasi:io/error@0.2.7


Types

resource error

@@ -113,7 +113,7 @@ hazard.

-

Import interface wasi:io/poll@0.2.6

+

Import interface wasi:io/poll@0.2.7

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


@@ -166,7 +166,7 @@ being ready for I/O.

-

Import interface wasi:io/streams@0.2.6

+

Import interface wasi:io/streams@0.2.7

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

In the future, the component model is expected to add built-in stream types; @@ -339,25 +339,13 @@ the last call to check-write provided a permit.

[method]output-stream.blocking-write-and-flush: func

Perform a write of up to 4096 bytes, and then flush the stream. Block until all of these operations are complete, or an error occurs.

-

This is a convenience wrapper around the use of check-write, -subscribe, write, and flush, and is implemented with the -following pseudo-code:

-
let pollable = this.subscribe();
-while !contents.is_empty() {
-  // Wait for the stream to become writable
-  pollable.block();
-  let Ok(n) = this.check-write(); // eliding error handling
-  let len = min(n, contents.len());
-  let (chunk, rest) = contents.split_at(len);
-  this.write(chunk  );            // eliding error handling
-  contents = rest;
-}
-this.flush();
-// Wait for completion of `flush`
-pollable.block();
-// Check for any errors that arose during `flush`
-let _ = this.check-write();         // eliding error handling
-
+

Returns success when all of the contents written are successfully +flushed to output. If an error occurs at any point before all +contents are successfully flushed, that error is returned as soon as +possible. If writing and flushing the complete contents causes the +stream to become closed, this call should return success, and +subsequent calls to check-write or other interfaces should return +stream-error::closed.

Params