阿西河

所有教程

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

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js N-API 用法

      Node.js N-API 用法

      In order to use the N-API functions, include the file

      which is located in the src directory in the node development tree:

      #include <node_api.h>
      
      

      This will opt into the default NAPI_VERSION for the given release of Node.js. In order to ensure compatibility with specific versions of N-API, the version can be specified explicitly when including the header:

      #define NAPI_VERSION 3
      #include <node_api.h>
      

      This restricts the N-API surface to just the functionality that was available in the specified (and earlier) versions.

      Some of the N-API surface is considered experimental and requires explicit opt-in to access those APIs:

      #define NAPI_EXPERIMENTAL
      #include <node_api.h>
      

      In this case the entire API surface, including any experimental APIs, will be available to the module code.


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


      目录
      本文目录
      目录