Skip to content

Commit 110b161

Browse files
authored
Update to v0.2.2 (#75)
1 parent f9a4a57 commit 110b161

File tree

11 files changed

+66
-62
lines changed

11 files changed

+66
-62
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
./wit-deps lock
1919
git add -N wit/deps
2020
git diff --exit-code
21-
- uses: WebAssembly/wit-abi-up-to-date@v21
21+
- uses: WebAssembly/wit-abi-up-to-date@v22
2222
with:
2323
features: clocks-timezone
24-
wit-bindgen: '0.28.0'
24+
wit-bindgen: '0.33.0'

imports.md

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
<h1><a name="imports">World imports</a></h1>
1+
<h1><a id="imports"></a>World imports</h1>
22
<ul>
33
<li>Imports:
44
<ul>
5-
<li>interface <a href="#wasi_io_poll_0_2_1"><code>wasi:io/[email protected].1</code></a></li>
6-
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_1"><code>wasi:clocks/[email protected].1</code></a></li>
7-
<li>interface <a href="#wasi_clocks_wall_clock_0_2_1"><code>wasi:clocks/[email protected].1</code></a></li>
8-
<li>interface <a href="#wasi_clocks_timezone_0_2_1"><code>wasi:clocks/[email protected].1</code></a></li>
5+
<li>interface <a href="#wasi_io_poll_0_2_2"><code>wasi:io/[email protected].2</code></a></li>
6+
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_2"><code>wasi:clocks/[email protected].2</code></a></li>
7+
<li>interface <a href="#wasi_clocks_wall_clock_0_2_2"><code>wasi:clocks/[email protected].2</code></a></li>
8+
<li>interface <a href="#wasi_clocks_timezone_0_2_2"><code>wasi:clocks/[email protected].2</code></a></li>
99
</ul>
1010
</li>
1111
</ul>
12-
<h2><a name="wasi_io_poll_0_2_1"></a>Import interface wasi:io/[email protected].1</h2>
12+
<h2><a id="wasi_io_poll_0_2_2"></a>Import interface wasi:io/[email protected].2</h2>
1313
<p>A poll API intended to let users wait for I/O events on multiple handles
1414
at once.</p>
1515
<hr />
1616
<h3>Types</h3>
17-
<h4><a name="pollable"></a><code>resource pollable</code></h4>
17+
<h4><a id="pollable"></a><code>resource pollable</code></h4>
1818
<h2><a href="#pollable"><code>pollable</code></a> represents a single I/O event which may be ready, or not.</h2>
1919
<h3>Functions</h3>
20-
<h4><a name="method_pollable_ready"></a><code>[method]pollable.ready: func</code></h4>
20+
<h4><a id="method_pollable_ready"></a><code>[method]pollable.ready: func</code></h4>
2121
<p>Return the readiness of a pollable. This function never blocks.</p>
2222
<p>Returns <code>true</code> when the pollable is ready, and <code>false</code> otherwise.</p>
2323
<h5>Params</h5>
2424
<ul>
25-
<li><a name="method_pollable_ready.self"></a><code>self</code>: borrow&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
25+
<li><a id="method_pollable_ready.self"></a><code>self</code>: borrow&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
2626
</ul>
2727
<h5>Return values</h5>
2828
<ul>
29-
<li><a name="method_pollable_ready.0"></a> <code>bool</code></li>
29+
<li><a id="method_pollable_ready.0"></a> <code>bool</code></li>
3030
</ul>
31-
<h4><a name="method_pollable_block"></a><code>[method]pollable.block: func</code></h4>
31+
<h4><a id="method_pollable_block"></a><code>[method]pollable.block: func</code></h4>
3232
<p><code>block</code> returns immediately if the pollable is ready, and otherwise
3333
blocks until ready.</p>
3434
<p>This function is equivalent to calling <code>poll.poll</code> on a list
3535
containing only this pollable.</p>
3636
<h5>Params</h5>
3737
<ul>
38-
<li><a name="method_pollable_block.self"></a><code>self</code>: borrow&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
38+
<li><a id="method_pollable_block.self"></a><code>self</code>: borrow&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
3939
</ul>
40-
<h4><a name="poll"></a><code>poll: func</code></h4>
40+
<h4><a id="poll"></a><code>poll: func</code></h4>
4141
<p>Poll for completion on a set of pollables.</p>
4242
<p>This function takes a list of pollables, which identify I/O sources of
4343
interest, and waits until one or more of the events is ready for I/O.</p>
@@ -56,13 +56,13 @@ the pollables has an error, it is indicated by marking the source as
5656
being ready for I/O.</p>
5757
<h5>Params</h5>
5858
<ul>
59-
<li><a name="poll.in"></a><code>in</code>: list&lt;borrow&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;&gt;</li>
59+
<li><a id="poll.in"></a><code>in</code>: list&lt;borrow&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;&gt;</li>
6060
</ul>
6161
<h5>Return values</h5>
6262
<ul>
63-
<li><a name="poll.0"></a> list&lt;<code>u32</code>&gt;</li>
63+
<li><a id="poll.0"></a> list&lt;<code>u32</code>&gt;</li>
6464
</ul>
65-
<h2><a name="wasi_clocks_monotonic_clock_0_2_1"></a>Import interface wasi:clocks/[email protected].1</h2>
65+
<h2><a id="wasi_clocks_monotonic_clock_0_2_2"></a>Import interface wasi:clocks/[email protected].2</h2>
6666
<p>WASI Monotonic Clock is a clock API intended to let users measure elapsed
6767
time.</p>
6868
<p>It is intended to be portable at least between Unix-family platforms and
@@ -71,57 +71,57 @@ Windows.</p>
7171
successive reads of the clock will produce non-decreasing values.</p>
7272
<hr />
7373
<h3>Types</h3>
74-
<h4><a name="pollable"></a><code>type pollable</code></h4>
74+
<h4><a id="pollable"></a><code>type pollable</code></h4>
7575
<p><a href="#pollable"><a href="#pollable"><code>pollable</code></a></a></p>
7676
<p>
77-
#### <a name="instant"></a>`type instant`
77+
#### <a id="instant"></a>`type instant`
7878
`u64`
7979
<p>An instant in time, in nanoseconds. An instant is relative to an
8080
unspecified initial value, and can only be compared to instances from
8181
the same monotonic-clock.
82-
<h4><a name="duration"></a><code>type duration</code></h4>
82+
<h4><a id="duration"></a><code>type duration</code></h4>
8383
<p><code>u64</code></p>
8484
<p>A duration of time, in nanoseconds.
8585
<hr />
8686
<h3>Functions</h3>
87-
<h4><a name="now"></a><code>now: func</code></h4>
87+
<h4><a id="now"></a><code>now: func</code></h4>
8888
<p>Read the current value of the clock.</p>
8989
<p>The clock is monotonic, therefore calling this function repeatedly will
9090
produce a sequence of non-decreasing values.</p>
9191
<h5>Return values</h5>
9292
<ul>
93-
<li><a name="now.0"></a> <a href="#instant"><a href="#instant"><code>instant</code></a></a></li>
93+
<li><a id="now.0"></a> <a href="#instant"><a href="#instant"><code>instant</code></a></a></li>
9494
</ul>
95-
<h4><a name="resolution"></a><code>resolution: func</code></h4>
95+
<h4><a id="resolution"></a><code>resolution: func</code></h4>
9696
<p>Query the resolution of the clock. Returns the duration of time
9797
corresponding to a clock tick.</p>
9898
<h5>Return values</h5>
9999
<ul>
100-
<li><a name="resolution.0"></a> <a href="#duration"><a href="#duration"><code>duration</code></a></a></li>
100+
<li><a id="resolution.0"></a> <a href="#duration"><a href="#duration"><code>duration</code></a></a></li>
101101
</ul>
102-
<h4><a name="subscribe_instant"></a><code>subscribe-instant: func</code></h4>
102+
<h4><a id="subscribe_instant"></a><code>subscribe-instant: func</code></h4>
103103
<p>Create a <a href="#pollable"><code>pollable</code></a> which will resolve once the specified instant
104104
has occurred.</p>
105105
<h5>Params</h5>
106106
<ul>
107-
<li><a name="subscribe_instant.when"></a><code>when</code>: <a href="#instant"><a href="#instant"><code>instant</code></a></a></li>
107+
<li><a id="subscribe_instant.when"></a><code>when</code>: <a href="#instant"><a href="#instant"><code>instant</code></a></a></li>
108108
</ul>
109109
<h5>Return values</h5>
110110
<ul>
111-
<li><a name="subscribe_instant.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
111+
<li><a id="subscribe_instant.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
112112
</ul>
113-
<h4><a name="subscribe_duration"></a><code>subscribe-duration: func</code></h4>
113+
<h4><a id="subscribe_duration"></a><code>subscribe-duration: func</code></h4>
114114
<p>Create a <a href="#pollable"><code>pollable</code></a> that will resolve after the specified duration has
115115
elapsed from the time this function is invoked.</p>
116116
<h5>Params</h5>
117117
<ul>
118-
<li><a name="subscribe_duration.when"></a><code>when</code>: <a href="#duration"><a href="#duration"><code>duration</code></a></a></li>
118+
<li><a id="subscribe_duration.when"></a><code>when</code>: <a href="#duration"><a href="#duration"><code>duration</code></a></a></li>
119119
</ul>
120120
<h5>Return values</h5>
121121
<ul>
122-
<li><a name="subscribe_duration.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
122+
<li><a id="subscribe_duration.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
123123
</ul>
124-
<h2><a name="wasi_clocks_wall_clock_0_2_1"></a>Import interface wasi:clocks/[email protected].1</h2>
124+
<h2><a id="wasi_clocks_wall_clock_0_2_2"></a>Import interface wasi:clocks/[email protected].2</h2>
125125
<p>WASI Wall Clock is a clock API intended to let users query the current
126126
time. The name &quot;wall&quot; makes an analogy to a &quot;clock on the wall&quot;, which
127127
is not necessarily monotonic as it may be reset.</p>
@@ -134,16 +134,16 @@ monotonic, making it unsuitable for measuring elapsed time.</p>
134134
<p>It is intended for reporting the current date and time for humans.</p>
135135
<hr />
136136
<h3>Types</h3>
137-
<h4><a name="datetime"></a><code>record datetime</code></h4>
137+
<h4><a id="datetime"></a><code>record datetime</code></h4>
138138
<p>A time and date in seconds plus nanoseconds.</p>
139139
<h5>Record Fields</h5>
140140
<ul>
141-
<li><a name="datetime.seconds"></a><code>seconds</code>: <code>u64</code></li>
142-
<li><a name="datetime.nanoseconds"></a><code>nanoseconds</code>: <code>u32</code></li>
141+
<li><a id="datetime.seconds"></a><code>seconds</code>: <code>u64</code></li>
142+
<li><a id="datetime.nanoseconds"></a><code>nanoseconds</code>: <code>u32</code></li>
143143
</ul>
144144
<hr />
145145
<h3>Functions</h3>
146-
<h4><a name="now"></a><code>now: func</code></h4>
146+
<h4><a id="now"></a><code>now: func</code></h4>
147147
<p>Read the current value of the clock.</p>
148148
<p>This clock is not monotonic, therefore calling this function repeatedly
149149
will not necessarily produce a sequence of non-decreasing values.</p>
@@ -153,29 +153,29 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
153153
<p>The nanoseconds field of the output is always less than 1000000000.</p>
154154
<h5>Return values</h5>
155155
<ul>
156-
<li><a name="now.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
156+
<li><a id="now.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
157157
</ul>
158-
<h4><a name="resolution"></a><code>resolution: func</code></h4>
158+
<h4><a id="resolution"></a><code>resolution: func</code></h4>
159159
<p>Query the resolution of the clock.</p>
160160
<p>The nanoseconds field of the output is always less than 1000000000.</p>
161161
<h5>Return values</h5>
162162
<ul>
163-
<li><a name="resolution.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
163+
<li><a id="resolution.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
164164
</ul>
165-
<h2><a name="wasi_clocks_timezone_0_2_1"></a>Import interface wasi:clocks/[email protected].1</h2>
165+
<h2><a id="wasi_clocks_timezone_0_2_2"></a>Import interface wasi:clocks/[email protected].2</h2>
166166
<hr />
167167
<h3>Types</h3>
168-
<h4><a name="datetime"></a><code>type datetime</code></h4>
168+
<h4><a id="datetime"></a><code>type datetime</code></h4>
169169
<p><a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></p>
170170
<p>
171-
#### <a name="timezone_display"></a>`record timezone-display`
171+
#### <a id="timezone_display"></a>`record timezone-display`
172172
<p>Information useful for displaying the timezone of a specific <a href="#datetime"><code>datetime</code></a>.</p>
173173
<p>This information may vary within a single <code>timezone</code> to reflect daylight
174174
saving time adjustments.</p>
175175
<h5>Record Fields</h5>
176176
<ul>
177177
<li>
178-
<p><a name="timezone_display.utc_offset"></a><a href="#utc_offset"><code>utc-offset</code></a>: <code>s32</code></p>
178+
<p><a id="timezone_display.utc_offset"></a><a href="#utc_offset"><code>utc-offset</code></a>: <code>s32</code></p>
179179
<p>The number of seconds difference between UTC time and the local
180180
time of the timezone.
181181
<p>The returned value will always be less than 86400 which is the
@@ -184,7 +184,7 @@ number of seconds in a day (24<em>60</em>60).</p>
184184
should return 0.</p>
185185
</li>
186186
<li>
187-
<p><a name="timezone_display.name"></a><code>name</code>: <code>string</code></p>
187+
<p><a id="timezone_display.name"></a><code>name</code>: <code>string</code></p>
188188
<p>The abbreviated name of the timezone to display to a user. The name
189189
`UTC` indicates Coordinated Universal Time. Otherwise, this should
190190
reference local standards for the name of the time zone.
@@ -194,15 +194,15 @@ should be the string <code>UTC</code>.</p>
194194
representation of the UTC offset may be returned, such as <code>-04:00</code>.</p>
195195
</li>
196196
<li>
197-
<p><a name="timezone_display.in_daylight_saving_time"></a><code>in-daylight-saving-time</code>: <code>bool</code></p>
197+
<p><a id="timezone_display.in_daylight_saving_time"></a><code>in-daylight-saving-time</code>: <code>bool</code></p>
198198
<p>Whether daylight saving time is active.
199199
<p>In implementations that do not expose an actual time zone, this
200200
should return false.</p>
201201
</li>
202202
</ul>
203203
<hr />
204204
<h3>Functions</h3>
205-
<h4><a name="display"></a><code>display: func</code></h4>
205+
<h4><a id="display"></a><code>display: func</code></h4>
206206
<p>Return information needed to display the given <a href="#datetime"><code>datetime</code></a>. This includes
207207
the UTC offset, the time zone name, and a flag indicating whether
208208
daylight saving time is active.</p>
@@ -211,19 +211,19 @@ daylight saving time is active.</p>
211211
saving time.</p>
212212
<h5>Params</h5>
213213
<ul>
214-
<li><a name="display.when"></a><code>when</code>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
214+
<li><a id="display.when"></a><code>when</code>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
215215
</ul>
216216
<h5>Return values</h5>
217217
<ul>
218-
<li><a name="display.0"></a> <a href="#timezone_display"><a href="#timezone_display"><code>timezone-display</code></a></a></li>
218+
<li><a id="display.0"></a> <a href="#timezone_display"><a href="#timezone_display"><code>timezone-display</code></a></a></li>
219219
</ul>
220-
<h4><a name="utc_offset"></a><code>utc-offset: func</code></h4>
220+
<h4><a id="utc_offset"></a><code>utc-offset: func</code></h4>
221221
<p>The same as <a href="#display"><code>display</code></a>, but only return the UTC offset.</p>
222222
<h5>Params</h5>
223223
<ul>
224-
<li><a name="utc_offset.when"></a><code>when</code>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
224+
<li><a id="utc_offset.when"></a><code>when</code>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
225225
</ul>
226226
<h5>Return values</h5>
227227
<ul>
228-
<li><a name="utc_offset.0"></a> <code>s32</code></li>
228+
<li><a id="utc_offset.0"></a> <code>s32</code></li>
229229
</ul>

wit/deps.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[io]
22
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
3-
sha256 = "2a74bd811adc46b5a0f19827ddbde89870e52b17615f4d0873f06fd977250caf"
4-
sha512 = "94624f00c66e66203592cee820f80b1ba91ecdb71f682c154f25eaf71f8d8954197dcb64503bc21e72ed5e812af7eae876df47b7eb727b02db3a74a7ce0aefca"
3+
sha256 = "6d8dbfaaaa685167c1829616dc7265f5f3cb776845879555612d56544f6d9bfc"
4+
sha512 = "52219562c4183503169cd2947b8164e1c96974500a5adf15bbf382c5992a10a626cc89c3b319204aeda6698ce59cbca2c42f98f7fde296aa77b9db4b41154dbe"

wit/deps/io/error.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.1;
1+
package wasi:io@0.2.2;
22

33
@since(version = 0.2.0)
44
interface error {

wit/deps/io/poll.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.1;
1+
package wasi:io@0.2.2;
22

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

wit/deps/io/streams.wit

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.1;
1+
package wasi:io@0.2.2;
22

33
/// WASI I/O is an I/O abstraction API which is currently focused on providing
44
/// stream types.
@@ -18,6 +18,9 @@ interface streams {
1818
/// The last operation (a write or flush) failed before completion.
1919
///
2020
/// More information is available in the `error` payload.
21+
///
22+
/// After this, the stream will be closed. All future operations return
23+
/// `stream-error::closed`.
2124
last-operation-failed(error),
2225
/// The stream is closed: no more input will be accepted by the
2326
/// stream. A closed output-stream will return this error on all
@@ -205,6 +208,7 @@ interface streams {
205208
/// The created `pollable` is a child resource of the `output-stream`.
206209
/// Implementations may trap if the `output-stream` is dropped before
207210
/// all derived `pollable`s created with this function are dropped.
211+
@since(version = 0.2.0)
208212
subscribe: func() -> pollable;
209213

210214
/// Write zeroes to a stream.

wit/deps/io/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.1;
1+
package wasi:io@0.2.2;
22

33
@since(version = 0.2.0)
44
world imports {

wit/monotonic-clock.wit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.1;
1+
package wasi:clocks@0.2.2;
22
/// WASI Monotonic Clock is a clock API intended to let users measure elapsed
33
/// time.
44
///
@@ -10,7 +10,7 @@ package wasi:[email protected];
1010
@since(version = 0.2.0)
1111
interface monotonic-clock {
1212
@since(version = 0.2.0)
13-
use wasi:io/poll@0.2.1.{pollable};
13+
use wasi:io/poll@0.2.2.{pollable};
1414

1515
/// An instant in time, in nanoseconds. An instant is relative to an
1616
/// unspecified initial value, and can only be compared to instances from

wit/timezone.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.1;
1+
package wasi:clocks@0.2.2;
22

33
@unstable(feature = clocks-timezone)
44
interface timezone {

wit/wall-clock.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.1;
1+
package wasi:clocks@0.2.2;
22
/// WASI Wall Clock is a clock API intended to let users query the current
33
/// time. The name "wall" makes an analogy to a "clock on the wall", which
44
/// is not necessarily monotonic as it may be reset.

0 commit comments

Comments
 (0)