napiutils

Simplified NAPI library development

Usage no npm install needed!

<script type="module">
  import napiutils from 'https://cdn.skypack.dev/napiutils';
</script>

README

$package_name

Actions Status NPM downloads

Simplified NAPI module development.

This project provide a set of C macros to aid in the development of NAPI modules.

Usage

to create a new NAPI module named examplemodule type:

npx nativeutils create examplemodule

This will create a new directory containing a skeleton of a new NAPI module:

  • includes/examplemodule.h - an header containing all the internally exported functions of your module.
  • examplemodule.c - a skeleton of what will be the entry point of your module.
  • arch/linux/platform.c - a set of directory that contains code specific for the various platforms.
  • arch/darwin/platform.c
  • arch/windows/platform.c
  • package.json - a skeleton of the package file.
  • binding.gyp - a skeleton of the gyp-node configuration file.

In the new NAPI module, you can make use of napiutils C macro and its binary tools to simplify develeopment.

API

Seet DOCS folder for documentation

Install

With npm installed, run

npm install --save napiutils

See Also

License

MIT