Bun FFI
Use Bun's FFI module to efficiently call native libraries from JavaScript
Install
npx skills add jarle/bun-skills --skill Bun FFIgit clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-runtime-ffi ~/.claude/skills/Bun-FFIPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# FFI
> Use Bun's FFI module to efficiently call native libraries from JavaScript
<Warning>
`bun:ffi` is **experimental**, with known bugs and limitations, and should not be relied on in production. The most
stable way to interact with native code from Bun is to write a [Node-API module](/runtime/node-api).
</Warning>
Use the built-in `bun:ffi` module to efficiently call native libraries from JavaScript. It works with languages that support the C ABI (Zig, Rust, C/C++, C#, Nim, Kotlin, etc).
***
## dlopen usage (`bun:ffi`)
To print the version number of `sqlite3`:
```ts theme={"theme":{"light":"github-light","dark":"dracula"}}
import { dlopen, FFIType, suffix } from "bun:ffi";
// `suffix` is either "dylib", "so", or "dll" depending on the platform
// you don't have to use "suffix", it's just there for convenience
const path = `libsqlite3.${suffix}`;
const {
symbols: {
sqlite3_libversion, // the function to call
},
} = dlopen(
path, // a library name or file path
{
sqlite3_libversion: {
// no arguments, returns a string
args: [],
returns: FFIType.cstring,
},
},
);
console.log(`SQLite 3 version: ${sqlite3_libversion()}`);
```
***
## Performance
According to [our benchmark](https://github.com/oven-sh/bun/tree/main/bench/ffi), `bun:ffi` is roughly 2-6x faster than Node.js FFI via `Node-API`.
<Image src="/images/ffi.png" height="400" />Details
- Skill name
Bun FFI- Repository
- jarle/bun-skills
- Path
skills/bun-runtime-ffi/SKILL.md- License
- MIT
- Repo updated
- 24 February 2026
FAQ
What does the Bun FFI skill do?
Use Bun's FFI module to efficiently call native libraries from JavaScript
How do I install the Bun FFI skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun FFI. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Bun FFI popular?
It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.
Related skills
Bun Archive
9jarle/bun-skills
Create and extract tar archives with Bun's fast native implementation
Bun Auto Install
9jarle/bun-skills
Bun's automatic package installation feature for standalone script execution
Bun Bun Add
9jarle/bun-skills
Add packages to your project with Bun's fast package manager
Bun File System Router
9jarle/bun-skills
Bun provides a fast API for resolving routes against file-system paths
Bun Debugging
9jarle/bun-skills
Debug your Bun code with an interactive debugger using WebKit Inspector Protocol
Bun Hot Reloading
9jarle/bun-skills
Hot Module Replacement (HMR) for Bun's development server
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.