# node-ffi/node-ffi

Node.js Foreign Function Interface

Repository: https://github.com/node-ffi/node-ffi
Canonical: https://ross.abutalabs.com/products/node-ffi
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2023-07-15T04:15:33+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 6115, "days_push": 1145, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4321, forks 399 (observed 2026-08-28T04:08:41.952321+00:00)

## What it is
node-ffi is a Node.js addon for loading and calling dynamic C libraries using pure JavaScript, without writing C++ binding code. It handles type translation between JavaScript and C via the libffi library bundled with the package.

## Use cases
- call functions from a C shared library from Node.js
- create bindings to native libraries without writing C++
- invoke system libc functions like atoi from JavaScript
- prototype native library calls in pure JavaScript
- wrap existing C APIs for Node.js scripts

## When to avoid
- you are on a modern Node.js version - the project only supports node v0.6 through v0.10 and is unmaintained
- you need high performance - FFI call overhead is orders of magnitude slower than hard-coded native bindings
- you cannot tolerate segfaults from incorrect type declarations
- you want a maintained alternative such as koffi or node-addon-api

## Facets
- artifact type: library
- maturity: abandoned
- function: sdk, developer-tools
- domain: developer-tools, cross-platform
- platform: windows, cross-platform
- tags: ffi, native-bindings, dynamic-libraries, libffi, c-interop, nodejs, linux, macos

## Member repositories
- node-ffi/node-ffi (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:41.952321+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:43.625137+00:00, confidence not recorded.
  - readme: https://github.com/node-ffi/node-ffi (fetched 2026-08-28T04:08:41.952321+00:00, sha 46c6bfb51780)
- Data as of 2026-08-30T08:39:29.467469+00:00.
