Closed
Description
required for microsoft/vcpkg#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
// https://github.com/cmake-js/cmake-js/blob/e2452ee226490bc666d286ab0860aeb35fbbb035/lib/cMake.js#L293
const headers = require('.');
// Compile a Set of all the symbols that could be exported
const allSymbols = new Set()
for (const ver of Object.values(headers.symbols)) {
for (const sym of ver.node_api_symbols) {
allSymbols.add(sym)
}
for (const sym of ver.js_native_api_symbols) {
allSymbols.add(sym)
}
}
// Write a 'def' file for NODE.EXE
const allSymbolsArr = Array.from(allSymbols)
require('fs').writeFileSync("./node.def", 'NAME NODE.EXE\nEXPORTS\n' + allSymbolsArr.join('\n'))
Metadata
Metadata
Assignees
Labels
No labels