Stream: git-wasmtime

Topic: wasmtime / PR #14320 `wasmtime serve`: Support multiple s...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 11 2026 at 19:40):

simolus3 opened PR #14320 from simolus3:serve-unix-sockets to bytecodealliance:main:

This changes wasmtime serve to add support for

  1. Listening on multiple sockets: wasmtime serve currently serves http requests from a single TCP server. This adds support for multiple server sockets, which is useful to e.g. listen for both ipv4 and ipv6 connections, e.g. with wasmtime serve app.wasm --addr 127.0.0.1:8080 --addr [::1]:8080. Multiple sockets can also be inherited via --systemd-listenfd.
  2. Unix domain sockets. In setups where wasmtime serve runs behind a reverse proxy, using unix sockets instead of TCP is simpler and likely faster. With this PR, unix sockets can be inherited via --systemd-listenfd. This avoids having to parse both file paths and ip addresses from parameters, but maybe it makes sense to do that as well.

Support for multiple sockets is implemented by spawning one task per socket that otherwise runs the existing request loop. To avoid concurrency for debugging setup, that still runs outside of a concurrent task (and thus only supports a single socket).

view this post on Zulip Wasmtime GitHub notifications bot (Sep 11 2026 at 19:40):

simolus3 requested dicej for a review on PR #14320.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 11 2026 at 19:40):

simolus3 requested wasmtime-core-reviewers for a review on PR #14320.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 11 2026 at 19:48):

simolus3 updated PR #14320.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 15:24):

:thumbs_up: dicej submitted PR review:

Thanks, @simolus3!

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 15:24):

dicej added PR #14320 wasmtime serve: Support multiple sockets, unix sockets to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 15:43):

github-merge-queue[bot] removed PR #14320 wasmtime serve: Support multiple sockets, unix sockets from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 16:01):

dicej commented on PR #14320:

@simolus3 Looks like the Windows builds are failing due to ungated Unix-isms.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 16:13):

simolus3 updated PR #14320.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 16:17):

simolus3 commented on PR #14320:

I didn't know we couldn't do cfg in pin-project-lite, I'm now using this workaround, I also had to mark StdSocketServer::Inet as unix-only since it's not constructed on Windows builds, leading to a warning. It's a hard for me to test locally since I don't have access to Windows, but I hope it works now.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 16:17):

simolus3 edited a comment on PR #14320:

I didn't know we couldn't do cfg in pin-project-lite, I'm now using this workaround. I also had to mark StdSocketServer::Inet as unix-only since it's not constructed on Windows builds, leading to a warning. It's a hard for me to test locally since I don't have access to Windows, but I hope it works now.


Last updated: Sep 20 2026 at 18:08 UTC