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

Implement support in the component model for memory64 #4311

Open
Tracked by #4185
alexcrichton opened this issue Jun 23, 2022 · 1 comment
Open
Tracked by #4185

Implement support in the component model for memory64 #4311

alexcrichton opened this issue Jun 23, 2022 · 1 comment
Labels
wasm-proposal:component-model Issues related to the WebAssembly Component Model proposal wasm-proposal:memory64 Issues with the implementation of the memory64 wasm proposal

Comments

@alexcrichton
Copy link
Member

I'm going to split this work item from #4185 since I suspect it's going to be somewhat significant. The intention here is to track issues related to the memory64 proposal for WebAssembly and the component model. At the time of this writing neither of these proposals are "stable". Additionally the component model does not actually define what the canonical ABI is with respect to the memory64 proposal. Fully implementing this item will be a blend of "do the obvious thing" where possible such as making pointers 64-bits large, while at the same time also identifying question that don't have "obvious" answers such as "what's the maximum length of a string or list?"

Currently there are a lot of TODO items sprinkled throughout typed.rs which note various places that I suspect will need memory64 treatment. Fully implementing this issue, however, will likely require fuzzer integration because otherwise it'll be difficult to ensure that we've covered all cases.

Some examples of things that need updating are:

  • Need to call realloc with a different signature
  • All reads/writes of pointers to linear memory need to have a 32/64 bit switch
  • Reading and writing pointers to ValRaw needs to be audited
  • Size and alignment calculations all need to be duplicated or have a parameter for 64 bit
  • Somehow should probably confirm that this doesn't vastly affect performance for 32-bit

The last point here is an open question I don't know how best to answer.

@alexcrichton alexcrichton added wasm-proposal:memory64 Issues with the implementation of the memory64 wasm proposal wasm-proposal:component-model Issues related to the WebAssembly Component Model proposal labels Jun 23, 2022
@alexcrichton
Copy link
Member Author

The upstream issue for the component model repository and the spec defining what to do with the memory64 proposal is WebAssembly/component-model#22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasm-proposal:component-model Issues related to the WebAssembly Component Model proposal wasm-proposal:memory64 Issues with the implementation of the memory64 wasm proposal
Projects
None yet
Development

No branches or pull requests

1 participant