-
Notifications
You must be signed in to change notification settings - Fork 461
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
why the src/node_api.h and node_api_types.h head files were moved to the node repository #855
Comments
Hi @oshunter, The link zoom to partecipate: https://zoom.us/j/363665824 |
As a note for the discussion. I think it would be a challenge if we wanted to include I'm not sure if the node-addon-api is the right repository for the headers, as @NickNaso mentioned it is already possible to get them from the headers.tar.gz but I can see that might not quite be what you want if you want headers for a specific N-API version. |
Hi @NickNaso Hi @mhdawson |
@oshunter as an FYI transferred to the abi-stable-node repo so that I could put on our agenda to discuss in the meeting this Friday. I can transfer back after that. |
We discussed this in the N-API team meeting today is this what you need:
Which define the functions/types available through N-API
|
@oshunter let us know if what we describe is what you need. |
Possible package name: |
Thanks for linking me to this. It would be useful, to me at least though I imagine some others as well, if this package could also contain a .def file (or similar list of symbols that can easily be transformed into a .def file) containing all exported symbols (as per #720) alongside the headers. This allows for build servers, CI and so on to build an addon without actually having to e.g. have node.exe/electron.exe present to find the symbols from. Its possible, with some trial/error/hacks to create such a file from the headers, but it would be ideal for one central repository to simply have such a file instead of every project in a similar situation to mine implementing their own build system hacks for this. |
May be a silly question but is a |
As far as I understand it I'm not 100% sure what the linux/mac/bsd etc. equivalent is however on these platforms it is possible to ignore undefined symbols, so its possible to just do this and link without the executable. This is of course not 100% ideal because it also ignores other actually undefined symbols in the library, however you do at least get a warning/error about this at runtime, so as long as you test its nothing but a minor headache. Anyway, in short a |
Hi everybody,
Anyway on Windows I don't have the possibility to set this kind of flags using From my experience an idea could be a package that provides:
Here I want to share with you my first draft of N-API bindings for Go https://github.com/napi-bindings/go-napi-sys/blob/master/napisys/napisys.go |
From the discussion in the meeting it sounds like a file which just had the list of symbols would have covered the case that @NickNaso had and I think @mjmacleod said the same. It should be easy to maintain as it would just be additions when there was a new version of N-API and we believe the list is the same across platforms. It does mean that the consumers would need to build the specific file they need (for example windows |
Next step is to request new repo |
@NickNaso is going to create the request in the admin repo. |
I create the issue now here the ref. nodejs/admin#576 |
@NickNaso |
Yes, I think it's great to have a separated repo for the pure headers with release version. |
Hi @oshunter, |
Thanks! |
@oshunter to set expectations I think we want to do a good amount of review on the first iteration on this as it will be much harder to change later on. That means it may take us a little while, particularly since many people are on holiday over the next few weeks. |
Hi everybody, |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
Removed stale as the PR above has not yet landed. |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
nodejs/node-api-headers#1 landed so closing out. |
The N-API is a good common abstract for native addons and it's common used on some other projects.
Such as the:
https://github.com/jerryscript-project/iotjs/tree/master/include
https://github.com/yodaos-project/ShadowNode/tree/master/include
And the latest Release 3.x.x,the N-API head files are removed to node repository src folder.
Is it possible to keep the head files on the node-addon-api repository for N-API part for other project use and as part of js/C/C++ addon mechanism and more JS engine were supported(V8/QuickJS/JerryScript)?
The text was updated successfully, but these errors were encountered: