c++ 로직에서 javascript의 callback 함수를 호출하는방법.

2018-10-23 Thread nataovica
Hi. I would like to give you one advice. I want to change the client-side Web service using embedding. I would like to send events from C ++ logic to javasript. The structure is as follows. Task logic (C ++) -> JavaScript (UI) The approximate structure of the code is as follows: logic.cpp clas

Question about how to use javascript callback function in c ++.

2018-10-23 Thread nataovica
Hello, I am changing the logic part of my javascript project to c ++ using embind I have a problem and would like to ask for advice. First, we change most of the computation and business logic of the existing project to c ++ and execute the corresponding logic Invokes a javascript callback async

Share the same memory space between modules

2018-10-23 Thread nicktasios
If I understand correctly, if I want to use multiple Emscripten-compiled modules in the same script, I have to pass the `-s MODULARIZE=1` option, and instantiate the modules using the promise-like syntax. How can I make these modules share the same memory space, or pass pointers from one module

Re: Removal of EMSCRIPTEN_ROOT from config file

2018-10-23 Thread Sam Clegg
On Thu, Oct 18, 2018 at 11:51 AM Floh wrote: > > > However, i don't think you can change the emscripten SDK dir by using > > --em-config (can you?). > > It does seem to work when using both --em-config and --cache both for emcc > and emar. This is what I'm doing to use a "local" workspace emscr

Subsequent reading of file created with FS.createDataFile gives incorrect data after calling munmap

2018-10-23 Thread Roman Sisik
I'm porting a tool from AOSP normally used Windows/Linux machines to WebAssembly. I use FS.createDataFile('/', file.name, data, true, true, true) on a file passed from JavaScript. I can read from the file without any issues and everything works as expected. The tool uses mmap to map parts of

Re: Removal of EMSCRIPTEN_ROOT from config file

2018-10-23 Thread Floh
Everything still working, so no worries :) BUT: maybe interesting info for you, I tried removing the --em-config argument somewhat expecting that everything still works, but got compile errors like this: opt: Unknown command line argument '-lower-non-em-intrinsics'. Try: '/Users/floh/projects

Re: Share the same memory space between modules

2018-10-23 Thread Alon Zakai
The best option is usually to compile multiple programs together, that is, compile the sources into one executable. This may take some refactoring though, and may not always be practical. But if you can do that, then you just export the various functions and can then call them from JS, and they wil