bytecodealliance / bytecodealliance/go-modules
wit, wit/bindgen: support abstract "pointer" type, size, and alignment
- Lingua principale
- Go
- Stelle
- 148
- Fork
- 20
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
In order to support `wasm64`, with 64-bit wide pointers, we need to relax the constraint in the Component Model and Canonical ABI that pointer types fit in 32 bits.
Ideally the generated Go code for a component can handle pointer widths of either 32 or 64 bits without baking assumptions into the precise memory layout of structures into the lifting and lowering code.
### Tasks
- [ ] Reconcile this with proposed `wasm64` support in the Component Model spec.
- [ ] Introduce "integer pointer" type (e.g. `uintptr`) with size/alignment that varies based on arch. For instance, when flattening a `variant` type with a `string` or `list`, the flattened pointers resolve to a `uintptr` in Go.
- [ ] Thread this flexible width concept through the ABI, lifting, and lowering code in `wit` and `wit/bindgen`.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando il codice esistente per ABI, lifting e lowering in wit e wit/bindgen, quindi confronta le sue assunzioni sui puntatori con il supporto proposto per wasm64 nella specifica del Component Model. Il lavoro è completato quando un tipo puntatore intero ha dimensione e allineamento dipendenti dall’architettura e il codice Go generato supporta ampiezze dei puntatori sia a 32 bit sia a 64 bit senza assunzioni su un layout fisso.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- go, wasm
- Ambito
- compilers, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100