Hi,

EM_ASM_ only supports int or double values : 
https://kripken.github.io/emscripten-site/docs/api_reference/emscripten.h.html

But you can still use embind : 
https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/embind.html


Le mercredi 26 juillet 2017 13:19:55 UTC+2, Artur a écrit :
>
> Hello. In my WebAssembly application I have an instance of the following 
> C++ class:
>
> class MyData
> {
> public:
> string str1, str2, str3;
> vector<uint8_t> somevector;
> };
>
> MyData data;
>
> I want to pass data object as an argument for JavaScript function
>
> EM_ASM_({
>     receiveData($0);
> }, data);
>
> But this doesn't work. Is there any other way to do this, without sending 
> pointer and reading directly from wasm memory in JavaScript?
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to