Runtime Standards & CompatibilityGlobalsUse Bun's global objectsCopy MarkdownOpenUse Bun's global objectsBun implements the following globals. GlobalSourceNotesAbortControllerWebAbortSignalWebalertWebIntended for command-line toolsBlobWebBufferNode.jsSee Node.js > BufferBunBunSubject to change as additional APIs are addedByteLengthQueuingStrategyWebconfirmWebIntended for command-line tools__dirnameNode.js__filenameNode.jsatob()Webbtoa()WebBuildMessageBunclearImmediate()WebclearInterval()WebclearTimeout()WebconsoleWebCountQueuingStrategyWebCryptoWebcryptoWebCryptoKeyWebCustomEventWebEventWebAlso ErrorEvent CloseEvent MessageEvent.EventTargetWebexportsNode.jsfetchWebFormDataWebglobalNode.jsSee Node.js > global.globalThisCross-platformAliases to globalHeadersWebHTMLRewriterCloudflareJSONWebMessageEventWebmoduleNode.jsperformanceWebprocessNode.jsSee Node.js > processpromptWebIntended for command-line toolsqueueMicrotask()WebReadableByteStreamControllerWebReadableStreamWebReadableStreamDefaultControllerWebReadableStreamDefaultReaderWebreportErrorWebrequire()Node.jsResolveMessageBunResponseWebRequestWebsetImmediate()WebsetInterval()WebsetTimeout()WebShadowRealmWebStage 3 proposalSubtleCryptoWebDOMExceptionWebTextDecoderWebTextEncoderWebTransformStreamWebTransformStreamDefaultControllerWebURLWebURLSearchParamsWebWebAssemblyWebWritableStreamWebWritableStreamDefaultControllerWebWritableStreamDefaultWriterWebUtilsUse Bun's utility functions to work with the runtimeBun APIsOverview of Bun's native APIs available on the Bun global object and built-in modules