Replace the Node-hosted Wasm sample with a Wasmtime WASI-HTTP component

Aperta
#2 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
kubernetes, rust, wasm

Direzione di ricerca

Start with docs/designs/runtime-adapters.md and upstream issue hyperlight-dev/hyperlight-unikraft#196 to understand the required serving API and prerequisite. Then trace the existing Node/Wasm adapter and docs/examples/hello-wasm to map the workflow and tests to update. Done means the Rust WASI-HTTP 0.3 component builds through the normal container workflow and passes local HTTP and deployed snapshot-restore checks, including request bodies and streamed responses.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Replace the Node-hosted Wasm sample with a real Wasmtime-backed WASI-HTTP 0.3 component running inside Hyperlight. Keep it deployable as an HTTP Lampyr Service, rather than substituting a command-line WASI example or a custom TCP/JSON wrapper.

Upstream prerequisite

Track native HTTP hosting in hyperlight-dev/hyperlight-unikraft#196. The existing upstream driver supports commands, library components, and async WASI 0.3 exports, but does not currently provide the standard WASI-HTTP host. Implement and validate that upstream first, including HTTP resource/stream handling and serving after snapshot restore. Lampyr should consume its supported serving API and pinned release assets, not maintain a separate host or fork.

Lampyr changes
  • Keep ly init --runtime wasm, ly dev, ly build, and ly deploy as the user workflow.
  • Generate a minimal Rust WASI-HTTP component by default and compile it automatically in the container build. Users should not need separate Cargo, rustup, wasm-tools, Wasmtime, or component-conversion commands.
  • Map the Wasm runtime to the upstream Wasmtime filesystem image and serving entrypoint; pin and verify compatible assets.
  • Wasm needs its own handler ABI: the Service Handler / Runtime Adapter design (docs/designs/runtime-adapters.md) excludes it. Align the component's WIT world and generated bindings with the same Service Handler semantics.
  • Remove the Node/Wasm adapter rather than retaining it, and regenerate docs/examples/hello-wasm.
  • Update directly related docs and regression coverage; verify local HTTP execution and a deployed, snapshot-restored service through normal ingress, including request bodies and streamed responses.
Scope

WASI-HTTP 0.3 is the target contract, not HTTP/3. Additional command modes, WebSockets/gRPC support, and WASI-HTTP 0.2 compatibility are outside this change. Wasmtime currently marks its HTTP 0.3 implementation experimental, so compatibility must be pinned and tested explicitly.

Lingua principale
Rust
Stelle
3
Fork
2
Merge medio
3g 57m
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyperlight-dev/lampyr

Tutte le issue di hyperlight-dev/lampyr

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.