bytecodealliance / bytecodealliance/go-modules
wit, wit/bindgen: support abstract "pointer" type, size, and alignment
- Lenguaje dominante
- Go
- Estrellas
- 148
- Forks
- 20
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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`.
Guía de contribución
Línea de trabajo
Comienza revisando el código existente de ABI, lifting y lowering en wit y wit/bindgen; después, compara sus supuestos sobre los punteros con el soporte propuesto para wasm64 en la especificación del Component Model. El trabajo estará terminado cuando un tipo de puntero entero tenga un tamaño y una alineación dependientes de la arquitectura, y el código Go generado admita anchos de puntero de 32 bits y 64 bits sin suposiciones sobre un layout fijo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- go, wasm
- Área
- compilers, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100