Giter VIP home page Giter VIP logo

node-api-headers's People

Contributors

github-actions[bot] avatar kevineady avatar legendecas avatar mhdawson avatar nicknaso avatar pospelove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-api-headers's Issues

What is the actual version of this?

In microsoft/vcpkg#29743 we are confused as to what version we should use when listing the contents of this repo.

Let's take an example:

  • Release: 0.0.5
  • Node API version: 8
  • From upstream: 19.8.1

See also: nodejs/node#46641 (comment)

NodeJS folks there seem to be suggesting "8" but if it would ever be distinguishable to a user for any reason to use a different upstream tag, that means the upstream tag needs to be in the version somehow...

Discussion about the next steps

In this issue I reported some correlated issues some of them pushed us to work on this repo:

My idea is to continue to work on documentation and then publish on npm.

Provide def file for windows import lib

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'))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.