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
{{ message }}
Repository navigation
Support loading dynamic addon modules (.node files) when embedding the Node.js shared library without needing to link with node.def #52282
Node.js addon modules on Windows current import from the node.exe executable, when you build Node.js as a shared library, it reexports all the needed symbols from the node shared library from the executable using a generated node.def file.
If you embed the Node.js shared library into a different executable/program, for loading such addon modules to work, that executable will need to be linked with node.def to reexport the needed symbols.
node-gyp also adds win_delay_load_hook.cc to addons on Windows to make them work when the Node.js executable is renamed.
What is the feature you are proposing to solve the problem?
Maybe we can support loading such addon modules without this requirement?
For example, what if the delay load hook looked for an env var (e.g. NODE_LIBRARY) that it would then pass to GetModuleHandle instead of NULL if it is set, and when Node.js is built as a shared library, it would set this env var before dynamically loading a module?
Though I'm not sure what security implications such a mechanism may have...
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-staleIssues and PRs exempt from automated stale handling.
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.
This may seem unsafe but works. We are using it in a production ready environment. I recommend you to use metacall directly if you want to embed NodeJS because there's many other issues you will face in the long term, and we have addressed most of them.
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-staleIssues and PRs exempt from automated stale handling.
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 for 5 months. To help maintain relevant open issues, please add the
never-staleIssues and PRs exempt from automated stale handling.
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.
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
Activity
segevfiner commentedon Apr 10, 2024
So basically something like the following (Untested though):
In node:
In node-gyp:
github-actions commentedon Oct 8, 2024
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-staleIssues and PRs exempt from automated stale handling.
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.
segevfiner commentedon Oct 8, 2024
Bump
viferga commentedon Dec 6, 2024
We have solved this issue already in metacall: https://github.com/metacall/core/blob/433e3107112b6d8362aa03057dae20b96ff5b1a8/source/loaders/node_loader/source/node_loader_impl.cpp#L3413
This may seem unsafe but works. We are using it in a production ready environment. I recommend you to use metacall directly if you want to embed NodeJS because there's many other issues you will face in the long term, and we have addressed most of them.
github-actions commentedon Jun 5, 2025
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-staleIssues and PRs exempt from automated stale handling.
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.
segevfiner commentedon Jun 5, 2025
Bump
github-actions commentedon Dec 3, 2025
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-staleIssues and PRs exempt from automated stale handling.
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.
segevfiner commentedon Dec 3, 2025
Bump
github-actions commentedon Jul 2, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
segevfiner commentedon Jul 2, 2026
Bump
github-actions commentedon Oct 1, 2026
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
segevfiner commentedon Oct 1, 2026
Bump