Bun 1.3 Release — JavaScript and TypeScript Runtime Environment

Bun 1.3 Released: A Faster, All-in-One JavaScript Runtime

Bun 1.3 is now available, marking another major step for the all-in-one JavaScript and TypeScript runtime. This release enhances Bun's capabilities as a high-performance toolkit, complete with a debugger and robust support for popular web frameworks. It follows the project's rapid development cycle, with Bun 1.0 launching in September 2023, v1.1 in April 2024, and v1.2 in January 2025.

What is Bun?

Bun is a modern JavaScript runtime, similar to Node.js or Deno, but designed with a laser focus on speed, performance, and efficiency. It features a built-in JavaScript transpiler, allowing you to run JavaScript, TypeScript, and even JSX/TSX files directly without any external dependencies.

Under the hood, Bun leverages the JavaScriptCore engine from WebKit, which offers faster startup times and more efficient memory usage compared to engines like V8. The runtime itself is written in Zig, a low-level programming language that provides manual memory management, contributing significantly to its remarkable speed.

Bun boasts impressive compatibility, capable of running full-featured applications built with frameworks like Next.js, Remix, Nuxt, Astro, SvelteKit, Nest, SolidStart, and Vite. The development team claims Bun starts up to 4 times faster than Node.js. This performance gap widens even further when running TypeScript files, where Bun is reportedly 5 times faster than esbuild with Node.js.

Bun 1.3 transforms Bun into a complete, batteries-included JavaScript runtime. We've added first-class support for frontend development with all the features you expect from modern tools. We continue to work towards full Node.js compatibility, and with this release, we've added support for the VM module, node:test, performance monitoring, and much more.
The Bun Development Team

Key Features in Bun 1.3

  • Full-Featured Development Server: A powerful dev server with hot reloading and browser log streaming to the terminal is now built directly into Bun.serve().
  • Hot Module Replacement (HMR): Built-in support for HMR, including React Fast Refresh, allows you to see changes instantly without a full page reload. The new import.meta.hot API enables framework developers to integrate HMR seamlessly.
  • Native Database Clients: Integrated clients for MySQL and Redis are now available, joining the existing support for Postgres and SQLite.
  • HTTP and WebSocket Improvements: Enhanced routing, cookie handling, WebSocket support, and overall HTTP ergonomics.
  • Enhanced Workspace Management: New features for workspaces, including isolated installs, directories, and minimumRelease specifications.
  • Improved Node.js Compatibility: Significant progress has been made to ensure greater compatibility with the Node.js ecosystem.
  • New Package Management Commands: Simplify dependency management with new commands like bun why, bun update --interactive, bun info, and bun audit.
  • Upgraded Test Runner: Bun's test runner is now more powerful with VS Code integration, parallel test execution, type testing, and improved output.
  • Secure Credential Storage: A new Bun.secrets API provides access to the operating system's built-in encrypted credential store.
  • Code Signing: Support for code signing executables on both Windows (Authenticode) and macOS.

Recent Milestones

Leading up to this release, Bun introduced experimental support for compiling and executing handlers written in C. This allows developers to embed C code directly into JavaScript, which is then compiled on the fly using the TinyCC compiler. The bun:ffi layer handles the interoperability and automatic type conversion between the two languages.

The project also rolled out its own compact crash reporter for Zig and C++. Remarkably, a full crash report can be contained within a URL of about 150 bytes, ensuring privacy by excluding any personal information.

1
459
Comments
Please log in to add comments.
Loading comments...

Recommendations