Repository navigation
Conversation
Contributor
|
@bolinfest is on triage rotation this week and is the reviewer for this one. Labels come from the PR labeler. Please review the change. Automated triage. Labels are a first pass and the assigned maintainer has the final say. |
ricochet
marked this pull request as ready for review
October 15, 2026 19:06
Signed-off-by: Bailey Hayes <bailey@cosmonic.com>
ricochet
force-pushed
the
feat/local-streamable-http
branch
from
October 15, 2026 21:27
8075750 to
d77fa74
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabling
localcurrently compiles out the Streamable HTTP server even when its transport feature is selected. Keep the service and configuration exports available, dispatch HTTP background work through the existing local-aware spawning helper, and use the conditional boxed future for Tower calls.Handlers can now hold
!Sendvalues across awaits when the service runs on a TokioLocalSet. The handler and factory bounds stay as they are, and the standard Tokio path retainsSendfutures. This adds no runtime dependencies.Motivation and Context
We’re building Rust MCP servers as
--target wasm32-wasip3HTTP components on wasmCloud/Cosmonic. We want to use the official SDK’s HTTP transport and protocol handling while letting tools await host-provided WASI HTTP operations directly.Our current integration bridges Tokio and component-model async through an outbound request queue and serializes MCP exchanges within each component instance. We’re exploring native p3 execution to simplify that integration.
Supporting local handler futures in the HTTP transport is a prerequisite. The SDK already provides a local feature, but enabling it currently removes the HTTP server transport entirely. This PR takes a small, independently useful step to enable HTTP handler futures that hold !Send values across awaits, using the existing Tokio LocalSet support. A native p3 execution backend can follow separately.
How Has This Been Tested?
Rcacross an await and returns its value in the response.Breaking Changes
Non-breaking, backward-compatible addition.
Types of changes
Checklist
Additional context
Related: #290, #379. This supports local HTTP handler futures; services still run on Tokio.