You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using JavaScript as a library and plugin extension for existing C/C++ programs requires a substantial amount of work, where writing glue code is particularly complex and error-prone.
What is the feature you are proposing to solve the problem?
Key Features:
Define a basic type table(reference ffi)and decorate functions (export2c in nativegen.js)
Auto-generate .h, .cc, and Makefile files from a library file (library.js/plugin.js) where functions are already decorated using export2c from nativegen.js
Nativegen.js implement the tools main function
Technical Challenges:
1. Is it necessary to run the libuv event loop on a separate thread? Merely pump out the event queue is insufficient as code with persistent logic (such as a server) will not function.
2. For sync api, communication with the event loop by async handle/async send? Implement send call with c++ promise from caller, activate c++ promise on finish call, and return values on the C/C++ side.
3. For async api(promise handling): set callback on V8 promise to activate c++ promise for valueb back to caller.
4. Exception propagation: from JavaScript to C++, including catch, wrapper, and rethrow mechanisms.
Infrastructure change Requirements:
Include with node-embedded.tar(like python)
• node.h, v8.h (and all related child.h), uv.h
• libnode.lib (win), libuv.lib (win)
• libnode.so/libnode.dll, libuv.dll(win)
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-staleMark issue so that it is never considered stale
label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment.
What is the problem this feature will solve?
Using JavaScript as a library and plugin extension for existing C/C++ programs requires a substantial amount of work, where writing glue code is particularly complex and error-prone.
What is the feature you are proposing to solve the problem?
Key Features:
Technical Challenges:
Infrastructure change Requirements:
Include with node-embedded.tar(like python)
References:
What alternatives have you considered?
Do all the work by hand is possible, but very verbose and error prone.
The text was updated successfully, but these errors were encountered: