Open
Conversation
Comment on lines
492
to
+511
| #[cfg(target_os = "linux")] | ||
| const POLLRDHUP: libc::c_short = libc::POLLRDHUP; | ||
| #[cfg(not(target_os = "linux"))] | ||
| const POLLRDHUP: libc::c_short = 0; | ||
|
|
||
| #[cfg(not(target_os = "wasi"))] | ||
| const POLLPRI: libc::c_short = libc::POLLPRI; | ||
| #[cfg(target_os = "wasi")] | ||
| const POLLPRI: libc::c_short = 0; | ||
|
|
||
| #[cfg(not(target_os = "wasi"))] | ||
| const POLLRDBAND: libc::c_short = libc::POLLRDBAND; | ||
| #[cfg(target_os = "wasi")] | ||
| const POLLRDBAND: libc::c_short = 0; | ||
|
|
||
| #[cfg(not(target_os = "wasi"))] | ||
| const POLLWRBAND: libc::c_short = libc::POLLWRBAND; | ||
| #[cfg(target_os = "wasi")] | ||
| const POLLWRBAND: libc::c_short = 0; | ||
|
|
There was a problem hiding this comment.
Depending on review feedback, this might be requested to become a macro, but I wouldn't preemptively make this a macro unless asked.
|
We'll also definitely want CI green before posting |
9b6503b to
c0aff3b
Compare
This adds support for WASIp2 networking using the `poll(2)`-based selector and
leaving most of the details to `wasi-libc`.
This includes a new `Waker` implementation since WASIp2 has neither
mulithreading, nor `pipe(2)`, nor `eventfd(2)`. Eventually, `wasi-libc`'s
support for WASIp3 will have both multithreading and `pipe(2)`, so that port
will be simpler.
I've triaged each previously-disabled-on-WASI integration test into one of three
categories:
- Enabled for p2; (still) disabled for p1
- Disabled for both p1 and p2 (e.g. due to use of `thread::spawn`)
- We should be able to enable some of these for p3 once it has multithreading
- Temporarily disabled for p2 due to bugs in `wasi-libc` and/or `wasmtime-wasi`
- These bugs have all been fixed, but have not yet made their way to a stable release
Note that I've added a `TestWASI` job to CI to run the tests using Wasmtime.
I've taken care to ensure that the existing `wasm32-wasip1` support has not
regressed. If desired, I could follow this up with a PR which removes p1
support entirely given its limited utility, which would reduce the amount of
`#[cfg]` clutter and maintenance burden.
5e5aff3 to
5fc5408
Compare
5fc5408 to
1ea9c38
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for WASIp2 networking using the
poll(2)-based selector and leaving most of the details towasi-libc.I've triaged each previously-disabled-on-WASI integration test into one of three categories:
thread::spawn)wasi-libcand/orwasmtime-wasiNote that I've bumped the MSRV to 1.82, which allows us to use
target_env = "p1"incfgdirectives. I've also added aTestWASIjob to CI to run the tests using Wasmtime.