Expand description
HTTP server plugin for handling incoming HTTP requests.
This plugin implements the wasi:http/incoming-handler interface, allowing
WebAssembly components to handle HTTP requests. It provides a complete HTTP
server implementation with support for:
- Virtual hosting based on Host headers
- TLS/HTTPS connections
- Component isolation per request
- Graceful shutdown capabilities
§Architecture
The HTTP server plugin works by:
- Binding to a TCP socket and listening for connections
- Routing requests to components based on the Host header
- Creating isolated component instances for each request
- Managing the request/response lifecycle through WASI-HTTP
Structs§
- Http
Server - HTTP server plugin that handles incoming HTTP requests for WebAssembly components.
Functions§
- handle_
component_ request - Handle a component request using WASI HTTP (copied from wash/crates/src/cli/dev.rs)
Type Aliases§
- Workload
Handles - A map from host header to resolved workload handles and their associated component id