Bunβs compatibility status with Node.js APIs, modules, and globals
Every day, Bun gets closer to 100% Node.js API compatibility. Today, popular frameworks like Next.js, Express, and millions of npm packages intended for Node just work with Bun. To ensure compatibility, we run thousands of tests from Node.jsβ test suite before every release of Bun.If a package works in Node.js but doesnβt work in Bun, we consider it a bug in Bun. Please open an issue and weβll fix it.This page is updated regularly to reflect compatibility status of the latest version of Bun. The information below reflects Bunβs compatibility with Node.js v23.
π‘ Handles and file descriptors cannot be passed between workers, which means load-balancing HTTP requests across processes is only supported on Linux at this time (via SO_REUSEPORT). Otherwise, implemented but not battle-tested.
π‘ Client & server are implemented (95.25% of gRPCβs test suite passes). Missing options.allowHTTP1, options.enableConnectProtocol, ALTSVC extension, and http2stream.pushStream.
π‘ Missing syncBuiltinESMExports, Module#load(). Overriding require.cache is supported for ESM & CJS modules. module._extensions, module._pathCache, module._cache are no-ops. module.register is not implemented and we recommend using a Bun.plugin in the meantime.
π‘ writeHeapSnapshot and getHeapSnapshot are implemented. serialize and deserialize use JavaScriptCoreβs wire format instead of V8βs. Other methods are not implemented. For profiling, use bun:jsc instead.
π‘ Core functionality and ES modules are implemented, including vm.Script, vm.createContext, vm.runInContext, vm.runInNewContext, vm.runInThisContext, vm.compileFunction, vm.isContext, vm.Module, vm.SourceTextModule, vm.SyntheticModule, and importModuleDynamically support. Options like timeout and breakOnSigint are fully supported. Missing vm.measureMemory and some cachedData functionality.
π‘ Worker doesnβt support the following options: stdinstdoutstderrtrackedUnmanagedFdsresourceLimits. Missing markAsUntransferablemoveMessagePortToContext.
π’ Implemented. This is an object containing all objects in the global namespace. Itβs rarely referenced directly, as its contents are available without an additional prefix, e.g. __dirname instead of global.__dirname.
π‘ Mostly implemented. process.binding (internal Node.js bindings some packages rely on) is partially implemented. process.title is currently a no-op on macOS & Linux. getActiveResourcesInfosetActiveResourcesInfo, getActiveResources and setSourceMapsEnabled are stubs. Newer APIs like process.loadEnvFile and process.getBuiltinModule are not implemented yet.