blense.
HomeFrontendCodeAINewsGuidesCheatsheetsAbout

Technology decoded, always.

A curated read on AI, product, and the culture behind the code. No noise, no hype.

blense.

Technology with focus. Stories about what innovation really changes.

Sections

FrontendArtificial IntelligenceCode & DevTech News

Blense

AboutRSSPrivacy policyTermsCookies
© 2026 Blense · blense.fun
Code & Development

Bun: The JavaScript Runtime That Replaced 15 Tools With One Binary

Bun is not just faster than Node.js. It is a runtime, package manager, bundler, test runner and TypeScript transpiler in a single binary. Here is why it is becoming the default for new projects in 2026.

Gby Genildo SouzaApr 167 min read
Bun: The JavaScript Runtime That Replaced 15 Tools With One Binary

Jarred Sumner, Bun's creator, said it plainly: "We didn't build Bun to replace Node.js. We built it to replace the 15 tools you need alongside Node.js.""

npm. webpack. babel. jest. ts-node. nodemon. tsc. One binary replaces all of them — and runs TypeScript natively, no compilation step required.

In December 2025, Anthropic acquired Bun. Claude Code, the Claude Agent SDK, and future AI coding products now run on it. With 7.2 million monthly downloads before the acquisition and 85% YoY growth, Bun stopped being an experiment and became infrastructure.

HTTP throughput
52k
req/s vs Node.js's 14k
Package install
25-30×
faster than npm
Cold start
8ms
vs Node.js's 40-120ms

Why Bun is faster

Node.js uses V8 (Chrome's engine), optimized for long-running processes. Bun uses JavaScriptCore (Safari's engine), optimized for fast startup. That single architectural decision explains most benchmark results.

On top of that, Bun is written in Zig — a low-level systems language — and uses io_uring on Linux for efficient async I/O. No TypeScript transpilation. No unnecessary compatibility layers. Less work per operation.

Node.js V8 (Chrome) C++ + libuv npm · tsc · jest · nodemon · babel... multiple external tools Bun JavaScriptCore (Safari) Zig + io_uring runtime · pkg mgr · bundler · test · TS a single binary
Diagram — Architecture: Node.js vs Bun
ℹ️

Bun's performance advantage is most visible in startup and package install. In real-world apps with databases, all three runtimes converge around 12,000 req/s — because database latency dominates. Where Bun genuinely makes a difference: CLI tools, serverless functions, and local development loops.

Installation

JS
# macOS / Linuxcurl -fsSL https://bun.sh/install | bash# Windowspowershell -c "irm bun.sh/install.ps1 | iex"# Verifybun --version

Native TypeScript — zero configuration

This is the first difference developers feel day-to-day. With Node.js, running TypeScript requires ts-node, or compiling with tsc, or using --experimental-strip-types (which only removes types, no type-checking).

The elite dev's arsenal.
Microfrontends with Angular and Nx: what nobody tells you15 minJavaScript Event Loop: The Heart of Non-Blocking Concurrency — Revisited in 20256 minTanStack Query: How to Eliminate Manual Server State Management in React6 minAngular Micro-frontends: How to Scale Large Applications and Eliminate Monolithic Build Times with Module Federation10 min
Node.js — setup required

# Option 1: ts-node npm install -D ts-node typescript npx ts-node index.ts # Option 2: compile first npx tsc node dist/index.js # Option 3: experimental (strip only) node --experimental-strip-types index.ts

Bun — zero setup

# Just works bun index.ts # With watch mode bun --watch index.ts # Nothing to install # No compilation # No tsconfig required

Package manager — 25x faster than npm

Bun's package manager is npm-compatible but uses a different strategy: a global binary cache and hard-links directly into node_modules. No re-downloading. No re-validation on every install.

JS
# Install dependencies (replaces npm install)bun install# Add packagebun add zodbun add -d typescript# Removebun remove lodash# Run package.json scriptsbun run devbun run buildbun run test# Execute without global installbunx create-hono my-app
Install time — React app (lower = better) Bun ~2s pnpm ~8s npm ~18s 0s 5s 10s 15s
Diagram — Install speed comparison (React app)

Native HTTP server

Bun ships a built-in HTTP server based on Web Standard APIs — the same Request and Response interface you already know from the browser and Cloudflare Workers.

JS
// server.tsBun.serve({  port: 3000,  fetch(req) {    const url = new URL(req.url);    if (url.pathname === '/') {      return new Response('Hello from Bun!');    }    if (url.pathname === '/json') {      return Response.json({ runtime: 'bun', fast: true });    }    return new Response('Not Found', { status: 404 });  },});console.log('Running at http://localhost:3000');

Bun's native server reaches around 68,000 req/s in hello world benchmarks — competing with Rust frameworks. At the application layer, frameworks like Hono extract the most from that throughput with optimized routing, Zod validation and a typed RPC client.

💡

Bun + Hono is the most performant combination for JavaScript APIs in 2026. Hono was built on Web Standards — the same foundation as Bun.serve() — and runs natively without adapters. If you haven't explored Hono yet, we have a complete guide to the framework — from the basics to end-to-end typed RPC client.

Built-in test runner (Jest-compatible)

No @jest/core, no ts-jest, no environment setup. The API is intentionally compatible with Jest.

JS
// math.test.tsimport { describe, it, expect } from 'bun:test';import { sum, average } from './math';describe('math functions', () => {  it('sums two numbers', () => {    expect(sum(2, 3)).toBe(5);  });  it('calculates average correctly', () => {    expect(average([1, 2, 3, 4])).toBe(2.5);  });  it('throws on empty array', () => {    expect(() => average([])).toThrow('Array cannot be empty');  });});// Run// bun test// bun test --watch// bun test --coverage
ℹ️

Bun's test runner is significantly faster than Jest because there's no transpilation step. TypeScript is executed directly. The same test code works in both — the API is intentionally compatible.

Native bundler

Bun ships a bundler that replaces esbuild, webpack, and rollup for the most common cases. TypeScript, JSX, tree-shaking, and minification — all native, no plugins.

JS
# CLI — simple buildbun build ./src/index.ts --outdir ./distbun build ./src/index.ts --outdir ./dist --minifybun build ./src/index.ts --outdir ./dist --sourcemap# Different targetsbun build ./src/index.ts --outdir ./dist --target nodebun build ./src/index.ts --outdir ./dist --target browserbun build ./src/index.ts --outdir ./dist --target bun
JS
// Programmatic APIawait Bun.build({  entrypoints: ['./src/index.ts'],  outdir: './dist',  minify: true,  splitting: true, // automatic code splitting  target: 'browser',  define: {    'process.env.NODE_ENV': '"production"',  },});

Native APIs that replace external packages

JS
// File I/O — no fs.readFile callbackconst text = await Bun.file('./data.txt').text();const json = await Bun.file('./config.json').json();await Bun.write('./output.txt', 'content here');// Native hashing — no library neededconst hash = Bun.hash('my string');const sha256 = new Bun.CryptoHasher('sha256').update('data').digest('hex');// Spawn processesconst proc = Bun.spawn(['ls', '-la'], { stdout: 'pipe' });const output = await new Response(proc.stdout).text();// SQLite — no driver neededimport { Database } from 'bun:sqlite';const db = new Database('./app.db');const users = db.query('SELECT * FROM users WHERE active = ?').all(1);// Native WebSocket in the serverBun.serve({  port: 3000,  fetch(req, server) {    if (server.upgrade(req)) return; // upgrade to WebSocket    return new Response('Regular HTTP');  },  websocket: {    message(ws, msg) { ws.send(`Echo: ${msg}`); },    open(ws) { console.log('connected'); },    close(ws) { console.log('disconnected'); },  },});

Node.js compatibility in 2026

Bun claims drop-in Node.js compatibility. The real number in 2026 is 95% — production-ready for most stacks, but with important exceptions.

What works in Bun ✓ Works (95%) Express, Fastify, Hono, Elysia Prisma, Drizzle, TypeORM fs, path, crypto, http, net Jest-compatible tests CommonJS + ESM ~95% of npm packages ✗ Blockers (5%) Native addons (node-gyp) C++ bindings compiled for V8 Advanced Worker Threads cluster module edge cases Some native database drivers Bun 1.2 improved this a lot
Diagram — Bun vs Node.js compatibility (March 2026)
⚠️

Before migrating an existing Node.js project, check for native addons: grep -r "node-gyp\|binding.gyp\|nan" node_modules/.bin. If you get results, the migration will need extra work.

Bun as dev tooling + Node.js in production

If you have compatibility concerns, there's a gradual adoption strategy that works well: use Bun as development tooling and keep Node.js in production until you're confident.

JS
// package.json — Bun for tooling, Node.js for deployment{  "scripts": {    "dev": "bun --watch src/index.ts",    "test": "bun test",    "build": "bun build src/index.ts --outdir dist --target node",    "start": "node dist/index.js"  // production still on Node.js  }}// The team gains:// - Native TypeScript in dev (no ts-node)// - 25x faster installs// - Much faster tests// - Zero compatibility risk in production

When to use Bun in production

✅ Use Bun when

Greenfield project CLI tools — 8ms startup matters Serverless / edge — cold start is critical TypeScript is a priority Small team, no legacy Microservices without native addons Developer experience is a selection criterion

⚠️ Be careful when

Project with native addons (node-gyp) Ecosystem with C++ bindings Team unwilling to test compatibility Enterprise system requiring audit Exotic database APIs Obscure packages with V8-specific behavior

The bigger picture: Bun + Anthropic

Anthropic's acquisition of Bun in December 2025 wasn't coincidental. Claude Code runs entirely on Bun — a runtime that needs fast startup, low memory footprint, and native TypeScript. Bun delivers all three.

The project remains open-source under MIT license. What changed is access to resources — Anthropic has a direct incentive to keep Bun fast and stable because its own products depend on it.

ℹ️

Bun v1.2 shipped in January 2026 with the largest Node.js compatibility update to date — improvements to node:cluster, Windows support and Worker Threads fixes. v1.3.11 in March 2026 focused on bundling and package manager performance.

What stays with you after reading this
  • 1Bun uses JavaScriptCore (Safari) + Zig. The engine optimized for fast startup explains the benchmarks — it's not marketing magic.
  • 2One binary replaces: npm, ts-node, tsc, jest, nodemon, webpack/esbuild. That's the real differentiator, not raw speed.
  • 3Package install 25-30x faster than npm. For CI pipelines, the difference is transformative.
  • 4Native TypeScript with zero configuration. bun index.ts just works. Period.
  • 595% Node.js compatibility in 2026. The remaining 5% is mainly native addons with C++ bindings.
  • 6For apps with databases, production throughput is similar to Node.js — the real gain is in startup, install speed and DX.
  • 7Safe strategy: Bun as dev tooling (install, test, watch) + Node.js in production until you're confident.
  • 8Acquired by Anthropic in December 2025. Claude Code runs on Bun.

Bun wasn't built to win benchmarks. It was built to eliminate the friction between having an idea and having a server running.

In 2026, that friction was real — and Node.js had accumulated 15 years of external tools to compensate for it. Bun decided to solve it at the root.

Keep reading
More on the modern JavaScript ecosystem

Articles on Node.js, TypeScript, Hono.js and the modern JavaScript ecosystem — all with real code, no filler.

Visit Blueprint Blog

#JavaScript#TypeScript#Node.js

The elite dev's arsenal.

Microfrontends with Angular and Nx: what nobody tells you
Code & Development

Microfrontends with Angular and Nx: what nobody tells you

Most tutorials show how to build microfrontends in minutes, but few reveal the architectural debt that emerges after months of production deployments.

Genildo Souza · Jul 28 · 15 min
JavaScript Event Loop: The Heart of Non-Blocking Concurrency — Revisited in 2025
Code & Development

JavaScript Event Loop: The Heart of Non-Blocking Concurrency — Revisited in 2025

The Event Loop is not just a simple loop, but a sophisticated coordination mechanism between Call Stack, queues, and runtime. Essential for JS concurrency, it enables thousands of asynchronous operations without blocking the UI. This guide explores its structure, differences between Node.js and browsers, common bugs, advanced techniques, and 2025 trends like Structured Concurrency and scheduler.yield().

Genildo Souza · Jul 26 · 6 min
Next.js 16 PPR: Eliminate the static vs. dynamic tradeoff and achieve Edge TTFB with fresh data
Code & Development

Next.js 16 PPR: Eliminate the static vs. dynamic tradeoff and achieve Edge TTFB with fresh data

Partial Prerendering in Next.js 16 resolves the classic rendering tradeoff, delivering static speed with dynamic data in one seamless response.

Genildo Souza · Jul 13 · 14 min
In this article
  • Why Bun is faster
  • Installation
  • Native TypeScript — zero configuration
  • Package manager — 25x faster than npm
  • Native HTTP server
  • Built-in test runner (Jest-compatible)
  • Native bundler
  • Native APIs that replace external packages
  • Node.js compatibility in 2026
  • Bun as dev tooling + Node.js in production
  • When to use Bun in production
  • The bigger picture: Bun + Anthropic