Skip to content

Conversation

@alexcrichton
Copy link
Member

Various WASIp3 and component-model-async bug fixes and changes.

rvolosatovs and others added 9 commits September 10, 2025 11:30
* p3-http: correctly handle `result` future cancellation

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* p3-http: restructure the `content-length` test a bit

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* test(http): keep accepting connections after errors

prtest:full

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* test(p3-http): assert `handle` error on exceeding `content-length`

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* p3-http: perform `content-length` check early

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* test(p3-http): account for `handle` race condition

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* refactor(http): reuse `get_content_length`

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* p3-http: check `content-length` for host bodies

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* doc(p3-http): call out that host bodies are not validated

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* p3-http: refactor body size error send

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* fix(p3-http): do not rely on `Drop` for host body check

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* doc(p3-http): ensure non-default send request is documented

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* doc(p3-http): correct `send_request` doc

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

---------

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
…ealliance#11662)

* return `TaskExit` future from `[Typed]Func::call_concurrent`

In addition to returning the value produced by the callee, these functions now
also return a `TaskExit` future which resolves once the subtask (and any
transitively-created subtasks) have exited.  This partially addresses bytecodealliance#11600;
the next step will be to add a `wasmtime-wit-bindgen` option to expose the
`TaskExit` value in generated bindings.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* address review feedback

`TaskExit` now has an `async fn block` instead of closing over an `impl
AsAccessor` and implementing `Future`.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Changes include:

* `async` option on some CM intrinsics renamed to `cancellable`
* New `backpressure.{inc,dec}` intrinsics
* New component-model-threading-related intrinsics

New features aren't yet implemented, they're left for future PRs.
)

This builds on bytecodealliance#11662 by optionally exposing the `TaskExit` return value from
`[Typed]Func::call_concurrent` in the bindings generated for exported functions.

Note that the first two commits are shared with bytecodealliance#11662.

Fixes bytecodealliance#11600

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
bytecodealliance#11671)

This fixes a divergence between the spec and the implementation.  Thanks (again)
to Luke for providing a test case, which I've added here.

This addresses half of bytecodealliance#11582

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
…ed (bytecodealliance#11669)

* fix panic in `Instance::set_consumer` when write end is already dropped

In this case, we can drop the whole stream or future immediately since there's
nothing left to do with it.

Fixes bytecodealliance#11621

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* add test for piping from a stream whose write end is already dropped

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* wasip3: Add support to `wasmtime serve`

This commit adds support for WASIp3 to `wasmtime serve` by detecting
whether the input component is using a WASIp3 exported interface instead
of a WASIp2 exported interface (similar to how `wasmtime run` detects
which is supported).

* Fix tests

* Log guest result
…lliance#11678)

Now we wrap the "ready" set of work items in a struct which will gracefully
dispose of the remainder if we trap or panic while handling one of them.

Fixes bytecodealliance#11668

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Added to the async specification in WebAssembly/component-model#560
these are minor adaptations to the preexisting `backpressure.set`
intrinsic and are intended to replace it. The `backpressure.set`
intrinsic will remain until tooling propagates to understand
`backpressure.{inc,dec}`.
@alexcrichton alexcrichton requested review from a team as code owners September 11, 2025 02:04
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team September 11, 2025 02:04
@alexcrichton alexcrichton merged commit e9d8a7a into bytecodealliance:release-37.0.0 Sep 11, 2025
168 checks passed
@alexcrichton alexcrichton deleted the more-backports branch September 11, 2025 17:16
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.

3 participants