Closed Pospelove closed 1 year ago
Thanks for bringing this up. Are you interested in submitting a PR for this?
I think so, at some point. I'm dedicated to other tasks these days. But I'll probably get back to this later. I just wanted to leave details here as a reminder to myself (and for someone who theoretically could resolve that issue)
We discussed in the Node-api team meeting today and agreed this is a good idea.
We will want two defs files to be created:
node_api.def js_native_api.def
Where the node_api.def contains all of the symbols and the js_native_api.def one will only include those which are part of the js_native_api_symbols list.
We'd be happy if you can create a PR for that.
Here's a simple solution, to generate def file in CMakeLists.txt
or other build script:
node -e "let a=require('./symbols.js').v8;console.log('LIBRARY node.exe\nEXPORTS\n'+[...a.node_api_symbols,...a.js_native_api_symbols].join('\n'))" >libnode.def
And thanks for your PR.
required for https://github.com/microsoft/vcpkg/pull/29743
this can be done during sync-headers processing https://github.com/nodejs/node-api-headers/blob/main/.github/workflows/sync-headers.yml
the following code may be used to generate .def file