Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wit, wit/bindgen: support abstract "pointer" type, size, and alignment #112

Open
3 tasks
ydnar opened this issue Jun 23, 2024 · 0 comments
Open
3 tasks

Comments

@ydnar
Copy link
Collaborator

ydnar commented Jun 23, 2024

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<T>, 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant