{"_id":"@2060.io/ffi-napi","_rev":"5-9b1715d045fa5c7d71f3462b29510400","name":"@2060.io/ffi-napi","dist-tags":{"latest":"4.0.9"},"versions":{"4.0.4":{"name":"@2060.io/ffi-napi","version":"4.0.4","license":"MIT","author":{"name":"Anna Henningsen","email":"anna@addaleax.net"},"contributors":[{"name":"Rick Branson","email":"rick@diodeware.com"},{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},{"name":"Gabor Mezo","email":"gabor.mezo@outlook.com"}],"description":"A foreign function interface (FFI) for Node.js, N-API style","keywords":["foreign","function","interface","ffi","libffi","binding","c","napi","stable"],"homepage":"http://github.com/node-ffi-napi/node-ffi-napi","engines":{"node":">=18"},"main":"./lib/ffi","dependencies":{"debug":"^4.1.1","get-uv-event-loop-napi-h":"^1.0.5","node-addon-api":"^3.0.0","node-gyp-build":"^4.2.1","@2060.io/ref-napi":"3.0.4","ref-struct-di":"^1.1.0"},"devDependencies":{"fs-extra":"^9.0.0","mocha":"^7.1.1","nyc":"^15.0.0","prebuildify":"^4.0.0","prebuildify-ci":"^1.0.5","ref-array-di":"^1.2.1","release-it":"^14.13.1"},"scripts":{"install":"node-gyp-build","prebuild":"prebuildify --napi --tag-armv --tag-uv","release":"release-it","test":"node-gyp rebuild --directory test && nyc mocha --expose-gc --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@github.com/node-ffi-napi/node-ffi-napi.git"},"bugs":{"url":"http://github.com/node-ffi-napi/node-ffi-napi/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"release-it":{"github":{"release":true},"npm":{"skipChecks":true,"ignoreVersion":true,"tag":"latest"},"git":{"push":false,"commit":false,"requireCommits":true,"tagAnnotation":"${version}","requireBranch":"master"}},"gitHead":"a3be3ef281f2eb1f818e212144be696d8c180ed5","_id":"@2060.io/ffi-napi@4.0.4","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-iwXzS+/J9o3EhDFjSdn8MIV7Vvf7qX7hO5IuLWQ5XnIjVkLHx54DDC4vSfqweZ1HE6/nznfLg+iFdmmE/2ofgw==","shasum":"1c504d3d77d529f535687351b33c66a98438a24f","tarball":"https://registry.npmjs.org/@2060.io/ffi-napi/-/ffi-napi-4.0.4.tgz","fileCount":616,"unpackedSize":5790162,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwZ+mCRe2a995yDOJ32/LofRbTjhWwbeI/ao+6AhFcSgIhALBF3eWd0D+vFruHMGlV3Gg4FYxQG7Ka/zUC8j0sewes"}]},"_npmUser":{"name":"genaris","email":"gentilester@gmail.com"},"directories":{},"maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ffi-napi_4.0.4_1691929858921_0.6366704751253629"},"_hasShrinkwrap":false},"4.0.5":{"name":"@2060.io/ffi-napi","version":"4.0.5","license":"MIT","author":{"name":"Anna Henningsen","email":"anna@addaleax.net"},"contributors":[{"name":"Rick Branson","email":"rick@diodeware.com"},{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},{"name":"Gabor Mezo","email":"gabor.mezo@outlook.com"}],"description":"A foreign function interface (FFI) for Node.js, N-API style","keywords":["foreign","function","interface","ffi","libffi","binding","c","napi","stable"],"homepage":"http://github.com/node-ffi-napi/node-ffi-napi","engines":{"node":">=18"},"main":"./lib/ffi","dependencies":{"debug":"^4.1.1","get-uv-event-loop-napi-h":"^1.0.5","node-addon-api":"^3.0.0","node-gyp-build":"^4.2.1","@2060.io/ref-napi":"3.0.4","ref-struct-di":"^1.1.0"},"devDependencies":{"fs-extra":"^9.0.0","mocha":"^7.1.1","nyc":"^15.0.0","prebuildify":"^4.0.0","prebuildify-ci":"^1.0.5","ref-array-di":"^1.2.1","release-it":"^14.13.1"},"scripts":{"install":"node-gyp-build","prebuild":"prebuildify --napi --tag-armv --tag-uv","release":"release-it","test":"node-gyp rebuild --directory test && nyc mocha --expose-gc --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@github.com/node-ffi-napi/node-ffi-napi.git"},"bugs":{"url":"http://github.com/node-ffi-napi/node-ffi-napi/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"release-it":{"github":{"release":true},"npm":{"skipChecks":true,"ignoreVersion":true,"tag":"latest"},"git":{"push":false,"commit":false,"requireCommits":true,"tagAnnotation":"${version}","requireBranch":"master"}},"gitHead":"9e15572f80c4c8ba79afabe48150f4bbcd609c37","_id":"@2060.io/ffi-napi@4.0.5","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-CdV4y/gXYI7yzSiSHWvY/JdW06Li57Gdc3ZKzNesXrCQg4IoHL0S+zIxEr6Mbr0fCNVvj1GNSh8Uz9vSQkCXYA==","shasum":"52fd369f25cba85319eb5625e2d598925a1713ce","tarball":"https://registry.npmjs.org/@2060.io/ffi-napi/-/ffi-napi-4.0.5.tgz","fileCount":616,"unpackedSize":5790351,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6PIcVtyxTjvMA0659OgwfeDRPKxOLYLYFyjQo6CVETwIgaW2/OQikcrK95tX5eHYM98Qvh64nc9wDz5Y8O+rSzYU="}]},"_npmUser":{"name":"genaris","email":"gentilester@gmail.com"},"directories":{},"maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ffi-napi_4.0.5_1691930996245_0.5262831464824491"},"_hasShrinkwrap":false},"4.0.6":{"name":"@2060.io/ffi-napi","version":"4.0.6","license":"MIT","author":{"name":"Anna Henningsen","email":"anna@addaleax.net"},"contributors":[{"name":"Rick Branson","email":"rick@diodeware.com"},{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},{"name":"Gabor Mezo","email":"gabor.mezo@outlook.com"}],"description":"A foreign function interface (FFI) for Node.js, N-API style","keywords":["foreign","function","interface","ffi","libffi","binding","c","napi","stable"],"homepage":"http://github.com/node-ffi-napi/node-ffi-napi","engines":{"node":">=18"},"main":"./lib/ffi","dependencies":{"debug":"^4.1.1","get-uv-event-loop-napi-h":"^1.0.5","node-addon-api":"^3.0.0","node-gyp-build":"^4.2.1","@2060.io/ref-napi":"3.0.5","ref-struct-di":"^1.1.0"},"devDependencies":{"fs-extra":"^9.0.0","mocha":"^7.1.1","nyc":"^15.0.0","prebuildify":"^4.0.0","prebuildify-ci":"^1.0.5","ref-array-di":"^1.2.1","release-it":"^14.13.1"},"scripts":{"install":"node-gyp-build","prebuild":"prebuildify --napi --tag-armv --tag-uv","release":"release-it","test":"node-gyp rebuild --directory test && nyc mocha --expose-gc --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@github.com/node-ffi-napi/node-ffi-napi.git"},"bugs":{"url":"http://github.com/node-ffi-napi/node-ffi-napi/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"release-it":{"github":{"release":true},"npm":{"skipChecks":true,"ignoreVersion":true,"tag":"latest"},"git":{"push":false,"commit":false,"requireCommits":true,"tagAnnotation":"${version}","requireBranch":"master"}},"gitHead":"59d91f755f440b5db7dc2e553d3722ca2960da58","_id":"@2060.io/ffi-napi@4.0.6","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-RusQJyH12dlB3xsbrOJ9UCpG9KIsH/+uc10W22eyAalD6Z09+zlygwT61gsr7EjzsyiCOVZ0NM9OBFcH87DiXA==","shasum":"fc5e1da793d15100a4066b73a50ca7e27e61c902","tarball":"https://registry.npmjs.org/@2060.io/ffi-napi/-/ffi-napi-4.0.6.tgz","fileCount":617,"unpackedSize":5812994,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcSmhTfyBG4MRSIrC6a+Dpy9Q/DoIJDJGiVP0ox0eQlAiEAuLK6mmdZ9mPQ1Cwipx62zhIr6hgWOzUJYNP7qHx1js4="}]},"_npmUser":{"name":"genaris","email":"gentilester@gmail.com"},"directories":{},"maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ffi-napi_4.0.6_1694002436240_0.2100760362243994"},"_hasShrinkwrap":false},"4.0.7":{"name":"@2060.io/ffi-napi","version":"4.0.7","license":"MIT","author":{"name":"Anna Henningsen","email":"anna@addaleax.net"},"contributors":[{"name":"Rick Branson","email":"rick@diodeware.com"},{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},{"name":"Gabor Mezo","email":"gabor.mezo@outlook.com"}],"description":"A foreign function interface (FFI) for Node.js, N-API style","keywords":["foreign","function","interface","ffi","libffi","binding","c","napi","stable"],"homepage":"http://github.com/node-ffi-napi/node-ffi-napi","engines":{"node":">=18"},"main":"./lib/ffi","dependencies":{"debug":"^4.1.1","get-uv-event-loop-napi-h":"^1.0.5","node-addon-api":"^3.0.0","node-gyp-build":"^4.2.1","@2060.io/ref-napi":"3.0.5","ref-struct-di":"^1.1.0"},"devDependencies":{"fs-extra":"^9.0.0","mocha":"^7.1.1","nyc":"^15.0.0","prebuildify":"^4.0.0","prebuildify-ci":"^1.0.5","ref-array-di":"^1.2.1","release-it":"^14.13.1"},"scripts":{"install":"node-gyp-build","prebuild":"prebuildify --napi --tag-armv --tag-uv","release":"release-it","test":"node-gyp rebuild --directory test && nyc mocha --expose-gc --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@github.com/node-ffi-napi/node-ffi-napi.git"},"bugs":{"url":"http://github.com/node-ffi-napi/node-ffi-napi/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"types":"types/index.d.ts","release-it":{"github":{"release":true},"npm":{"skipChecks":true,"ignoreVersion":true,"tag":"latest"},"git":{"push":false,"commit":false,"requireCommits":true,"tagAnnotation":"${version}","requireBranch":"master"}},"gitHead":"b11f62917d15771a389b76bf16bd8ee3005ecc8f","_id":"@2060.io/ffi-napi@4.0.7","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-3rROimyjWZcfcTlD/0UOtNWHhrSpwNvRxT05A+fqqqYWfQhu3PNJc+HTT8i3XGNlL5u6r/ghuxSMSafi01pN1A==","shasum":"8baa4693ef6467748fb1bd9a55ddb66c695528e5","tarball":"https://registry.npmjs.org/@2060.io/ffi-napi/-/ffi-napi-4.0.7.tgz","fileCount":617,"unpackedSize":5813025,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAA0C2HLU72pxgCxux6sTHJQrO3ZcKm8PJqjNNasyHRgIhAJ5UMMOs3t2HrMwBYP1Nnge6hMl7kCCZcprmMptJR20x"}]},"_npmUser":{"name":"genaris","email":"gentilester@gmail.com"},"directories":{},"maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ffi-napi_4.0.7_1694003184849_0.8637159320087602"},"_hasShrinkwrap":false},"4.0.8":{"name":"@2060.io/ffi-napi","version":"4.0.8","license":"MIT","author":{"name":"Anna Henningsen","email":"anna@addaleax.net"},"contributors":[{"name":"Rick Branson","email":"rick@diodeware.com"},{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},{"name":"Gabor Mezo","email":"gabor.mezo@outlook.com"}],"description":"A foreign function interface (FFI) for Node.js, N-API style","keywords":["foreign","function","interface","ffi","libffi","binding","c","napi","stable"],"homepage":"http://github.com/node-ffi-napi/node-ffi-napi","engines":{"node":">=18"},"main":"./lib/ffi","dependencies":{"debug":"^4.1.1","get-uv-event-loop-napi-h":"^1.0.5","node-addon-api":"^3.0.0","node-gyp-build":"^4.2.1","@2060.io/ref-napi":"^3.0.6","ref-struct-di":"^1.1.0"},"devDependencies":{"fs-extra":"^9.0.0","mocha":"^7.1.1","nyc":"^15.0.0","prebuildify":"^4.0.0","prebuildify-ci":"^1.0.5","ref-array-di":"^1.2.1","release-it":"^14.13.1"},"scripts":{"install":"node-gyp-build","prebuild":"prebuildify --napi --tag-armv --tag-uv","release":"release-it","test":"node-gyp rebuild --directory test && nyc mocha --expose-gc --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@github.com/node-ffi-napi/node-ffi-napi.git"},"bugs":{"url":"http://github.com/node-ffi-napi/node-ffi-napi/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"types":"types/index.d.ts","release-it":{"github":{"release":true},"npm":{"skipChecks":true,"ignoreVersion":true,"tag":"latest"},"git":{"push":false,"commit":false,"requireCommits":true,"tagAnnotation":"${version}","requireBranch":"master"}},"gitHead":"98e7b13a61e7e514e929bfdb6aaaa4275eb2c072","_id":"@2060.io/ffi-napi@4.0.8","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-sONRKLtxFKN5PXuZaa41b/kTN+R5qAh6PAL15/fnafnvAKQ5WBoxRIy8xRh8jo9mydywtt4IrWtatB93w0+3cA==","shasum":"ec3424d9ec979491b41b8d82514ae82a647da8b0","tarball":"https://registry.npmjs.org/@2060.io/ffi-napi/-/ffi-napi-4.0.8.tgz","fileCount":617,"unpackedSize":5813026,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwGtf5b2YbHE3NxjyiFpBBSjJYSXhGyaTXrd2L0JM4zAIhANFNEYv9guuffjMG614eLy6wibIK6wkXhSsOd4Nt94Ig"}]},"_npmUser":{"name":"genaris","email":"gentilester@gmail.com"},"directories":{},"maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ffi-napi_4.0.8_1694005309780_0.3356879362855165"},"_hasShrinkwrap":false},"4.0.9":{"name":"@2060.io/ffi-napi","version":"4.0.9","license":"MIT","author":{"name":"Anna Henningsen","email":"anna@addaleax.net"},"contributors":[{"name":"Rick Branson","email":"rick@diodeware.com"},{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},{"name":"Gabor Mezo","email":"gabor.mezo@outlook.com"}],"description":"A foreign function interface (FFI) for Node.js, N-API style","keywords":["foreign","function","interface","ffi","libffi","binding","c","napi","stable"],"homepage":"http://github.com/node-ffi-napi/node-ffi-napi","engines":{"node":">=18"},"main":"./lib/ffi","dependencies":{"debug":"^4.1.1","get-uv-event-loop-napi-h":"^1.0.5","node-addon-api":"^3.0.0","node-gyp-build":"^4.2.1","@2060.io/ref-napi":"^3.0.6","ref-struct-di":"^1.1.0"},"devDependencies":{"@types/ref-array-di":"^1.2.8","fs-extra":"^9.0.0","mocha":"^7.1.1","nyc":"^15.0.0","prebuildify":"^4.0.0","prebuildify-ci":"^1.0.5","ref-array-di":"^1.2.1","release-it":"^14.13.1"},"scripts":{"install":"node-gyp-build","prebuild":"prebuildify --napi --tag-armv --tag-uv","release":"release-it","test":"node-gyp rebuild --directory test && nyc mocha --expose-gc --reporter spec"},"repository":{"type":"git","url":"git+ssh://git@github.com/node-ffi-napi/node-ffi-napi.git"},"bugs":{"url":"http://github.com/node-ffi-napi/node-ffi-napi/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"types":"types/index.d.ts","release-it":{"github":{"release":true},"npm":{"skipChecks":true,"ignoreVersion":true,"tag":"latest"},"git":{"push":false,"commit":false,"requireCommits":true,"tagAnnotation":"${version}","requireBranch":"master"}},"_id":"@2060.io/ffi-napi@4.0.9","gitHead":"30d272f2821b4ce7a22d3f048aa78465214d1b45","_nodeVersion":"20.12.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-JfVREbtkJhMXSUpya3JCzDumdjeZDCKv4PemiWK+pts5CYgdoMidxeySVlFeF5pHqbBpox4I0Be7sDwAq4N0VQ==","shasum":"194fca2132932ba02e62d716c786d20169b20b8d","tarball":"https://registry.npmjs.org/@2060.io/ffi-napi/-/ffi-napi-4.0.9.tgz","fileCount":617,"unpackedSize":5812996,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB7LhhPKm1gJCNWIBj/j7H5O0rszVpVXIPXNx5eZedATAiAfhLJ7JhJxOBBLMZLFMXvZZwdOrdiP+nlIERIsnlE/LA=="}]},"_npmUser":{"name":"genaris","email":"gentilester@gmail.com"},"directories":{},"maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ffi-napi_4.0.9_1712338198462_0.10422978677407935"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-13T12:30:58.838Z","4.0.4":"2023-08-13T12:30:59.208Z","modified":"2024-04-05T17:29:58.897Z","4.0.5":"2023-08-13T12:49:56.504Z","4.0.6":"2023-09-06T12:13:56.546Z","4.0.7":"2023-09-06T12:26:25.164Z","4.0.8":"2023-09-06T13:01:50.133Z","4.0.9":"2024-04-05T17:29:58.703Z"},"maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"description":"A foreign function interface (FFI) for Node.js, N-API style","homepage":"http://github.com/node-ffi-napi/node-ffi-napi","keywords":["foreign","function","interface","ffi","libffi","binding","c","napi","stable"],"repository":{"type":"git","url":"git+ssh://git@github.com/node-ffi-napi/node-ffi-napi.git"},"contributors":[{"name":"Rick Branson","email":"rick@diodeware.com"},{"name":"Nathan Rajlich","email":"nathan@tootallnate.net"},{"name":"Gabor Mezo","email":"gabor.mezo@outlook.com"}],"author":{"name":"Anna Henningsen","email":"anna@addaleax.net"},"bugs":{"url":"http://github.com/node-ffi-napi/node-ffi-napi/issues"},"license":"MIT","readme":"node-ffi-napi\n=============\n### Node.js Foreign Function Interface for N-API\n[![Greenkeeper badge](https://badges.greenkeeper.io/node-ffi-napi/node-ffi-napi.svg)](https://greenkeeper.io/)\n\n[![NPM Version](https://img.shields.io/npm/v/ffi-napi.svg?style=flat)](https://npmjs.org/package/ffi-napi)\n[![NPM Downloads](https://img.shields.io/npm/dm/ffi-napi.svg?style=flat)](https://npmjs.org/package/ffi-napi)\n[![Build Status](https://travis-ci.org/node-ffi-napi/node-ffi-napi.svg?style=flat&branch=master)](https://travis-ci.org/node-ffi-napi/node-ffi-napi?branch=master)\n[![Coverage Status](https://coveralls.io/repos/node-ffi-napi/node-ffi-napi/badge.svg?branch=master)](https://coveralls.io/r/node-ffi-napi/node-ffi-napi?branch=master)\n[![Dependency Status](https://david-dm.org/node-ffi-napi/node-ffi-napi.svg?style=flat)](https://david-dm.org/node-ffi-napi/node-ffi-napi)\n\n`node-ffi-napi` is a Node.js addon for loading and calling dynamic libraries\nusing pure JavaScript. It can be used to create bindings to native libraries\nwithout writing any C++ code.\n\nIt also simplifies the augmentation of node.js with C code as it takes care of\nhandling the translation of types across JavaScript and C, which can add reams\nof boilerplate code to your otherwise simple C. See the `example/factorial`\nfor an example of this use case.\n\n**NOTE**: This fork uses a patched version of `ref-napi` due to serious performance issues found when using it intensively. This patch has been proven to be unstable in older node versions. As a result, node >=18 is required.\n\n**WARNING**: `node-ffi-napi` assumes you know what you're doing. You can pretty\neasily create situations where you will segfault the interpreter and unless\nyou've got C debugger skills, you probably won't know what's going on.\n\n**WARNING**: The original API of `node-ffi` is left mostly untouched in the\nN-API wrapper. However, the API did not have very well-defined properties\nin the context of garbage collection and multi-threaded execution. It is\nrecommended to avoid any multi-threading usage of this library\nif possible.\n\nExample\n-------\n\n``` js\nvar ffi = require('ffi-napi');\n\nvar libm = ffi.Library('libm', {\n  'ceil': [ 'double', [ 'double' ] ]\n});\nlibm.ceil(1.5); // 2\n\n// You can also access just functions in the current process by passing a null\nvar current = ffi.Library(null, {\n  'atoi': [ 'int', [ 'string' ] ]\n});\ncurrent.atoi('1234'); // 1234\n```\n\nFor a more detailed introduction, see the [node-ffi tutorial page][tutorial].\n\nRequirements\n------------\n\n * Linux, OS X, Windows, or Solaris.\n * `libffi` comes bundled with node-ffi-napi; it does *not* need to be installed on your system.\n * The current version is tested to run on Node 6 and above.\n\nInstallation\n------------\n\nMake sure you've installed all the [necessary build\ntools](https://github.com/TooTallNate/node-gyp#installation) for your platform,\nthen invoke:\n\n``` bash\n$ npm install ffi-napi\n```\n\nSource Install / Manual Compilation\n-----------------------------------\n\nTo compile from source it's easiest to use\n[`node-gyp`](https://github.com/TooTallNate/node-gyp):\n\n``` bash\n$ npm install -g node-gyp\n```\n\nNow you can compile `node-ffi-napi`:\n\n``` bash\n$ git clone git://github.com/node-ffi-napi/node-ffi-napi.git\n$ cd node-ffi\n$ node-gyp rebuild\n```\n\nTypes\n-----\n\nThe types that you specify in function declarations correspond to ref's types\nsystem. So [see its docs][ref-types] for\na reference if you are unfamiliar.\n\nV8 and 64-bit Types\n-------------------\n\nInternally, V8 stores integers that will fit into a 32-bit space in a 32-bit\ninteger, and those that fall outside of this get put into double-precision\nfloating point numbers. This is problematic because FP numbers are imprecise.\nTo get around this, the methods in node-ffi that deal with 64-bit integers return\nstrings and can accept strings as parameters.\n\nCall Overhead\n-------------\n\nThere is non-trivial overhead associated with FFI calls. Comparing a hard-coded\nbinding version of `strtoul()` to an FFI version of `strtoul()` shows that the\nnative hard-coded binding is orders of magnitude faster. So don't just use the\nC version of a function just because it's faster. There's a significant cost in\nFFI calls, so make them worth it.\n\nLicense\n-------\n\nMIT License. See the `LICENSE` file.\n\n[v1apichanges]: https://github.com/node-ffi/node-ffi/wiki/API-changes-from-v0.x-to-v1.x\n[tutorial]: https://github.com/node-ffi/node-ffi/wiki/Node-FFI-Tutorial\n[ref-types]: https://github.com/TooTallNate/ref#built-in-types\n","readmeFilename":"README.md"}