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

[node-embedder-api] Add new port #35880

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Conversation

Pospelove
Copy link
Contributor

@Pospelove Pospelove commented Dec 26, 2023

Why building Node from source?
Because of embedding use case https://nodejs.org/api/embedding.html

@FrankXie05 FrankXie05 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Dec 27, 2023
@Pospelove Pospelove marked this pull request as ready for review April 24, 2024 20:19
@Pospelove Pospelove changed the title [node] Add new port (wip) Apr 24, 2024
@BillyONeal
Copy link
Member

What interactions does this have with node-addon-api, node-api-headers?

@Pospelove
Copy link
Contributor Author

@BillyONeal

  • node-api-headers provides C-api for writing nodejs addons (native DLLs to be used in javascript apps)
  • node-addon-api is a C++ wrapper for node-api-headers
  • node in this PR is a whole runtime build to be embedded into user apps see https://nodejs.org/api/embedding.html .

node is logically opposite to node-api-headers (while technically including node-api-headers headers)

node port is for embedding nodejs into your C++ app

node-api-headers is for writing a C++ dll (so called addon) to be embedded into JavaScript app

@BillyONeal
Copy link
Member

node is logically opposite to node-api-headers (while technically including node-api-headers headers)

Does this mean that node and node-api-headers can't be simultaneously installed because they stomp on the same paths?

@Pospelove
Copy link
Contributor Author

Pospelove commented Apr 25, 2024

@BillyONeal Good question. I'll make sure they can by utilizing a separate include subfolder or making node-api-headers a node dependency.

Will be fixing this and x86 build

@Pospelove Pospelove marked this pull request as draft April 25, 2024 00:35
@Pospelove Pospelove changed the title [node] Add new port Apr 25, 2024
@Pospelove Pospelove marked this pull request as ready for review April 25, 2024 14:37
@Pospelove
Copy link
Contributor Author

x86-windows has issues. disabled.

node-api-headers not conflicting anymore due to changed folder. it's make sense to keep versios of this port and node-api-headers unrelated because you may want to build an addon with node-api-headers version X and embed NodeJS with version Y, all in one project that shares a single manifest file.

@BillyONeal @FrankXie05 Reviews welcome

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!
3 participants