From 91781afd6e3071fbbece86392ef077739eabeee9 Mon Sep 17 00:00:00 2001 From: Yosh Date: Fri, 31 May 2024 18:25:45 +0200 Subject: [PATCH 1/2] Update `wit-abi-up-to-date` to `v20` This adds support for `@since` and `@unstable` gates --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ca5ba1..abb15ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,4 +18,4 @@ jobs: ./wit-deps lock git add -N wit/deps git diff --exit-code - - uses: WebAssembly/wit-abi-up-to-date@v17 + - uses: WebAssembly/wit-abi-up-to-date@v20 From 8567cd752bf0431d0ea06ee6a40bd16200ce5674 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 31 May 2024 14:37:33 -0700 Subject: [PATCH 2/2] Regenerate imports.md with wit-bindgen 0.26.0. --- imports.md | 57 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/imports.md b/imports.md index 126ff57..ec3bedd 100644 --- a/imports.md +++ b/imports.md @@ -2,41 +2,41 @@ -

Import interface wasi:io/poll@0.2.0

+

Import interface wasi:io/poll@0.2.0

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.

@@ -52,36 +52,35 @@ the pollables has an error, it is indicated by marking the source as being reaedy for I/O.

Params
Return values
-

Import interface wasi:clocks/monotonic-clock@0.2.0

+

Import interface wasi:clocks/monotonic-clock@0.2.0

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 Windows.

A monotonic clock is a clock which has an unspecified initial value, and successive reads of the clock will produce non-decreasing values.

-

It is intended for measuring elapsed time.


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.

@@ -89,36 +88,36 @@ produce a sequence of non-decreasing 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.0

+

Import interface wasi:clocks/wall-clock@0.2.0

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.

@@ -131,16 +130,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.

@@ -152,7 +151,7 @@ also known as Unix Time.
  • datetime
  • -

    resolution: func

    +

    resolution: func

    Query the resolution of the clock.

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

    Return values