Bazel Rules for Node.js Native Addons
This repository contains rules for building Node.js Native Addons with Bazel build system.
-
This is a wrapper around
cc_binary
rule that builds a Node.js Native Addon with Node-API headers, node-addon-api headers, and appropriate build flags, producing a.node
file. -
This is a wrapper around
cc_library
rule that builds a C/C++ library with Node-API headers, node-addon-api headers, and appropriate build flags. This can be used as a dependency ofnode_extension
rule.
See examples for more details.
See Release Notes for installation instructions.
You can set it by the command line flag:
bazel build //my/node/extension:target --@rules_node_binding//node_binding:napi_version=3
Currently, no. Feel free to open an issue if you need it.