Node.js just closed one of its biggest architectural gaps with Deno and Bun, and honestly, as someone who has lost a non-zero amount of life expectancy to node-gyp, I'm happy about it.
As of Node.js 26.1 (May 2026), we finally have an experimental built-in FFI module (node:ffi). 🎉
The old ritual
Need to call a native C/C++ library?
- Write a C++ addon.
- Fight with
binding.gyp. - Install build tools.
- Discover that it works on your machine and nowhere else.
- Question your career choices.
The new way
const { DynamicLibrary, suffix } = require('node:ffi');
const lib = new DynamicLibrary(`libsqlite3.${suffix}`);
const sqlite3_libversion = lib.getFunction('sqlite3_libversion', {
result: 'string'
});
console.log(sqlite3_libversion());
That's it.
No wrapper project.
No C++ glue code.
No sacrificing a goat to the cross-platform compilation gods.
Why this matters
- Direct access to native libraries from JavaScript.
- Easier integration with Rust, C, and existing system libraries.
- Smaller dependency trees.
- Much nicer experience for IoT, embedded systems, and vendor SDKs.
Before this, reaching native code from Node often felt like opening a side quest you never signed up for.
Reality check
It's still experimental and FFI won't magically outperform optimized N-API addons. If you're calling a function millions of times per second, native addons still win.
But for most integrations?
This removes a surprising amount of friction.
Node has spent years becoming more batteries-included. Native fetch, built-in test runner, built-in dotenv support, TypeScript support, and now FFI.
For backend developers, this is one of those features that won't make headlines outside our bubble, but it will quietly remove a lot of pain.
And if this means I touch binding.gyp less often, that's already a successful release.
Top comments (0)