Agent skill · software engineering · secondsky

bun-ffi

This skill should be used when the user asks about \"bun:ffi\", \"foreign function interface\", \"calling C from Bun\", \"native libraries\", \"dlopen\", \"shared libraries\", \"calling native code\", or integrating C/C++ libraries with Bun.

Why this skill is useful

Provides specific commands and patterns for integrating C/C++ libraries with Bun that the AI wouldn't reliably generate on its own.

What it needs

Requires bun installed locally. About 4k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.

What this skill does

Bun FFI Bun's FFI allows calling native C/C++ libraries from JavaScript. Quick Start Loading Libraries Platform-Specific Paths Cross-Platform Loading FFI Types Function Definitions Working with Strings Working with Pointers Structs Callbacks Example: SQLite Memory Management Thread Safety Common Errors Error Cause Fix ------- ------- ----- Library not found Wrong path Check library path Symbol not found Wrong function name Check function export Type mismatch Wrong FFI types Match C types exactly Segmentation fault Memory error Check pointer validity When to Load References Load references/type-mappings.md when: Complex type conversions Struct layouts Union types Load references/performance.md when: Optimizing FFI calls Batching operations Memory pooling

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills secondsky/bun-ffi

View the source on GitHub

Browse the @skills marketplace