Skip to content

Merging some WASIp3 PRs together, some more refactorings by me#750

Closed
alexcrichton wants to merge 17 commits intoWebAssembly:mainfrom
alexcrichton:wasip3
Closed

Merging some WASIp3 PRs together, some more refactorings by me#750
alexcrichton wants to merge 17 commits intoWebAssembly:mainfrom
alexcrichton:wasip3

Conversation

@alexcrichton
Copy link
Collaborator

Posting this in case others ar interested. I'll be doing my best to peel off commits from the base of this PR into separate PRs and getting those landed, but that'll require others to review my code.

* Generalize the `wasip2_{read,write}_t` types to `wasi_{read,write}_t`
  with conditional internals depending on the WASI version.
* Fix error handling for stdin to use stdin error codes instead of
  filesystem error codes.
* Call `subtask.drop` for writes to acknowledge the subtask being done.
* When stdin is done, drop the future for the error after it's read to
  ensure the future isn't read twice.
This is an initial implementation of some basic file-handling functions
such as reading, writing, opening directories, iterating them, etc. A
number of previously failing tests are now passing and the
`wasip2_file.c` implementation is now merged with WASIp3 with `file.c`.
Bindings generation is also updated to flag some specific functions as
being lowered synchronously as libc always blocks on the result.
Handle `O_APPEND` by calling `append-via-stream`
Use the same WASIp2 implementation for WASIp3
Use the wasip2 implementation
Use the wasip2 implementation
Use the wasip2 implementation
Use the wasip2 implementation
Use the wasip2 implementation
Use the wasip2 implementation
Use the wasip2 version
Use the wasip2 implementation
Use the wasip2 implementations
Don't re-read a stream once its termination has been received.
This is different than wasip2 so needed some custom implementations.
@alexcrichton
Copy link
Collaborator Author

Everything's landed and the final bits are at #759

@alexcrichton alexcrichton deleted the wasip3 branch March 3, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant