# jnr/jnr-ffi

Java Abstracted Foreign Function Layer

Repository: https://github.com/jnr/jnr-ffi
Canonical: https://ross.abutalabs.com/products/jnr-ffi
Language: Java
License: NOASSERTION
License Family: other
Last push: 2026-08-20T19:06:23+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 66, longevity 100
- inputs: {"age_days": 5690, "days_push": 13, "days_rel": 13, "gap_med": null, "n_releases_24m": 1}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1323, forks 160 (observed 2026-08-28T04:04:22.180703+00:00)

## What it is
JNR-FFI is a Java library for loading and calling native (C) libraries from Java without writing JNI code by hand or using tools like SWIG. It provides a declarative interface-based API for mapping native functions to Java methods.

## Use cases
- call C library functions from Java without writing JNI
- load native shared libraries in a JVM application
- replace hand-written JNI bindings with declarative Java interfaces
- bind libC or other system libraries from Java
- avoid SWIG code generation for native interop

## When to choose
- you need to call native C libraries from Java with minimal boilerplate
- you want a simpler alternative to JNI or SWIG
- you need cross-platform native library loading on the JVM

## When to avoid
- you only need pure-Java functionality with no native dependencies
- you need maximum FFI performance and can tolerate JNI complexity
- you are not on the JVM platform

## Facets
- artifact type: library
- maturity: active
- function: sdk, developer-tools
- domain: developer-tools, programming-languages, cross-platform
- platform: jvm, windows
- tags: ffi, jni-alternative, native-libraries, java, linux, macos

## Member repositories
- jnr/jnr-ffi (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:22.180703+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-30T04:47:05.092105+00:00, confidence not recorded.
  - readme: https://github.com/jnr/jnr-ffi (fetched 2026-08-28T04:04:22.180703+00:00, sha 8492ca01dd73)
- Data as of 2026-08-30T08:39:29.467469+00:00.
