阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js N-API ABI 稳定性的影响

      Node.js N-API ABI 稳定性的影响

      Although N-API provides an ABI stability guarantee, other parts of Node.js do not, and any external libraries used from the addon may not. In particular, none of the following APIs provide an ABI stability guarantee across major versions:

      • the Node.js C++ APIs available via any of
      #include <node.h>
      #include <node_buffer.h>
      #include <node_version.h>
      #include <node_object_wrap.h>
      
      • the libuv APIs which are also included with Node.js and available via
      #include <uv.h>
      
      • the V8 API available via
      #include < v8.h>
      

      Thus, for an addon to remain ABI-compatible across Node.js major versions, it must make use exclusively of N-API by restricting itself to using

      #include <node_api.h>
      

      and by checking, for all external libraries that it uses, that the external library makes ABI stability guarantees similar to N-API.


      更多内容请参考:Node.js N-API,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录