Skip to content

Commit

Permalink
rename example-world to imports world (#49)
Browse files Browse the repository at this point in the history
* rename example-world to imports world

Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>

* chore: update wit deps

Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>

---------

Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>
  • Loading branch information
Mossaka committed Sep 13, 2023
1 parent 958c1a1 commit 5614600
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions wit/deps.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[poll]
url = "https://github.com/WebAssembly/wasi-poll/archive/main.tar.gz"
sha256 = "9f8bb4d9994e9b0684859bb1e8bee2a8b873e04d40695f260446760fc44d0c58"
sha512 = "aa8da395ba6e189ec113296996da5abf28bdc4460e4eb2aacc786698ced892e08f7054fb590fc8809c05554d5c83a11494d4ab68c755746f57d151e212415cfb"
sha256 = "d4c27124f4c137eb538b5c92ba5858ed9042e11b24a2eef85d14becd0b7f55de"
sha512 = "422c01b273b4b1377ece6f2e4ba0dfc609ca8ef30a3e0be0e172e1303fcf7b3ca4c470f4dea6c51bdf114b0f5c871ebc4934dfe3bf217d66ea689748df2b1e55"
24 changes: 17 additions & 7 deletions wit/deps/poll/poll.wit
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,27 @@ interface poll {

/// 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.
///
/// The result `list<bool>` is the same length as the argument
/// `list<pollable>`, and indicates the readiness of each corresponding
/// element in that list, with true indicating ready. A single call can
/// return multiple true elements.
///
/// A timeout can be implemented by adding a pollable from the
/// wasi-clocks API to the list.
///
/// This function does not return a `result`; polling in itself does not
/// do any I/O so it doesn't fail. If any of the I/O sources identified by
/// the pollables has an error, it is indicated by marking the source as
/// ready in the `list<bool>`.
///
/// The "oneoff" in the name refers to the fact that this function must do a
/// linear scan through the entire list of subscriptions, which may be
/// inefficient if the number is large and the same subscriptions are used
/// many times. In the future, this is expected to be obsoleted by the
/// component model async proposal, which will include a scalable waiting
/// facility.
///
/// Note that the return type would ideally be `list<bool>`, but that would
/// be more difficult to polyfill given the current state of `wit-bindgen`.
/// See <https://github.com/bytecodealliance/preview2-prototyping/pull/11#issuecomment-1329873061>
/// for details. For now, we use zero to mean "not ready" and non-zero to
/// mean "ready".
poll-oneoff: func(in: list<pollable>) -> list<u8>
poll-oneoff: func(in: list<pollable>) -> list<bool>
}
2 changes: 1 addition & 1 deletion wit/world.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package wasi:clocks

world example-world {
world imports {
import monotonic-clock
import wall-clock
import timezone
Expand Down

0 comments on commit 5614600

Please sign in to comment.