本页还没有译文
本页 4 段还没译成简体中文,下面显示的是英文原文。Node-API
还没翻译译自英文(bun.com)本页 4 段都还没译
Node-API is an interface for building native add-ons to Node.js. Bun implements this interface from scratch, so most existing Node-API extensions work with Bun out of the box.
As in Node.js, you can require() .node files (Node-API modules) directly.
const napi = require("./my-node-module.node");Alternatively, use process.dlopen:
let mod = { exports: {} };
process.dlopen(mod, "./my-node-module.node");AI 翻译查看英文原文