nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.94k stars 29.77k forks source link

consider allowing libnode.h (libnode.a/ libnode.lib) and libnode.wasm for nodejs #51790

Open ganeshkbhat opened 9 months ago

ganeshkbhat commented 9 months ago

What is the problem this feature will solve?

use standard interpreter in different languages outside of nodejs

What is the feature you are proposing to solve the problem?

consider allowing libnode.h (libnode.a/ libnode.lib) and libnode.wasm for nodejs runtime environment. This makes nodejs environment available in other environments.

What alternatives have you considered?

There is a lot of effort with some good, many half baked wrappers, codes, and efforts

joyeecheung commented 9 months ago

I assume you are asking about embedding Node.js as a library? We already support this and the public header is src/node.h. Configuring the build with --shared produces .lib/.dylib with the ABI version in the file name (Windows is a bit more complicated). You can read the full guide for building Node.js as a shared library in https://github.com/nodejs/node/blob/main/doc/contributing/maintaining/maintaining-shared-library-support.md For documentation on the embedder API, see https://nodejs.org/api/embedding.html

github-actions[bot] commented 3 months ago

There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the https://github.com/nodejs/node/labels/never-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.

ganeshkbhat commented 2 months ago

should you consider this never-stale and add it to features (devops) list options when considered to be added in?

RedYetiDev commented 2 months ago

Can you elaborate on what you want and how it differs from what @joyeecheung mentioned?


If your just looking for the JavaScript engine, than that's an issue for V8, not Node.js