Paul Krill
Editor at Large

Bun 1.0 is out of the oven

news
Sep 8, 20232 mins
Development Libraries and FrameworksJavaScriptWeb Development

All-in-one toolkit for building, testing, debugging, and running JavaScript and TypeScript is available in a production-ready release.

shutterstock 378840622 three rosy baked appetizing buns on a plate on a white background
Credit: Alexey Lobanov / Shutterstock

Bun, an all-in-one toolkit for building, testing, debugging, and running JavaScript and TypeScript apps, has reached stable production-ready status as of September 8.

Positioned as a drop-in replacement for Node.js, Bun is a single executable intended to eliminate complexity and slowness without tossing away everything that is โ€œgreatโ€ about JavaScript, Bunโ€™s developers said. They bill Bun as a fast JavaScript runtime that simplifies JavaScript development by eliminating the โ€œlayers and layers of tooling that have accumulated on top of each other.โ€

Bun makes Node.js tools including node, npx, nodemon, and dotenv or cross-env unnecessary, the Bun team said. And Bun can run .js, .ts, .cjs, .mjs, .jsx, and .tsx files, which can replace transpilers such as tsc and babel. For testing, Bun is a Jest-compatible test runner supporting snapshot testing, code coverage, and mocking. Bun also serves as a JavaScript bundler with โ€œbest-in-classโ€ performance and an esbuild-compatible plugin API. It also is an NPM-compatible package manager.

Other features of Bun:

  • A JavaScript transpiler is baked into the runtime, for running JavaScript, TypeScript, and JSX/TSX files, with no dependencies.
  • ECMAScript and CommonJS module systems are supported.
  • Web-standard APIs are supported such as fetch, request, and WebSocket. Bun APIs were designed to be easy to use and fast.
  • Bun is faster than npm, yarn, and pnpm, the Bun team said. A global module cache is used to avoid redundant downloads from the NPM registry; the fastest system calls are used from each operating system.
  • Hot reloading is enabled, to reload an application when files change.

Production-ready native builds of Bun are provided for macOS and Linux; an experimental native build of Bun for Windows also is available. Bun can be installed with the following command:

$ curl -fsSL https://bun.sh/install | bash

Upgrades can be done by running bun upgrade.ย 

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorldโ€™s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorldโ€™s audience of software developers and other information technology professionals. Paul has won a โ€œBest Technology News Coverageโ€ award from IDG.

More from this author