Skip to content

Bump Wasmtime to v51.0.0 - #3773

Merged
itowlson merged 3 commits into
mainfrom
bump-wasmtime/prerelease-51.0.0
Nov 22, 2026
Merged

itowlson merged 3 commits into
mainfrom
bump-wasmtime/prerelease-51.0.0

Conversation

@spinframeworkbot

@spinframeworkbot spinframeworkbot commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Bumps Wasmtime to v51.0.0

@alexcrichton

Copy link
Copy Markdown
Contributor

I believe the main failure here is a bug in Wasmtime which I'm taking a look at

alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Nov 5, 2026
The validation added in bytecodealliance#15000 was unfortunately a bit too eager in the
classification of sync/async and disallowed valid configurations. An
example is in spinframework/spin#3773 there are async imports and sync
exports, but the exports are all bindgen'd with `async`. This commit
reverts the validation/error from bytecodealliance#15000 and adds a small test to ensure
that this keeps working in the future.
@alexcrichton

Copy link
Copy Markdown
Contributor

hurray prerelease testing working! bytecodealliance/wasmtime#15165

adamrk pushed a commit to adamrk/wasmtime that referenced this pull request Nov 11, 2026
…ytecodealliance#15165)

The validation added in bytecodealliance#15000 was unfortunately a bit too eager in the
classification of sync/async and disallowed valid configurations. An
example is in spinframework/spin#3773 there are async imports and sync
exports, but the exports are all bindgen'd with `async`. This commit
reverts the validation/error from bytecodealliance#15000 and adds a small test to ensure
that this keeps working in the future.
alexcrichton added a commit to bytecodealliance/wasmtime that referenced this pull request Nov 12, 2026
The validation added in #15000 was unfortunately a bit too eager in the
classification of sync/async and disallowed valid configurations. An
example is in spinframework/spin#3773 there are async imports and sync
exports, but the exports are all bindgen'd with `async`. This commit
reverts the validation/error from #15000 and adds a small test to ensure
that this keeps working in the future.
@alexcrichton

Copy link
Copy Markdown
Contributor

Ok so the remaining two failures I think are related to the Host header and wasmtime-wasi. There've been so many iterations of what's going on upstream in Wasmtime that I have no idea where things are at, but I think Spin is stripping the Host header here before the interceptor, but the the interceptor when sending it back to Wasmtime fails because wasmtime-wasi-http now requires the host header to be present.

@itowlson (or others) would one of y'all be able to help sort that out? I'm not sure the best solution myself.

@itowlson

Copy link
Copy Markdown
Contributor

@lann I can't trace the origin of the Host header removal code (your name is in the blame, but that's as part of a refactoring), but I think it might have been you? The comment on it is:

// Some servers (looking at you nginx) don't like a host header even though
// http/2 allows it: https://github.com/hyperium/hyper/issues/3298.
//
// Note that we do this _before_ invoking the request interceptor.  It may
// decide to add the `host` header back in, regardless of the nginx bug, in
// which case we'll let it do so without interferring.

If that's the case:

  • Is wasmtime-wasi-http requiring a Host header a potential regression?
  • What should we do in the meantime?

(I'm happy to take on implementation if you don't have bandwidth, but I need guidance from a certified HTTP brain first.)

@alexcrichton

Copy link
Copy Markdown
Contributor

AFAIK the changes in wasmtime-wasi-http are intentional, but in my head it's been caught up in a large quagmire of playing whack-a-mole with LLM-found vulnerabilities/bugs to the extent that I've not been able to keep up with it as to the precise rationale.

@dicej

dicej commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

I was involved in the host header removal. Per the comment @itowlson quoted, it's true that some nginx servers will reject HTTP/2 requests with host headers, which is a bug since the HTTP/2 spec allows it, but we have to work around that bug if we want to talk to such servers. So if wasmtime-wasi-http is requiring the header to be present, we'll need to add a way to disable that. I thought we provided our own outbound request handler, though, so I'm not sure why wasmtime-wasi-http is involved at that point, but I'll investigate and open a PR if appropriate.

@itowlson

Copy link
Copy Markdown
Contributor

@dicej @alexcrichton Are we any closer to a way forward on this? I'm conscious that Wasmtime 51 must be releasing soon and I don't know if we have a solution for the required-Host problem yet. Sorry to badger but I don't know how to progress it without your or Lann's involvement.

@dicej

dicej commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@dicej @alexcrichton Are we any closer to a way forward on this? I'm conscious that Wasmtime 51 must be releasing soon and I don't know if we have a solution for the required-Host problem yet. Sorry to badger but I don't know how to progress it without your or Lann's involvement.

I just got around to looking at this as of about an hour ago and am not sure yet of the way forward.

Ideally, we'd only remove the Host header from outgoing HTTP/2 requests, which would address the nginx issue without running afoul of wasmtime-wasi-http's (and any other server's) enforcement that HTTP/1.x requests must have such a header. To that end, I dove into hyper-util's source code to see if there was a way to tweak a request once the HTTP version is known, but I'm not seeing a way to do that short of forking it.

The fallback plan would be to open a PR to make the wasmtime-wasi-http enforcement configurable and backport that to the release-51.0.0 branch.

BTW, one thing that's confusing me is that I can't seem to find where in the code service chaining happens. I see references to spin.internal all over the allowed host validation, but nothing in e.g. ./crates/factor-outbound-http/src/wasi.rs. One option would be to manually set the version to HTTP/2 for chained requests, which will bypass the host header check, but I can't see where to do that. Do you happen to know, @itowlson?

@dicej

dicej commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Nevermind, I see where service chaining is happening, now. Going to test a patch shortly...

@dicej

dicej commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Patch worked; will clean up and push shortly.

Signed-off-by: spinframeworkbot <202838904+spinframeworkbot@users.noreply.github.com>
@dicej
dicej force-pushed the bump-wasmtime/prerelease-51.0.0 branch from 04fe4e9 to fb28e77 Compare November 19, 2026 21:38
See the comments for details.

Signed-off-by: Joel Dice <joel.dice@akamai.com>
@dicej
dicej force-pushed the bump-wasmtime/prerelease-51.0.0 branch from fb28e77 to ac0f357 Compare November 19, 2026 21:39
@itowlson

Copy link
Copy Markdown
Contributor

Brilliant, thank you so much @dicej

Signed-off-by: Alex Crichton <alex@alexcrichton.com>
@alexcrichton
alexcrichton marked this pull request as ready for review November 20, 2026 17:17
@alexcrichton alexcrichton changed the title Bump Wasmtime to v51.0.0 prerelease Bump Wasmtime to v51.0.0 Nov 20, 2026
@itowlson

Copy link
Copy Markdown
Contributor

GH is moaning about unverified commits but I think that is spinframeworkbot not living up to the project's high standards. Looked over the rest and they seem okay.

@itowlson
itowlson disabled auto-merge November 22, 2026 18:58
@itowlson
itowlson merged commit b8f889f into main Nov 22, 2026
17 checks passed
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.

4 participants