Giter Club home page Giter Club logo

Comments (3)

gabrielschulhof avatar gabrielschulhof commented on June 10, 2024

@nodejs/node-api

from node.

KevinEady avatar KevinEady commented on June 10, 2024

Hi @gabrielschulhof ,

Just wanted a clarification with an example. Say we add a new Node-API, node_api_x(). Since this is not a behavior change, we would continue with our current flow (ie. guard declaration via #ifdef NAPI_EXPERIMENTAL, then update to #if NAPI_VERSION >= x on stable release, etc etc following https://github.com/nodejs/node/blob/main/doc/contributing/adding-new-napi-api.md), correct?

from node.

gabrielschulhof avatar gabrielschulhof commented on June 10, 2024

@KevinEady that's a good question. I think we would still add a feature flag, so we'd know the feature was available, though not an opt-out flag. I think assembling the version to report would be encoded using a series of macro calls starting with NAPI_VERSION and adding each successive feature bit. Thus we could, for non-behaviour-changing features, avoid updating this series of macro calls with a call to setting the feature bit for the non-behaviour-changing feature. That way, a feature bit would not be reserved for the feature, since it's not needed at runtime anyway.

from node.

Related Issues (20)

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.