Node.js

Koffi requires a recent Node.js version with N-API version 8 support:

Use NVM to install more recent Node versions on older Linux distributions.

Supported platforms

The following combinations of OS and architectures are officially supported and tested at the moment:

ISA / OS Windows Linux (glibc) Linux (musl)
x86 (IA32) 1 βœ… βœ… 🟨
x86_64 (AMD64) βœ… βœ… βœ…
ARM32 LE 2 ⬜️ βœ… 🟨
ARM64 (AArch64) LE βœ… βœ… 🟨
RISC-V 64 3 ⬜️ βœ… 🟨
βœ… Yes | 🟨 Probably | ⬜️ Not applicable
ISA / OS macOS FreeBSD OpenBSD
x86 (IA32) 1 ⬜️ βœ… βœ…
x86_64 (AMD64) βœ… βœ… βœ…
ARM32 LE 2 ⬜️ 🟨 🟨
ARM64 (AArch64) LE βœ… βœ… 🟨
RISC-V 64 3 ⬜️ 🟨 🟨
βœ… Yes | 🟨 Probably | ⬜️ Not applicable

For all fully supported platforms (green check marks), a prebuilt binary is included in the NPM package which means you can install Koffi without a C++ compiler.

  1. The following call conventions are supported for forward calls: cdecl, stdcall, MS fastcall, thiscall. Only cdecl and stdcall can be used for C to JS callbacks. ↩ ↩2

  2. The prebuilt binary uses the hard float ABI and expects a VFP coprocessor. Build from source to use Koffi with a different ABI (softfp, soft). ↩ ↩2

  3. The prebuilt binary uses the LP64D (double-precision float) ABI. The LP64 ABI is supported in theory if you build Koffi from source (untested), the LP64F ABI is not supported. ↩ ↩2