Skip to content

Commit 542b45d

Browse files
authored
save
1 parent 1730cad commit 542b45d

File tree

9 files changed

+60
-120
lines changed

9 files changed

+60
-120
lines changed

error/error.wasm.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

error/error.wit.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

poll/poll.wasm.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

poll/poll.wit.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

streams/streams.wasm.go

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

streams/streams.wit.go

Lines changed: 15 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wit/deps/wasi-io-0.2.6/package.wit renamed to wit/deps/wasi-io-0.2.7/package.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
@since(version = 0.2.0)
44
interface error {
@@ -210,27 +210,13 @@ interface streams {
210210
/// Perform a write of up to 4096 bytes, and then flush the stream. Block
211211
/// until all of these operations are complete, or an error occurs.
212212
///
213-
/// This is a convenience wrapper around the use of `check-write`,
214-
/// `subscribe`, `write`, and `flush`, and is implemented with the
215-
/// following pseudo-code:
216-
///
217-
/// ```text
218-
/// let pollable = this.subscribe();
219-
/// while !contents.is_empty() {
220-
/// // Wait for the stream to become writable
221-
/// pollable.block();
222-
/// let Ok(n) = this.check-write(); // eliding error handling
223-
/// let len = min(n, contents.len());
224-
/// let (chunk, rest) = contents.split_at(len);
225-
/// this.write(chunk ); // eliding error handling
226-
/// contents = rest;
227-
/// }
228-
/// this.flush();
229-
/// // Wait for completion of `flush`
230-
/// pollable.block();
231-
/// // Check for any errors that arose during `flush`
232-
/// let _ = this.check-write(); // eliding error handling
233-
/// ```
213+
/// Returns success when all of the contents written are successfully
214+
/// flushed to output. If an error occurs at any point before all
215+
/// contents are successfully flushed, that error is returned as soon as
216+
/// possible. If writing and flushing the complete contents causes the
217+
/// stream to become closed, this call should return success, and
218+
/// subsequent calls to check-write or other interfaces should return
219+
/// stream-error::closed.
234220
@since(version = 0.2.0)
235221
blocking-write-and-flush: func(contents: list<u8>) -> result<_, stream-error>;
236222
/// Request to flush buffered output. This function never blocks.
@@ -273,26 +259,8 @@ interface streams {
273259
/// Block until all of these operations are complete, or an error
274260
/// occurs.
275261
///
276-
/// This is a convenience wrapper around the use of `check-write`,
277-
/// `subscribe`, `write-zeroes`, and `flush`, and is implemented with
278-
/// the following pseudo-code:
279-
///
280-
/// ```text
281-
/// let pollable = this.subscribe();
282-
/// while num_zeroes != 0 {
283-
/// // Wait for the stream to become writable
284-
/// pollable.block();
285-
/// let Ok(n) = this.check-write(); // eliding error handling
286-
/// let len = min(n, num_zeroes);
287-
/// this.write-zeroes(len); // eliding error handling
288-
/// num_zeroes -= len;
289-
/// }
290-
/// this.flush();
291-
/// // Wait for completion of `flush`
292-
/// pollable.block();
293-
/// // Check for any errors that arose during `flush`
294-
/// let _ = this.check-write(); // eliding error handling
295-
/// ```
262+
/// Functionality is equivelant to `blocking-write-and-flush` with
263+
/// contents given as a list of len containing only zeroes.
296264
@since(version = 0.2.0)
297265
blocking-write-zeroes-and-flush: func(len: u64) -> result<_, stream-error>;
298266
/// Read from one stream and write to another.

wit/package.wit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
package jcbhmr:go-wasi-io@0.2.6;
1+
package jcbhmr:go-wasi-io@0.2.7;
22

33
world go-wasi-io {
4-
include wasi:io/imports@0.2.6;
4+
include wasi:io/imports@0.2.7;
55
}

wkg.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ name = "wasi:io"
77
registry = "wasi.dev"
88

99
[[packages.versions]]
10-
requirement = "=0.2.6"
11-
version = "0.2.6"
12-
digest = "sha256:8e8ebc63a7670203b2a4868c2d0ba1d73b0ed0caa1c576edfd68762d7225a312"
10+
requirement = "=0.2.7"
11+
version = "0.2.7"
12+
digest = "sha256:4c23f92381d6f012bc0c6b2bae062c3ed12b701d66e1229fca9a2dbacc239c49"

0 commit comments

Comments
 (0)