Bun 1.2 Released
Bun, the high-speed JavaScript runtime gaining attention, has released version 1.2. With full Windows support, major Node.js compatibility improvements, and built-in S3 client, its practicality has further increased.
What is Bun: A high-speed JavaScript/TypeScript runtime written in Zig. Provides runtime, bundler, package manager, and test runner all-in-one.
Major New Features
1. Full Windows Support
Windows support, which was previously in beta, is now fully supported. The same features as macOS and Linux are available.
# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"
# Or via npm
npm install -g bun
2. 92% Node.js Compatibility Achieved
Node.js API coverage has significantly improved. Most major npm packages now work.
| Module | Support Status |
|---|---|
| node:fs / node:path | Fully Supported |
| node:http / node:https | Fully Supported |
| node:crypto | Nearly Fully Supported |
| node:net / node:tls | Fully Supported |
| node:child_process | Fully Supported |
| node:worker_threads | Fully Supported |
3. Built-in S3 Client
Access to AWS S3 is now built-in. S3 operations are possible without external libraries.
// Read file from S3
const file = Bun.s3.file("s3://my-bucket/data.json");
const data = await file.json();
// Upload file to S3
await Bun.s3.write("s3://my-bucket/output.txt", "Hello S3!");
// Credentials automatically retrieved from environment variables
// AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
4. Embedded Postgres
PostgreSQL client is now also built-in.
import { sql } from "bun";
// Connection is auto-managed
const users = await sql`
SELECT * FROM users
WHERE created_at > ${new Date('2025-12-01')}
`;
// Transaction
await sql.begin(async (sql) => {
await sql`INSERT INTO logs (message) VALUES (${'Started'})`;
await sql`UPDATE users SET status = 'active'`;
});
5. Text-based Lock File
bun.lock has changed from binary to text format. Diffs are now easier to see.
Performance Comparison
| Benchmark | Node.js 22 | Deno 2.0 | Bun 1.2 |
|---|---|---|---|
| Startup time | ~35ms | ~25ms | ~7ms |
| HTTP Server (req/s) | ~80,000 | ~100,000 | ~150,000 |
| npm install (clean) | ~15s | N/A | ~3s |
| File reading | 1.0x | 1.2x | 2.5x |
Why is it fast: Bun uses the JavaScriptCore engine (same as Safari) and is optimized with Zig. Also, the package manager utilizes a global cache to minimize I/O.
Development Tool Enhancements
bun test Improvements
// Test file (app.test.ts)
import { describe, it, expect, mock } from "bun:test";
describe("Math operations", () => {
it("should add numbers correctly", () => {
expect(1 + 2).toBe(3);
});
it("should mock functions", () => {
const fn = mock(() => 42);
expect(fn()).toBe(42);
expect(fn).toHaveBeenCalledTimes(1);
});
});
// Execution
// bun test # All tests
// bun test --watch # Watch mode
// bun test --coverage # With coverage
Framework Support Status
| Framework | Support Status | Notes |
|---|---|---|
| Elysia | Fully Supported | Bun-exclusive, fastest |
| Hono | Fully Supported | Multi-runtime |
| Express | Fully Supported | Works via compatibility |
| Fastify | Fully Supported | Official support from v5 |
| Next.js | Experimental | Some feature limitations |
| Nuxt | Supported | Nitro preset |
Elysia Example
import { Elysia } from 'elysia';
const app = new Elysia()
.get('/', () => 'Hello Bun!')
.get('/user/:id', ({ params: { id } }) => {
return { id, name: 'User ' + id };
})
.post('/json', ({ body }) => body)
.listen(3000);
console.log(`Running at ${app.server?.hostname}:${app.server?.port}`);
Migration Tips
Migration from Node.js
# 1. package.json works as-is
bun install
# 2. Running scripts
bun run dev # package.json scripts
bun run src/index.ts # Direct execution
# 3. Environment variables
# .env files are automatically loaded
# 4. Type checking is separate
bun x tsc --noEmit
Notes
- Some native modules (node-gyp) may not work
- Next.js App Router is not fully supported
- Production adoption should be judged case by case
Summary
Bun 1.2 is a release with significantly improved practicality. Key points:
- Full Windows support: Cross-platform development made easy
- 92% Node.js compatibility: Most npm packages work
- Built-in features: Reduce external dependencies for S3, Postgres, etc.
- Overwhelming speed: Startup, execution, and package management are all fast
For new projects or use cases where performance is critical, Bun is worth actively considering.
← Back to list