Component bindgen panics on a type alias imported with `use`

Aperta
#1,938 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust, wasm
Ambito
compilers

Direzione di ricerca

The panic comes from Ctx::lookup_uvar in src/hyperlight_component_util/src/tv.rs, around line 24. Reproduce it by running host_bindgen! on the WIT in the issue, then compare how a used alias resolves with how an alias defined inside the same interface resolves. Done means the snippet generates bindings without panicking, with a regression test added alongside it.

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

Descrizione

S-needs-triage

host_bindgen! panics when an interface uses an alias that another interface defines.

package a:b;
interface t { record p { x: u32 } type q = p; }
interface h { use t.{q}; f: func(x: q) -> q; }
world w { import h; }
index out of bounds: the len is 0 but the index is 0

The panic is in Ctx::lookup_uvar. Using the record directly works, and so does an alias used within the interface that defines it.

Lingua principale
Rust
Stelle
4.8k
Fork
223
Merge medio
1g 18h
PR unite (30g)
65

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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/hyperlight

Tutte le issue di hyperlight-dev/hyperlight

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.