Skip to content
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

add port node and call for help #37667

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

congzhangzh
Copy link
Contributor

@congzhangzh congzhangzh commented Mar 24, 2024

Background:

Node.js provides several C++ APIs that can be used to execute JavaScript in a Node.js environment from other C++ software. but there is no embedded lib release for use out of the box.

This port hopes to add a node port, which will provide a node package, including:

  1. include/node/{node.h, uv.h, v8.h}
  2. libnode.lib/so library
  3. node.exe/node executable
  4. provide both debug/release version
  5. follow the latest release of node

Tips:

This pull request is just a draft, the purpose is to depict a prototype for more people to participate in the future, it may not even be able to run at all, I need help:)

I have manually compiled and used libnode on both windows and linux, there is no problem, I have been a node runtime guy in the fast two months.

If we can make libnode the official port of vcpkg, the use of it will be very easy.

Others

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/.

Yes

  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

TBD, as it's WIP

Embeded Node related refs:

#23027
nodejs/node#51824
https://nodejs.org/api/embedding.html
https://v8.dev/docs/embed

Vcpkg refs:

https://decovar.dev/blog/2022/10/30/cpp-dependencies-with-vcpkg/
https://github.com/boostcon/cppnow_presentations_2017/blob/master/05-19-2017_friday/effective_cmake__daniel_pfeifer__cppnow_05-19-2017.pdf
https://www.youtube.com/watch?v=bsXLMQ6WgIk&t=2937s&ab_channel=CppNow (_find_package trick here)
https://learn.microsoft.com/en-us/vcpkg/concepts/overlay-ports
https://learn.microsoft.com/en-us/vcpkg/contributing/maintainer-guide
https://learn.microsoft.com/en-us/vcpkg/get_started/get-started-packaging
https://learn.microsoft.com/en-us/vcpkg/get_started/get-started-adding-to-registry
https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_check_features
https://learn.microsoft.com/en-us/vcpkg/maintainers/variables
https://crascit.com/2018/09/14/do-not-redefine-cmake-commands/

Other refs:

nodejs/node#52126

@congzhangzh
Copy link
Contributor Author

@mingmoe @r-rojo @dg0yt @SNMetamorph Hi guys, maybe we can work together on this draft merge request?

I need leave for the next two months, so this work may be stopped, please go on if possible.

Embedded and even shared library is not the core business of the node team, most of the time we embed Python, Python even provide the official release of the embedded version, if we need the node related function, help ourselves :)

@FrankXie05 FrankXie05 self-assigned this Mar 25, 2024
@FrankXie05 FrankXie05 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR!
2 participants