Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
node-ffi Rick Branson rick [at] diodeware [dot] com http://github.com/rbranson/node-ffi
== DESCRIPTION:
node-ffi is a Node.js addon for loading and calling dynamic libraries using pure JavaScript. It can be used to create bindings to native libraries without writing any C++ code.
WARNING: This is an experimental library with an unstable API. It's also quite unsafe, so you can pretty easily create situations where you will segfault the interpreter and unless you've got C debugger skills, you probably won't know what's going on.
== EXAMPLE:
var FFI = require("node-ffi");
var libm = new FFI.Library("libm", { "ceil": [ "double", [ "double" ] ] }); libm.ceil(1.5); // 2
// You can also access just functions in the current process by passing a null var current = new FFI.Library(null, { "atoi": [ "int32", [ "string" ] ] }); current.atoi("1234"); // 1234
== REQUIREMENTS:
== NPM INSTALL:
$ npm install node-ffi
== SOURCE INSTALL:
$ git clone git://github.com/rbranson/node-ffi.git $ cd node-ffi $ node-waf configure build $ node test.js $ node-waf install
== TYPES:
byte Unsigned 8-bit Integer (unsigned char) int8 Signed 8-bit Integer (char) int16 Signed 16-bit Integer (short) uint16 Unsigned 16-bit Integer (unsigned short) int32 Signed 32-bit Integer (int) uint32 Unsigned 32-bit Integer (unsigned int) int64 Signed 64-bit Integer uint64 Unsigned 64-bit Integer float Single Precision Floating Point Number (float) double Double Precision Floating Point Number (double) pointer Pointer Type string Null-Terminated String (char *)
== LICENSE:
See LICENSE file.
FAQs
A foreign function interface (FFI) for Node.js
The npm package node-ffi receives a total of 29 weekly downloads. As such, node-ffi popularity was classified as not popular.
We found that node-ffi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.