alexcrichton requested dicej for a review on PR #12748.
alexcrichton requested wasmtime-core-reviewers for a review on PR #12748.
alexcrichton requested wasmtime-wasi-reviewers for a review on PR #12748.
alexcrichton opened PR #12748 from alexcrichton:refactor-wasi-http to bytecodealliance:main:
This PR is a refactoring and reorganization mostly around WASIp2's implementation of
wasi:http. Notably I am trying to get the implementations in this crate to look more likewasmtime-wasiwith changes such as:
- There's a top-level
p2andp3module for each respective implementation.- There's a
WasiHttpViewtrait which projects outWasiHttpCtxViewfor both WASI versions- Both WASI versions have access to the same
WasiHttpCtxstructure- Eventually there will be a single
WasiHttpViewandWasiHttpCtxViewtrait/struct (that's not done just yet)This PR is a step in this direction. There are two commits here which are doing similar things but are still separate. The first moves all the WASIp2 bits under a
p2top-level module. The second applies many structural refactorings to resolve the remaining bullets above.Future work here includes accounting for #12674, working to have a single
WasiHttpHookstrait (and thus a singleWasiHttpViewtrait/WasiHttpCtxViewstruct), and updating idioms around WASIp2 to look more like WASIp3 (e.g. similar-looking embedder-style APIs).
alexcrichton requested wasmtime-default-reviewers for a review on PR #12748.
alexcrichton updated PR #12748.
alexcrichton updated PR #12748.
alexcrichton updated PR #12748.
github-actions[bot] added the label wasi on PR #12748.
rvolosatovs submitted PR review.
rvolosatovs created PR review comment:
Out of curiosity, is there a reason to use empty array here as opposed to e.g. a unit?
rvolosatovs submitted PR review.
dicej submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
While I thought it was possible to return
&mut ZST, apparently that's only implemented for empty arrays in rustc rather than all empty types -- hence the array here. It was the only way I could think of to safely get a&'static mut Tto implement the trait on.
alexcrichton added PR #12748 Refactor WASIp2 wasi:http implementation to the merge queue.
github-merge-queue[bot] removed PR #12748 Refactor WASIp2 wasi:http implementation from the merge queue.
alexcrichton updated PR #12748.
alexcrichton has enabled auto merge for PR #12748.
alexcrichton added PR #12748 Refactor WASIp2 wasi:http implementation to the merge queue.
alexcrichton removed PR #12748 Refactor WASIp2 wasi:http implementation from the merge queue.
alexcrichton merged PR #12748.
Last updated: Mar 23 2026 at 16:19 UTC