Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to Resources, and other API cleanups. #46

Merged
merged 6 commits into from
Sep 29, 2023

Conversation

sunfishcode
Copy link
Member

@sunfishcode sunfishcode commented Sep 12, 2023

  • Convert to resources. Use resources instead of u32s, remove drop functions, this arguments, and rename subscribe-to-* to just subscribe, as discussed in Update to resources. wasi-poll#21.

  • Merge wasi-poll into wasi-io. These two proposals are closely related to each other, so it makes sense to have them together.

  • While here, tidy up the poll API, incorporating ideas discussed in Rename poll_oneoff to poll_list, add poll_one wasi-poll#22:

    • Rename poll-oneoff to poll-list, and add a poll-one.

    • Change poll-oneoff's return type from list<bool> to list<u32> where each u32 is the index of a ready input, because in the common case, this should allow it to create much smaller allocations.

@sunfishcode
Copy link
Member Author

The CI failure will be fixed by bytecodealliance/wit-bindgen#666.

 - Convert to resources. Use resources instead of `u32`s, remove
   drop functions, `this` arguments, and rename `subscribe-to-*`
   to just `subscribe`, as discussed in WebAssembly/wasi-poll#21.

 - Merge wasi-poll into wasi-io. These two proposals are closely
   related to each other, so it makes sense to have them together.

 - While here, tidy up the poll API, incorporating ideas discussed
   in WebAssembly/wasi-poll#22:

   - Rename `poll-oneoff` to `poll-list`, and add a `poll-one`.

   - Change `poll-oneoff`'s return type from `list<bool>` to `list<u32>`,
     because in the common case, this should allow it to create much
     smaller allocations.
sunfishcode added a commit to sunfishcode/wasmtime that referenced this pull request Sep 12, 2023
sunfishcode added a commit to sunfishcode/wasi-clocks that referenced this pull request Sep 13, 2023
wasi-clocks no longer has any pseudo-resources, so this just updates the poll
dependency to account for the changes in WebAssembly/wasi-io#46.
sunfishcode added a commit to sunfishcode/wasi-filesystem that referenced this pull request Sep 13, 2023
Convert `descriptor` and `directory-entry-stream` to resources, and update
the dependencies to account for the changes in WebAssembly/wasi-io#46 and
WebAssembly/wasi-clocks#50.
sunfishcode added a commit to sunfishcode/wasi-sockets that referenced this pull request Sep 13, 2023
Convert `tcp-socket`, `udp-socket`, `network`, and `resolve-address-stream`
to resources.

This also updates the dependencies to account for the changes in
WebAssembly/wasi-io#46.
sunfishcode added a commit to sunfishcode/wasi-cli that referenced this pull request Sep 13, 2023
Convert terminal-input and terminal-output to resources, and update the
dependencies to account for:
 - WebAssembly/wasi-io#46
 - WebAssembly/wasi-clocks#50
 - WebAssembly/wasi-filesystem#132
 - WebAssembly/wasi-random#34
 - WebAssembly/wasi-sockets#61
sunfishcode added a commit to sunfishcode/wasmtime that referenced this pull request Sep 14, 2023
@sunfishcode
Copy link
Member Author

The wit-bindgen issue mentioned above is now fixed, and we now have at least some implementation experience with this, so let's land this and continue to iterate from here.

@sunfishcode sunfishcode merged commit 1f37cec into WebAssembly:main Sep 29, 2023
1 check passed
@sunfishcode sunfishcode deleted the resources branch September 29, 2023 22:25
sunfishcode added a commit to WebAssembly/wasi-clocks that referenced this pull request Sep 29, 2023
* Convert to resources.

wasi-clocks no longer has any pseudo-resources, so this just updates the poll
dependency to account for the changes in WebAssembly/wasi-io#46.

* git add poll.wit

* Update to wit-abi-up-to-date@v14.

* Update to actions/checkout@v3.

* Update to the latest wasi-io changes.

* Update to wit-abi-up-to-date@v15 and wit-deps 0.3.3.

* wasi-io is now updated
sunfishcode added a commit to WebAssembly/wasi-filesystem that referenced this pull request Sep 29, 2023
* Convert to resources.

Convert `descriptor` and `directory-entry-stream` to resources, and update
the dependencies to account for the changes in WebAssembly/wasi-io#46 and
WebAssembly/wasi-clocks#50.

* Update CI dependencies.

* Update generated files.

* Remove `this` arguments.

* Remove the old `poll` wit files, which are now in wasi:io.

* Update to the latest wasi-io changes.

* Fix descriptor arguments to be borrows.

* Update to wit-abi-up-to-date@v15 and wit-deps 0.3.3.

* Update to the main io and clocks branches.
sunfishcode added a commit to WebAssembly/wasi-cli that referenced this pull request Sep 29, 2023
* Convert to resources.

Convert terminal-input and terminal-output to resources, and update the
dependencies to account for:
 - WebAssembly/wasi-io#46
 - WebAssembly/wasi-clocks#50
 - WebAssembly/wasi-filesystem#132
 - WebAssembly/wasi-random#34
 - WebAssembly/wasi-sockets#61

* Update to the latest filesystem/types.wit.

* Update to wit-abi-up-to-date@v15 and wit-deps 0.3.3.

* Update to the latest main branches of the upstream repos.

* Update to the latest dependencies.
pchickey pushed a commit that referenced this pull request Nov 29, 2023
Phase 4 Advancement Criteria got renamed to Portability Criteria in WebAssembly/WASI#549, so rename it in this document.

Also, this document never got the portability criteria filled in, but we have assigned it the same criteria as was filled in for wasi-poll, which got merged with this package in #46
pchickey pushed a commit that referenced this pull request Nov 29, 2023
* Update README.md

Phase 4 Advancement Criteria got renamed to Portability Criteria in WebAssembly/WASI#549, so rename it in this document.

Also, this document never got the portability criteria filled in, but we have assigned it the same criteria as was filled in for wasi-poll, which got merged with this package in #46

* Update README.md

* Update README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant