elliottt opened PR #7135 from elliottt:trevor/wasi-http-resources
to bytecodealliance:main
:
Migrate wasi-http over to resources, now that they've landed on main.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
elliottt updated PR #7135.
elliottt updated PR #7135.
elliottt updated PR #7135.
elliottt updated PR #7135.
elliottt updated PR #7135.
elliottt edited PR #7135:
Migrate wasi-http over to resources, now that they've landed on main.
This was a pretty straight-forward refactoring: I replaced all of the
u32
alias types for the pseudo-resources in the spec with actual resources. Using resources led to the complete removal of theTableHttpExt
trait, and also theTableLens
machinery that I had added earlier.One decision that I made here was to add static functions for the functions that we have that consume resources. These could have instead been functions not defined on the resource, but I liked being able to use a simple name like
finish
that was scoped to the resource rather than prefix it to make it unique.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
elliottt updated PR #7135.
elliottt has marked PR #7135 as ready for review.
elliottt requested fitzgen for a review on PR #7135.
elliottt requested wasmtime-core-reviewers for a review on PR #7135.
elliottt requested alexcrichton for a review on PR #7135.
elliottt requested sunfishcode for a review on PR #7135.
elliottt updated PR #7135.
alexcrichton submitted PR review:
:+1:
alexcrichton merged PR #7135.
Last updated: Nov 22 2024 at 17:03 UTC