From d2016238b192371712d83bc0bbc8e5b8adf81927 Mon Sep 17 00:00:00 2001 From: Bailey Hayes Date: Wed, 6 Dec 2023 15:43:11 -0500 Subject: [PATCH] Update release candidate to 0.2.0-rc-2023-12-05 --- .github/workflows/main.yml | 2 ++ imports.md | 45 ++++++++++++++++++++++++++++++-------- wit/error.wit | 2 +- wit/poll.wit | 2 +- wit/streams.wit | 2 +- wit/world.wit | 2 +- 6 files changed, 42 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b456232..6c2ff17 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,3 +12,5 @@ jobs: steps: - uses: actions/checkout@v3 - uses: WebAssembly/wit-abi-up-to-date@v16 + with: + wit-bindgen: '0.16.0' diff --git a/imports.md b/imports.md index 55647e8..f471214 100644 --- a/imports.md +++ b/imports.md @@ -2,17 +2,31 @@ -

Import interface wasi:io/error@0.2.0-rc-2023-11-10

+

Import interface wasi:io/error@0.2.0-rc-2023-12-05


Types

resource error

-
+

A resource which represents some error information.

+

The only method provided by this resource is to-debug-string, +which provides some human-readable information about the error.

+

In the wasi:io package, this resource is returned through the +wasi:io/streams/stream-error type.

+

To provide more specific error information, other interfaces may +provide functions to further "downcast" this error into more specific +error information. For example, errors returned in streams derived +from filesystem types to be described using the filesystem's own +error-code type, using the function +wasi:filesystem/types/filesystem-error-code, which takes a parameter +borrow<error> and returns +option<wasi:filesystem/types/error-code>.

+

The set of functions which can "downcast" an error into a more +concrete type is open.

Functions

[method]error.to-debug-string: func

Returns a string that is suitable to assist humans in debugging @@ -29,13 +43,13 @@ hazard.

-

Import interface wasi:io/poll@0.2.0-rc-2023-11-10

+

Import interface wasi:io/poll@0.2.0-rc-2023-12-05

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


Types

resource pollable

-
+

pollable represents a single I/O event which may be ready, or not.

Functions

[method]pollable.ready: func

Return the readiness of a pollable. This function never blocks.

@@ -79,7 +93,7 @@ being reaedy for I/O.

-

Import interface wasi:io/streams@0.2.0-rc-2023-11-10

+

Import interface wasi:io/streams@0.2.0-rc-2023-12-05

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; @@ -109,8 +123,21 @@ future operations.

resource input-stream

+

An input bytestream.

+

input-streams are non-blocking to the extent practical on underlying +platforms. I/O operations always return promptly; if fewer bytes are +promptly available than requested, they return the number of bytes promptly +available, which could even be zero. To wait for data to be available, +use the subscribe function to obtain a pollable which can be polled +for using wasi:io/poll.

resource output-stream

-
+

An output bytestream.

+

output-streams are non-blocking to the extent practical on +underlying platforms. Except where specified otherwise, I/O operations also +always return promptly, after the number of bytes that can be written +promptly, which could even be zero. To wait for the stream to be ready to +accept data, the subscribe function to obtain a pollable which can be +polled for using wasi:io/poll.

Functions

[method]input-stream.read: func

Perform a non-blocking read from the stream.

diff --git a/wit/error.wit b/wit/error.wit index 31918ac..7a25de9 100644 --- a/wit/error.wit +++ b/wit/error.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.0-rc-2023-11-10; +package wasi:io@0.2.0-rc-2023-12-05; interface error { diff --git a/wit/poll.wit b/wit/poll.wit index 81b1cab..ae9d643 100644 --- a/wit/poll.wit +++ b/wit/poll.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.0-rc-2023-11-10; +package wasi:io@0.2.0-rc-2023-12-05; /// A poll API intended to let users wait for I/O events on multiple handles /// at once. diff --git a/wit/streams.wit b/wit/streams.wit index f6f7fe0..84fccd8 100644 --- a/wit/streams.wit +++ b/wit/streams.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.0-rc-2023-11-10; +package wasi:io@0.2.0-rc-2023-12-05; /// WASI I/O is an I/O abstraction API which is currently focused on providing /// stream types. diff --git a/wit/world.wit b/wit/world.wit index 8243da2..1dbc0e2 100644 --- a/wit/world.wit +++ b/wit/world.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.0-rc-2023-11-10; +package wasi:io@0.2.0-rc-2023-12-05; world imports { import streams;