Support WASI-HTTP 0.3 services in the Wasmtime runtime
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust, wasm
- Ambito
- backend-api-design, networking
Direzione di ricerca
Start with drivers/wasmtime/driver/src/main.rs, especially the built-in WASI linking at lines 547–559, and review the Wasmtime 49 WASI-HTTP 0.3 host integration and typed Service::handle reference. Then trace the driver's networking and snapshot-restoration paths to determine how an HTTP listener and per-instance resources fit the runtime. Done means a forwarded-port request reaches the async handler, streams a correct response, works after snapshot restore, and existing command and library examples still pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Request
Support serving a standard wasi:http/[email protected] component with the Wasmtime runtime, including after restoring a Hyperlight snapshot.
The application should implement the standard HTTP handler rather than provide its own TCP server or a custom JSON request/response ABI. The runtime should handle the HTTP host interfaces and request dispatch.
Current behavior
The Wasmtime driver already supports WASI commands, library components, and asynchronous WASI 0.3 exports. The calculator example demonstrates both directions of calls:
- The embedder registers
math.add. - It then loads the component and invokes its exports.
- The driver links non-WASI function imports to embedder callbacks using JSON values.
However, the driver's built-in WASI interfaces explicitly exclude wasi:http, and its Cargo dependencies do not include wasmtime-wasi-http. Supporting asynchronous component exports does not by itself provide an HTTP host.
For WASI-HTTP 0.3, the relevant export is wasi:http/handler.handle, not the 0.2 incoming-handler interface:
handle: async func(request: request) -> result<response, error-code>;
These request/response resources and their body streams/futures need the standard host implementation rather than an application-defined JSON callback.
Proposed direction
- Use the compatible
wasmtime-wasi-http0.3 implementation alongside the driver's existing Wasmtime dependency. - Provide the HTTP context/resource table and link the standard HTTP imports.
- Add an explicit, documented serving path that dispatches network requests to the component's asynchronous handler and streams the response back.
- Prefer a runtime-owned HTTP listener reachable through the existing Hyperlight port-forwarding/network mechanism, keeping Wasmtime resources and streams local to the guest-side Wasmtime embedder.
- Keep tooling simple: a small component example and a normal
hlukinvocation, without making users register every HTTP import or write a custom host. - Preserve existing WASI command and library execution.
The precise serving API should fit the existing runtime design; this is not a proposal to implement HTTP through the calculator's JSON ABI.
Validation
- A minimal WASI-HTTP 0.3 component serves a GET request through a forwarded port.
- Method, path/query, headers, status, and a POST body round-trip correctly.
- Response body streaming works without buffering the complete body first.
- Client disconnects and component errors terminate cleanly without leaking tasks or resources.
- Serving works after restoring a compatible snapshot, including independent restored instances.
- Existing command, calculator, and asynchronous export examples still work.
References
- Wasmtime 49 WASI-HTTP 0.3 host integration
- Typed
Service::handleinvocation - WASI-HTTP 0.3 service world and handler
Wasmtime currently marks its 0.3 HTTP implementation experimental and unstable. Compatibility should be pinned and tested explicitly rather than presented as production-ready.
- Lingua principale
- Rust
- Stelle
- 72
- Fork
- 14
- Merge medio
- 15h 29m
- PR unite (30g)
- 40
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hyperlight-dev/hyperlight-unikraft
-
dependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hyperlight-dev/hyperlight-unikraft#136 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
ci/nightly
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
hyperlight-dev/hyperlight-unikraft#290 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
ci/nightly
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
hyperlight-dev/hyperlight-unikraft#288 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
ci/nightly
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
hyperlight-dev/hyperlight-unikraft#285 ·
I maintainer di solito rispondono entro 1 giorno
-
ci/nightly
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
hyperlight-dev/hyperlight-unikraft#262 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hyperlight-dev/hyperlight-unikraft
Issue simili
-
bug P2: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
-
tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
vfarcic/dot-agent-deck#2512 ·
I maintainer di solito rispondono entro 1 giorno