温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com
点击访问原文链接

Bun — A fast all-in-one JavaScript runtime

Bun is joining Anthropic & Anthropic is betting on Bun →BuildDocsReferenceGuidesBlogDiscordBun v1.3.10New native REPL, --compile --target=browser for self-contained HTML, TC39 standard ES decorators, Windows ARM64 support, barrel import optimizat...Bun v1.3.9Run multiple scripts in --parallel or --sequential. bun:test mock & spyOn get Symbol.dispose support. ESM bytecode compilation. Faster Bun.markd...Bun v1.3.8Bun.markdown is a builtin CommonMark-compliant Markdown parser written in Zig. Bun's bundler gets bun build --metafile-md to write LLM-friendly ...Bun v1.3.750% faster `Buffer.from(array)`, 35% faster async/await, 3x faster `array.flat()`, 90% faster `padStart`/`padEnd` via JSC upgrade. New: `Bun.JSO...Bun v1.3.6Bun.Archive API for creating & extracting tarballs with gzip compression, Bun.JSONC for parsing JSON with comments, metafile & files options in ...Bun v1.3.5Bun.Terminal API, compile-time feature flags, improved Bun.stringWidth accuracy, V8 C++ value type checking APIs, Content-Disposition support fo...BuildDocsReferenceGuidesBlogDiscordBun v1.3.10 is here! →test runnerpackage managerView install scriptView benchmark →Bunv1.2Denov2.1.6Node.jsv23.6.0Bun.serve()v1.2Deno.serve()v1.2.6ws (Node.js)v23.6.0View benchmark →Bunv1.2.22Node.jsv24.8.0Denov2.5.1View benchmark →JavaScript RuntimeStarts 3x faster than Node.jsA fast JavaScript runtime designed as a drop-in replacement for Node.js$ bun ./index.tsNode.js API compatibilityTypeScript, JSX & React (zero config)Comprehensive builtin standard libraryPostgreSQL, Redis, MySQL, SQLiteHot & watch mode built-inEnvironment variables with .envPackage Manager30x fasterInstall packages up to 30x faster than npm with a global cache and workspaces$ bun installSimple migration from npm/pnpm/yarnEliminate phantom dependenciesWorkspaces, monoreposLifecycle scripts & postinstall handlingDependency auditing with bun auditBlock malicious packagesTest RunnerReplaces Jest & VitestJest-compatible test runner with built-in code coverage and watch mode$ bun testJest-compatible expect() APISnapshot testingWatch mode & lifecycle hooksDOM APIs via happy-domBuilt-in code coverageBundlerReplaces Vite and esbuildBundle TypeScript, JSX, React & CSS for both browsers and servers$ bun build ./app.tsxTypeScript & JSX built-in (no config)CSS imports & bundlingBuild for the browser, Bun, and Node.jsSingle-file executables.html, .css, .ts, .tsx, .jsx & moresingle file executablesLearn about single file executablesDeploy on RailwayWebSocket serverLearn about Bun's WebSocket serverNode.js compatibilityAiming to be a drop-in replacement for Node.js appsWeb Standard APIsSupport for web standard APIs like fetch, URL, EventTarget, Headers, etc.Native AddonsCall C-compatible native code from JavaScriptTypeScriptFirst-class support, including "paths" enum namespaceJSXFirst-class support without configurationModule loader pluginsPlugin API for importing/requiring custom file typesPostgreSQL, MySQL, and SQLite driversConnect to any SQL database with one fast, unified APIS3 Cloud Storage driverUpload and download from S3-compatible storage, built-inRedis clientRedis client built into Bun with Pub/Sub supportWebSocket server (including pub/sub)WebSocket server built into Bun.serve() with backpressure handlingHTTP serverLightning-fast HTTP server built into BunHTTP routerRoute HTTP requests with dynamic paths and wildcards, built into Bun.serve()Single-file executablesCompile your app to a standalone executable that runs anywhereYAMLYAML is a first-class citizen in Bun, just like JSONCookies APIParse and set cookies with zero overhead using a Map-like APIEncrypted Secrets StorageStore secrets securely using your OS's native keychainnpm package managementInstall, manage, and publish npm-compatible dependenciesBundlerBuild production-ready code for frontend & backendCross-platform $ shell APINative bash-like shell for cross-platform shell scriptingJest-compatible test runnerTesting library compatible with the most popular testing frameworkHot reloading (server)Reload your backend without disconnecting connections, preserving stateMonorepo supportInstall workspaces packages and run commands across workspacesFrontend Development ServerRun modern frontend apps with a fully-featured dev serverPassword & Hashing APIsbcrypt, argon2, and non-cryptographic hash functionsString Width APICalculate the width of a string as displayed in the terminalGlob APIGlob patterns for file matchingSemver APICompare and sort semver stringsCSS color conversion APIConvert between CSS color formatsBun.serve()HTTP & WebSocket serverroutesBuilt-in routing with dynamic pathsrequest.cookiesZero-overhead cookie parsingBun.sqlPostgreSQL, MySQL, SQLiteBun.s3S3-compatible cloud storageBun.redisRedis client with Pub/SubBun.file()Fast file reading & streamingBun.GlobFast file pattern matchingBun.write()Write files efficientlybun testJest-compatible test runnersnapshotsSnapshot testing built-inexpect()Jest-compatible assertionsbun buildFast bundler with tree-shaking--compileSingle-file executables--hotHot reload without restartsTypeScript & JSXNo config requiredimport "*.yaml"YAML & TOML importsimport "*.css"CSS & asset importsBun.passwordbcrypt, argon2 hashingBun.CSRFCSRF token generationBun.secretsOS keychain integrationBun.$Cross-platform shell scriptingBun.spawn()Spawn child processesbun:ffiCall native C/C++ librariesBun.hash()Fast hashing utilitiesBun.semverVersion comparisonBun.escapeHTML()HTML escaping & sanitizationLearn more about frontend with Bun →View benchmarkTry itTry itDocumentationGet started with Bun and learn how to use all of its featuresAPI ReferenceExplore the complete API reference for Bun's runtime and toolkitReferenceDocsGuidesDiscordMerch StoreGitHubBlogRuntimePackage managerTest runnerBundlerPackage runnerBun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseWe're hiring →

智能索引记录