Bun, the fast all-in-one JavaScript runtime, has released version 1.3, marking its biggest release yet with comprehensive full-stack development capabilities, unified database APIs, and performance improvements across the runtime.
Bun 1.3 introduces zero-configuration frontend development with built-in hot module replacement and React Fast Refresh support. Developers can now run HTML files directly with Bun, which automatically handles JavaScript, CSS, and React transpilation and bundling. The development server includes filesystem watching using platform-specific APIs like kqueue on macOS and inotify on Linux, delivering hot reloading without additional configuration. When ready for production, running bun build --production bundles applications with optimized output.
One of the headline features in Bun 1.3 is Bun.SQL, a unified API supporting MySQL, MariaDB, PostgreSQL, and SQLite with zero external dependencies. The API provides consistent syntax across all database adapters while maintaining high performance through native implementations. An example of the unified syntax is shown below:
import { sql, SQL } from "bun";
const postgres = new SQL("postgres://[localhost/mydb]()");
const mysql = new SQL("mysql://[localhost/mydb]()");
const sqlite = new SQL("sqlite://data.db");
const username = "test_user";
const seniorUsers = await sql`SELECT name, role, username FROM users WHERE username >= ${username}`;
The release also introduces a built-in Redis client that delivers more than 7.9 times the performance of the popular ioredis package. All standard Redis operations are supported. Support for clusters, streams, and Lua scripting is planned for future releases.
Community reception has been mixed, with developers expressing both excitement and concern. A discussion on Hacker News garnered 56 points with positive comments such as:
Bun is brilliant. I rarely have to install any packages, as Bun has just the right things built in, like SQL, S3 and now Redis too.
Elsewhere. Lobsters commenters raised questions about performance benchmarks, particularly claims that compiled Bun applications serve files faster than nginx. A commenter on reddit shared that for production, they are still facing issues:
For development, Bun is 100% ready. For production, I still facing bugs from time to time.
Bun 1.3 expands package management with dependency catalogs for monorepos, inspired by pnpm’s catalog feature. Isolated installs are now the default for workspaces, preventing packages from accessing undeclared dependencies. The new bun update --interactive command allows developers to selectively update dependencies, while bun why explains dependency chains. Security improvements include a Scanner API for vulnerability detection, with Socket launching an official security scanner integration.
For migration from earlier versions, Bun 1.3 includes several breaking changes. The most significant is that Bun.serve() TypeScript types have been reworked, particularly for WebSocket data handling. The SQL client now throws errors if called as a function instead of a tagged template literal. Bun now defaults to "module": "Preserve" in TypeScript configurations instead of auto-detection. Detailed migration guidance is available in the Bun 1.3 release notes.
Performance improvements are extensive, with JavaScript memory usage reduced by 10 to 30 percent in frameworks like Next.js and Elysia. The AbortSignal.timeout implementation is 40 times faster, while bun build performance on macOS improved 60 percent through I/O threadpool optimization. Express benchmarks show 9 percent faster performance, and Fastify is 5.4 percent faster due to node:http improvements.
Compared to competitors like Node.js and Deno, Bun continues to differentiate itself by bundling commonly needed functionality directly into the runtime. While Node.js requires separate packages for database clients, bundling, and testing, Bun provides these capabilities out of the box.
Bun is an open-source JavaScript runtime built on JavaScriptCore, developed by Oven and maintained by Jarred Sumner and team. It aims to be a drop-in replacement for Node.js while offering significantly faster performance and a more batteries-included developer experience. Bun can be upgraded by running bun upgrade or installed fresh following the instructions at bun.sh.
