skills/bun-runtime-node-api/SKILL.md
Use Bun's Node-API module to build native add-ons to Node.js
npx skillsauth add jarle/bun-skills Bun Node-APIInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use Bun's Node-API module to build native add-ons to Node.js
Node-API is an interface for building native add-ons to Node.js. Bun implements 95% of this interface from scratch, so most existing Node-API extensions will work with Bun out of the box. Track the completion status of it in this issue.
As in Node.js, .node files (Node-API modules) can be required directly in Bun.
const napi = require("./my-node-module.node");
Alternatively, use process.dlopen:
let mod = { exports: {} };
process.dlopen(mod, "./my-node-module.node");
development
Using TypeScript with Bun, including type definitions and compiler options
development
Learn how to write tests using Bun's Jest-compatible API with support for async tests, timeouts, and various test modifiers
testing
Learn how to use snapshot testing in Bun to save and compare output between test runs
testing
Learn about Bun test's runtime integration, environment variables, timeouts, and error handling