callback's wasm_val_vec_t* results contain invalid value kind #3009
Unanswered
mean-ui-thread
asked this question in
General
Replies: 2 comments
-
For future reference, the error is coming from here: https://github.com/wasmerio/wasmer/blob/master/lib/api/src/sys/externals/function.rs#L818-L824 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for creating the issue @mean-ui-thread. I've converted this into a discussion so other people can also chime in into what are the best ways to improve DX (Developer Experience) on it (if any) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
instead of doing this:
I'd like to be able to do this to avoid allocating wasm_val_t for performance reasons. This is more efficient:
But here's the question: why do I need to set
results->data[0].kind
? If I don't, I get an error like this:Obviously, wasmer knows what the value kind is, so why isn't it setting the valkind correctly in the
wasm_val_vec_t* results
vector for us? If that's done, then I'd be able to do just this:which would be the best/simplest/minimalistic code.
Additional details
I'm on 2.3.0 on Linux Desktop.
Beta Was this translation helpful? Give feedback.
All reactions