File tree Expand file tree Collapse file tree 11 files changed +2334
-2206
lines changed Expand file tree Collapse file tree 11 files changed +2334
-2206
lines changed Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
1
[clocks]
2
- url = "https://github.com/WebAssembly /wasi-clocks/archive/main .tar.gz"
3
- sha256 = "1ed7e35b3f9738663854f0dd92a95bfadc410ea07170501f5c2fec0cc24e3d57 "
4
- sha512 = "ef1e23704a8a8436fd3718593d4c4d8b6d1c64dad3595b7496c0888ca14b725046f2900109800faca1bc8c14f237cdcaca791dba8284e1ad50105ab2d036825b "
2
+ url = "https://github.com/sunfishcode /wasi-clocks/archive/resources .tar.gz"
3
+ sha256 = "ea955af7a152f85941b651c5b07345c4f077ae7f9e996c909ab8cc0a68c0120e "
4
+ sha512 = "114bc4f583a487cf1ccfdd6efa25c4c60cf637d4501a189eebd4b1d52aec2c8eb63ae14ce494db53dfd25bc20f6c4b533dc6f2143537e5cd14ca80d5d4b6a49d "
5
5
6
6
[io]
7
- url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
8
- sha256 = "a47690f7d4dba1683a42897cc65fe813409827d72cc93afe03b127ee81763e13"
9
- sha512 = "661aa9cf9c67d7d712caccfbb3c317da01b033764892623c8902d9dcfdb67f3088889102b036d3ed19d818a5c2d151247b25d9f6fd145cdf433f325605a5a747"
10
-
11
- [poll]
12
- url = "https://github.com/WebAssembly/wasi-poll/archive/main.tar.gz"
13
- sha256 = "d4c27124f4c137eb538b5c92ba5858ed9042e11b24a2eef85d14becd0b7f55de"
14
- sha512 = "422c01b273b4b1377ece6f2e4ba0dfc609ca8ef30a3e0be0e172e1303fcf7b3ca4c470f4dea6c51bdf114b0f5c871ebc4934dfe3bf217d66ea689748df2b1e55"
7
+ url = "https://github.com/sunfishcode/wasi-io/archive/resources.tar.gz"
8
+ sha256 = "c01495e96837dbd33b8d8dd70b75a0bf2ee5795b6c85ab50701e870bbcf2ceb3"
9
+ sha512 = "fd8f60fad6560396d07d530efb76a4c54ce823d523528ba5ba61ccdc521e361c1e9660d0a77c02a5e6b80ea981cddedbaa703322f1ba502333784ea974edb835"
Original file line number Diff line number Diff line change 1
- io = " https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
2
- poll = " https://github.com/WebAssembly/wasi-poll/archive/main.tar.gz"
3
- clocks = " https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
1
+ # Temporarily use the resources branches.
2
+ # io = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
3
+ io = " https://github.com/sunfishcode/wasi-io/archive/resources.tar.gz"
4
+ # clocks = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
5
+ clocks = " https://github.com/sunfishcode/wasi-clocks/archive/resources.tar.gz"
Original file line number Diff line number Diff line change 9
9
///
10
10
/// It is intended for measuring elapsed time.
11
11
interface monotonic-clock {
12
- use wasi :poll /poll . {pollable }
12
+ use wasi :io /poll . {pollable }
13
13
14
14
/// A timestamp in nanoseconds.
15
15
type instant = u64
Original file line number Diff line number Diff line change 1
1
interface timezone {
2
2
use wall-clock . {datetime }
3
3
4
- /// A timezone.
5
- ///
6
- /// In timezones that recognize daylight saving time, also known as daylight
7
- /// time and summer time, the information returned from the functions varies
8
- /// over time to reflect these adjustments.
9
- ///
10
- /// This [represents a resource](https://github.com/WebAssembly/WASI/blob/main/docs/WitInWasi.md#Resources).
11
- type timezone = u32
12
-
13
4
/// Return information needed to display the given `datetime` . This includes
14
5
/// the UTC offset, the time zone name, and a flag indicating whether
15
6
/// daylight saving time is active.
16
7
///
17
8
/// If the timezone cannot be determined for the given `datetime` , return a
18
9
/// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight
19
10
/// saving time.
20
- display : func (this : timezone , when : datetime ) -> timezone-display
11
+ display : func (when : datetime ) -> timezone-display
21
12
22
13
/// The same as `display` , but only return the UTC offset.
23
- utc-offset : func (this : timezone , when : datetime ) -> s32
24
-
25
- /// Dispose of the specified input-stream, after which it may no longer
26
- /// be used.
27
- drop-timezone : func (this : timezone )
14
+ utc-offset : func (when : datetime ) -> s32
28
15
29
16
/// Information useful for displaying the timezone of a specific `datetime` .
30
17
///
Original file line number Diff line number Diff line change 1
1
package wasi : clocks
2
2
3
- world example-world {
3
+ world imports {
4
4
import monotonic-clock
5
5
import wall-clock
6
6
import timezone
Original file line number Diff line number Diff line change
1
+ package wasi : io
2
+
3
+ /// A poll API intended to let users wait for I/O events on multiple handles
4
+ /// at once.
5
+ interface poll {
6
+ /// A "pollable" handle.
7
+ resource pollable
8
+
9
+ /// Poll for completion on a set of pollables.
10
+ ///
11
+ /// This function takes a list of pollables, which identify I/O sources of
12
+ /// interest, and waits until one or more of the events is ready for I/O.
13
+ ///
14
+ /// The result `list<u32>` contains one or more indices of handles in the
15
+ /// argument list that is ready for I/O.
16
+ ///
17
+ /// If the list contains more elements than can be indexed with a `u32`
18
+ /// value, this function traps.
19
+ ///
20
+ /// A timeout can be implemented by adding a pollable from the
21
+ /// wasi-clocks API to the list.
22
+ ///
23
+ /// This function does not return a `result` ; polling in itself does not
24
+ /// do any I/O so it doesn't fail. If any of the I/O sources identified by
25
+ /// the pollables has an error, it is indicated by marking the source as
26
+ /// being reaedy for I/O.
27
+ poll-list : func (in : list <pollable >) -> list <u32 >
28
+
29
+ /// Poll for completion on a single pollable.
30
+ ///
31
+ /// This function is similar to `poll-list` , but operates on only a single
32
+ /// pollable. When it returns, the handle is ready for I/O.
33
+ poll-one : func (in : pollable )
34
+ }
You can’t perform that action at this time.
0 commit comments