-
Notifications
You must be signed in to change notification settings - Fork 24
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
Pass a headers pointer into incoming-response-headers #9
Comments
In this case, the returned integer is an index to a |
Yes, but both So bulk is part of it, but managing memory allocation in the guest from the host implementation is the bigger challenge. |
(Sorry for the slow replies; at a conference this week.) Yes, that's not clear from the signatures (although perhaps the generated headers should include this information in comments). Instead, the protocol for allocation/ownership is specified by the Canonical ABI which says, for every type, how to "lift" (read) and "lower" (write) the type out of and into linear memory. In the case of lists, the main rule is here. To summarize, the memory is |
I discussed this somewhat more in-depth and it seems that the overall wit approach is going to be to enable someone to provide a buffer, but this mechanism is not currently available. I'm going to close this for now, but leave #8 open. |
For similar reasons to #8 it is challenging to implement returning headers for an incoming response because it returns a fields structure, while it is possible to implement this, I think it makes more sense to leave the memory allocation on the guest side and instead pass a pointer to a headers object into the incoming-response-headers function. (
get-headers(incoming-response, ptr, len)
)The text was updated successfully, but these errors were encountered: