emscripten-core / emscripten-core/emscripten
Callback with std::function is never called
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Hi,
Im trying use `std::function` as a callback in my project.
I make the bind to a method with and without callback (sync and async in my code):
https://github.com/xplpc/xplpc/blob/wasm-mapping/wasm/lib/src/bind.cpp#L66-L67
I implement in JS code the functions for sync/async method, but the method `onRemoteProxyCallAsync` is never called:
https://github.com/xplpc/xplpc/blob/wasm-mapping/wasm/sample/src/xplpc/proxy/platform-proxy.ts#L17-L29
In practice, what i want implement is a method that is called from C++ (part 1), that will receive the string data from JS with async/promise from JS implementation (part 2) and process this string in C++ side (part 3). Only left implement the "part 2".
Can anyone help me?
Contributor guide
Assessment
This issue has not been assessed yet.