forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start to port Wasmtime to the new wasi-io API with resources.
This imports the new APIs posted in WebAssembly/wasi-io#46.
- Loading branch information
1 parent
ce4950e
commit b88f250
Showing
19 changed files
with
299 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package wasi:io | ||
|
||
/// A poll API intended to let users wait for I/O events on multiple handles | ||
/// at once. | ||
interface poll { | ||
/// A "pollable" handle. | ||
resource pollable | ||
|
||
/// 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<u32>` contains one or more indices of handles in the | ||
/// argument list that is ready for I/O. | ||
/// | ||
/// If the list contains more elements than can be indexed with a `u32` | ||
/// value, this function traps. | ||
/// | ||
/// 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 | ||
/// being reaedy for I/O. | ||
poll-list: func(in: list<pollable>) -> list<u32> | ||
|
||
/// Poll for completion on a single pollable. | ||
/// | ||
/// This function is similar to `poll-list`, but operates on only a single | ||
/// pollable. When it returns, the handle is ready for I/O. | ||
poll-one: func(in: pollable) | ||
} |
Oops, something went wrong.