Skip to content

Embedding: Distribute official libnode.so/dll/dylib bins #58031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alshdavid opened this issue Apr 26, 2025 · 5 comments
Closed

Embedding: Distribute official libnode.so/dll/dylib bins #58031

alshdavid opened this issue Apr 26, 2025 · 5 comments
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@alshdavid
Copy link

alshdavid commented Apr 26, 2025

What is the problem this feature will solve?

Currently Node is distributed officially as an executable binary here: https://nodejs.org/dist/v22.15.0/.

For applications that intend to embed libnode, embedders must manually compile and distribute libnode.

There are projects like https://github.com/metacall/libnode that distribute prebuilt copies of libnode however it would be amazing if there was a reliable official source to fetch libnode as it would help with distributing applications that depend on it.

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

Distribute prebuilt libnode binaries from the Nodejs website. For example:

https://nodejs.org/dist/v22.15.0/libnode-v22.15.0-linux-x64.tar.xz

With a reliable url to fetch libnode, embedders could package/distribute libnode along with their applications or fetch libnode dynamically on the first run of their application.

What alternatives have you considered?

Compiling libnode myself or using unofficial prebuilt packages

@alshdavid alshdavid added the feature request Issues that request new features to be added to Node.js. label Apr 26, 2025
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Apr 26, 2025
@RaisinTen
Copy link
Member

This is a duplicate of #52289, so I'll close this

@alshdavid
Copy link
Author

alshdavid commented Apr 28, 2025

Hi @RaisinTen, the ticket you referenced is about improving the libnode API to make it easier to embed (e.g. offer a C API) - however it still requires compiling libnode manually.

This ticket is about providing official prebuilt binaries for libnode - which can be done with the existing C++ API.

Correct me if I am wrong but I believe they are different requests?

@RaisinTen
Copy link
Member

Hey @alshdavid, the other issue proposes this as the feature for solving the problem:

It would be amazing if Node.js released a libnode library that exported Node.js capabilities and enabled napi access to the host context.

That's the same as distributing prebuilt official libnode binaries, so it makes more sense to track the work for including libnode binaries in the official Node.js releases on that issue.

For a C API, there is this WIP PR #54660. Looks like you're already coordinating with Vladimir on your C entrypoint PR #57846.

@alshdavid
Copy link
Author

Hey @RaisinTen, just a quick one on this subject. I have this GitHub workflow that I run every time Nodejs releases a new version which generates prebuilt binaries for libnode (I assume the final state would be more complex given the platform support surface of Nodejs).

I wanted to raise a PR to start working on adding prebuilt libnode binaries to the Nodejs repo for consideration by the team but it doesn't look like Nodejs is using Github actions to generate binaries. Any chance you could point me at the CI code so I can work on those changes? 🙏

Thanks!

@RaisinTen
Copy link
Member

I think @mhdawson might be able to point you in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
Archived in project
Development

No branches or pull requests

2 participants