Thanks Alon. > On Jul 8, 2020, at 15:59, Alon Zakai <[email protected]> wrote: > > Embind and the WebIDL binder are separate tools. They don't have any special > support for mixing between them.
That’s what I had concluded. Thanks for confirming. My confusion arose because
it is not clear (to me at least) that emscripten::val is strictly part of
embind.
>
> The WebIDL binder doesn't have direct support for copying data from JS into
> wasm. You can do it manually though, without the WebIDL binder, by
> malloc()ing some room, copying the data (all in JS, just a copy from the JS
> data into HEAP8 for example), then you can pass the malloc()ed pointer as a
> parameter to the compiled code (with the WebIDL binder, passing it as a void*
> would work, or an int).
So in JS do I create a typed array view on the right place in HEAP8 and then
copy in and out of that? How does the JS find HEAP8? I need to create a wrapper
for the zstd decoder so I need to be as efficient as possible in moving the
data.
Regards
-Mark
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/1ECB6FF7-0049-4F3B-93AB-0CDD0879A908%40callow.im.
signature.asc
Description: Message signed with OpenPGP
