Na_Nov_02

Bun – fast JavaScript runtime

Bun is an all-in-one JavaScript runtime and toolkit designed for speed, complete with a bundler, test runner, and Node.js-compatible package manager. It ships as a single executable called bun.

At its core is the Bun runtime, a fast JavaScript runtime designed as a drop-in replacement for Node.js. It’s written in Zig and powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage.

This is free and open source software.

Key Features

  • Node.js compatibility – aims for complete Node.js API compatibility. Most npm packages intended for Node.js environments will work with Bun out of the box.
  • Extends the JavaScriptCore engine—the performance-minded JS engine built for Safari—with native-speed functionality implemented in Zig.
  • Consistent and predictable module resolution system that just works.
  • Supports .jsx and .tsx files out of the box. Bun’s internal transpiler converts JSX syntax into vanilla JavaScript before execution.
  • Treats TypeScript as a first-class citizen.
  • Supports two kinds of automatic reloading via CLI flags.
  • Contains a Node.js-compatible package manager designed to be a dramatically faster replacement for npm, yarn, and pnpm. It’s a standalone tool that will work in pre-existing Node.js projects.
  • Implements Web-standard APIs such as fetch, ReadableStream, Request, Response, WebSocket, and FormData.
  • Cross-platform bash-like shell with seamless JavaScript interop:
    • Use Bun Shell without installing extra dependencies. Common shell commands like ls, cd, rm are implemented natively.
    • Familiar: Bun Shell is a bash-like shell, supporting redirection, pipes, environment variables and more.
    • Globs: Glob patterns are supported natively, including **, *, {expansion}, and more.
    • Template literals: Template literals are used to execute shell commands. This allows for easy interpolation of variables and expressions.
    • Safety: Bun Shell escapes all strings by default, preventing shell injection attacks.
    • JavaScript interop: Use Response, ArrayBuffer, Blob, Bun.file(path) and other JavaScript objects as stdin, stdout, and stderr.
    • Shell scripting: Bun Shell can be used to run shell scripts (.bun.sh files).
    • Custom interpreter: Bun Shell is written in Zig, along with it’s lexer, parser, and interpreter. Bun Shell is a small programming language.

Website: bun.sh
Support: GitHub Code Repository
Developer: Bun Team
License: MIT License

Bun is written in Zig and C++. Learn Zig with our recommended free tutorials. Learn C++ with our recommended free books and free tutorials.


Related Software

JavaScript Runtime Environments
Node.jsHugely popular cross-platform JavaScript run-time environment
BunFast JavaScript runtime designed as a drop-in replacement for Node.js.
DenoSimple, modern and secure runtime for JavaScript and TypeScript that uses V8
WasmEdgeHigh-performance, and extensible WebAssembly runtime
txiki.jsSmall and powerful JavaScript runtime
JerryScriptJavaScript engine for the Internet of Things
Window.jsJavaScript runtime for desktop graphics programming
BlueboatMulti-tenant serverless JavaScript runtime
loSuccessor project to Just
JustVery small v8 JavaScript runtime

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments