{"library":"nw-gyp","title":"NW.js Native Addon Build Tool","description":"nw-gyp is a specialized build tool designed to compile native Node.js addons for use within NW.js (formerly node-webkit) applications. It functions as a 'hack' on `node-gyp`, adapting its build process to accommodate the specific headers and libraries required by NW.js, which often uses a different V8 version than standard Node.js. The current stable version is 3.6.8, last published 10 months ago, but the project's GitHub repository shows no significant activity since 2017. This indicates the tool is largely abandoned and is highly unlikely to be compatible with recent versions of NW.js or Node.js. Developers must manually specify the target NW.js version during the configuration step.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install nw-gyp"],"cli":{"name":"nw-gyp","version":null}},"imports":["const { configure } = require('nw-gyp/lib/nw-gyp');","const { build } = require('nw-gyp/lib/nw-gyp');","const { clean } = require('nw-gyp/lib/nw-gyp');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# Install nw-gyp globally (recommended for CLI tools)\nnpm install -g nw-gyp\n\n# Navigate to your native addon's root directory\n# This directory should contain your 'binding.gyp' file.\ncd my_native_nwjs_addon\n\n# Configure the build for a specific NW.js version\n# NOTE: nw-gyp is abandoned and primarily compatible with older NW.js/Node.js versions.\n# For example, NW.js v0.12.3 bundled Node.js 0.12.x.\n# Using a modern NW.js target will likely fail. `--arch` and `--msvs_version` (for Windows)\n# are often necessary for correct configuration.\nnw-gyp configure --target=0.12.3 --arch=x64 --msvs_version=2015\n\n# Build the native addon\nnw-gyp build\n\n# The compiled '.node' file will be located in 'build/Release/' or 'build/Debug/'\n# You can then require it in your NW.js application:\n# const myAddon = require('./build/Release/my_addon.node');\n# console.log(myAddon.someFunction());","lang":"bash","description":"Demonstrates the global installation, configuration, and build steps for a native NW.js addon using the nw-gyp command-line interface, targeting an older, compatible NW.js version.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}