diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 244de48..2b0fc35 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: ./wit-deps lock git add -N wit/deps git diff --exit-code - - uses: WebAssembly/wit-abi-up-to-date@v21 + - uses: WebAssembly/wit-abi-up-to-date@v22 with: features: clocks-timezone - wit-bindgen: '0.28.0' + wit-bindgen: '0.33.0' diff --git a/imports.md b/imports.md index 886f9ff..ee9ca51 100644 --- a/imports.md +++ b/imports.md @@ -1,43 +1,43 @@ -

World imports

+

World imports

-

Import interface wasi:io/poll@0.2.1

+

Import interface wasi:io/poll@0.2.2

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


Types

-

resource pollable

+

resource pollable

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

Functions

-

[method]pollable.ready: func

+

[method]pollable.ready: func

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

Returns true when the pollable is ready, and false otherwise.

Params
Return values
-

[method]pollable.block: func

+

[method]pollable.block: func

block returns immediately if the pollable is ready, and otherwise blocks until ready.

This function is equivalent to calling poll.poll on a list containing only this pollable.

Params
-

poll: func

+

poll: func

Poll for completion on a set of pollables.

This function takes a list of pollables, which identify I/O sources of interest, and waits until one or more of the events is ready for I/O.

@@ -56,13 +56,13 @@ the pollables has an error, it is indicated by marking the source as being ready for I/O.

Params
Return values
-

Import interface wasi:clocks/monotonic-clock@0.2.1

+

Import interface wasi:clocks/monotonic-clock@0.2.2

WASI Monotonic Clock is a clock API intended to let users measure elapsed time.

It is intended to be portable at least between Unix-family platforms and @@ -71,57 +71,57 @@ Windows.

successive reads of the clock will produce non-decreasing values.


Types

-

type pollable

+

type pollable

pollable

-#### `type instant` +#### `type instant` `u64`

An instant in time, in nanoseconds. An instant is relative to an unspecified initial value, and can only be compared to instances from the same monotonic-clock. -

type duration

+

type duration

u64

A duration of time, in nanoseconds.


Functions

-

now: func

+

now: func

Read the current value of the clock.

The clock is monotonic, therefore calling this function repeatedly will produce a sequence of non-decreasing values.

Return values
-

resolution: func

+

resolution: func

Query the resolution of the clock. Returns the duration of time corresponding to a clock tick.

Return values
-

subscribe-instant: func

+

subscribe-instant: func

Create a pollable which will resolve once the specified instant has occurred.

Params
Return values
-

subscribe-duration: func

+

subscribe-duration: func

Create a pollable that will resolve after the specified duration has elapsed from the time this function is invoked.

Params
Return values
-

Import interface wasi:clocks/wall-clock@0.2.1

+

Import interface wasi:clocks/wall-clock@0.2.2

WASI Wall Clock is a clock API intended to let users query the current time. The name "wall" makes an analogy to a "clock on the wall", which is not necessarily monotonic as it may be reset.

@@ -134,16 +134,16 @@ monotonic, making it unsuitable for measuring elapsed time.

It is intended for reporting the current date and time for humans.


Types

-

record datetime

+

record datetime

A time and date in seconds plus nanoseconds.

Record Fields

Functions

-

now: func

+

now: func

Read the current value of the clock.

This clock is not monotonic, therefore calling this function repeatedly will not necessarily produce a sequence of non-decreasing values.

@@ -153,29 +153,29 @@ also known as Unix Time.The nanoseconds field of the output is always less than 1000000000.

Return values
-

resolution: func

+

resolution: func

Query the resolution of the clock.

The nanoseconds field of the output is always less than 1000000000.

Return values
-

Import interface wasi:clocks/timezone@0.2.1

+

Import interface wasi:clocks/timezone@0.2.2


Types

-

type datetime

+

type datetime

datetime

-#### `record timezone-display` +#### `record timezone-display`

Information useful for displaying the timezone of a specific datetime.

This information may vary within a single timezone to reflect daylight saving time adjustments.

Record Fields

Functions

-

display: func

+

display: func

Return information needed to display the given datetime. This includes the UTC offset, the time zone name, and a flag indicating whether daylight saving time is active.

@@ -211,19 +211,19 @@ daylight saving time is active.

saving time.

Params
Return values
-

utc-offset: func

+

utc-offset: func

The same as display, but only return the UTC offset.

Params
Return values
diff --git a/wit/deps.lock b/wit/deps.lock index 0d0c51d..0e1333b 100644 --- a/wit/deps.lock +++ b/wit/deps.lock @@ -1,4 +1,4 @@ [io] url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz" -sha256 = "2a74bd811adc46b5a0f19827ddbde89870e52b17615f4d0873f06fd977250caf" -sha512 = "94624f00c66e66203592cee820f80b1ba91ecdb71f682c154f25eaf71f8d8954197dcb64503bc21e72ed5e812af7eae876df47b7eb727b02db3a74a7ce0aefca" +sha256 = "6d8dbfaaaa685167c1829616dc7265f5f3cb776845879555612d56544f6d9bfc" +sha512 = "52219562c4183503169cd2947b8164e1c96974500a5adf15bbf382c5992a10a626cc89c3b319204aeda6698ce59cbca2c42f98f7fde296aa77b9db4b41154dbe" diff --git a/wit/deps/io/error.wit b/wit/deps/io/error.wit index 4ea29c4..717135f 100644 --- a/wit/deps/io/error.wit +++ b/wit/deps/io/error.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; @since(version = 0.2.0) interface error { diff --git a/wit/deps/io/poll.wit b/wit/deps/io/poll.wit index b25ac72..49c1c5e 100644 --- a/wit/deps/io/poll.wit +++ b/wit/deps/io/poll.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; /// A poll API intended to let users wait for I/O events on multiple handles /// at once. diff --git a/wit/deps/io/streams.wit b/wit/deps/io/streams.wit index b697e24..330f709 100644 --- a/wit/deps/io/streams.wit +++ b/wit/deps/io/streams.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; /// WASI I/O is an I/O abstraction API which is currently focused on providing /// stream types. @@ -18,6 +18,9 @@ interface streams { /// The last operation (a write or flush) failed before completion. /// /// More information is available in the `error` payload. + /// + /// After this, the stream will be closed. All future operations return + /// `stream-error::closed`. last-operation-failed(error), /// The stream is closed: no more input will be accepted by the /// stream. A closed output-stream will return this error on all @@ -205,6 +208,7 @@ interface streams { /// The created `pollable` is a child resource of the `output-stream`. /// Implementations may trap if the `output-stream` is dropped before /// all derived `pollable`s created with this function are dropped. + @since(version = 0.2.0) subscribe: func() -> pollable; /// Write zeroes to a stream. diff --git a/wit/deps/io/world.wit b/wit/deps/io/world.wit index 6405a4e..f7001cc 100644 --- a/wit/deps/io/world.wit +++ b/wit/deps/io/world.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; @since(version = 0.2.0) world imports { diff --git a/wit/monotonic-clock.wit b/wit/monotonic-clock.wit index 3c24840..233cace 100644 --- a/wit/monotonic-clock.wit +++ b/wit/monotonic-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; /// WASI Monotonic Clock is a clock API intended to let users measure elapsed /// time. /// @@ -10,7 +10,7 @@ package wasi:clocks@0.2.1; @since(version = 0.2.0) interface monotonic-clock { @since(version = 0.2.0) - use wasi:io/poll@0.2.1.{pollable}; + use wasi:io/poll@0.2.2.{pollable}; /// An instant in time, in nanoseconds. An instant is relative to an /// unspecified initial value, and can only be compared to instances from diff --git a/wit/timezone.wit b/wit/timezone.wit index 212da66..349fb57 100644 --- a/wit/timezone.wit +++ b/wit/timezone.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; @unstable(feature = clocks-timezone) interface timezone { diff --git a/wit/wall-clock.wit b/wit/wall-clock.wit index 6be069a..ec05a1f 100644 --- a/wit/wall-clock.wit +++ b/wit/wall-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; /// WASI Wall Clock is a clock API intended to let users query the current /// time. The name "wall" makes an analogy to a "clock on the wall", which /// is not necessarily monotonic as it may be reset. diff --git a/wit/world.wit b/wit/world.wit index 9251ac6..e36802c 100644 --- a/wit/world.wit +++ b/wit/world.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; @since(version = 0.2.0) world imports {