Re: Mixing emcc and 'host' toolchains in CMake?

2020-07-08 Thread Shachar Langbeheim
In our project we have a single cmake project, with multiple targets - backend & tests executables are built with clang, wasm with emscripten. It works ok - not perfect, because we still need to add a lot of if statements to handle the different files that belong in different executables, and the

Re: Moving large data between JS & wasm with IDL binder

2020-07-08 Thread キャロウ マーク
Thanks Alon. > On Jul 8, 2020, at 15:59, Alon Zakai 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

Re: Moving large data between JS & wasm with IDL binder

2020-07-08 Thread Alon Zakai
Embind and the WebIDL binder are separate tools. They don't have any special support for mixing between them. 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

Re: Mixing emcc and 'host' toolchains in CMake?

2020-07-08 Thread 'Thomas Lively' via emscripten-discuss
I don't have a solution, but if anyone else does I would also be very interested in hearing about it. Right now we have to separate Binaryen's native and Emscripten builds and it would be very convenient if we could do both at once. On Wed, Jul 8, 2020 at 10:32 AM 'Steven Johnson' via

Moving large data between JS & wasm with IDL binder

2020-07-08 Thread キャロウ マーク
Can anyone here explain, or point me at an example, of how to move large data, e.g an image, between JS memory and wasm memory using a function defined with WebIDL binder? In embind for moving data from JS to wasm, I use an emscripten::val parameter to pass in the JS handle then

Mixing emcc and 'host' toolchains in CMake?

2020-07-08 Thread 'Steven Johnson' via emscripten-discuss
(This question is more CMake-related than Emscripten-related, but I suspect someone else on this list may have encountered it, so thought I'd ask here...) TL;DR: Has anyone attempted to use both the Emscripten toolchain and the 'host' toolchain (eg gcc, clang) in the same CMake project? Some of

Converting Google's MediaPipe to Web Assembly using Emscripten from within Bazel

2020-07-08 Thread Pinku Deb Nath
Has anyone tried to convert MediaPipe project to Web Assembly using Bazel? I am stuck with two errors based on what dependency I include in the BUILD file. The following is one of the errors, which I get if I just omit MediaPipe/graph/calculators from the