# Bun

> Bun fast JavaScript runtime and bundler. Use for fast JS development. Use when this capability is needed.

- Skill: `tomevault-io/bun-3` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/bun-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/bun-3/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/bun-3

---


# Bun

Bun is a drop-in replacement for Node.js, written in Zig. It is **fast**. v1.1 brings Windows support.

## When to Use

- **Speed**: `bun install` is instant. `bun run` starts instantly.
- **Local Dev**: Use it as a package manager even if you use Node.js for production.
- **Testing**: `bun test` is a fast, Jest-compatible test runner.

## Core Concepts

### Drop-in Replacement

Implements Node APIs (`fs`, `http`, `path`).

### Bundle / Transpile

Built-in transpiler for TS/JSX.

### Macros

Run code at build time.

## Best Practices (2025)

**Do**:

- **Use `bun install`**: It's compatible with `package-lock.json` but faster.
- **Use `bun test`**: It's much faster than Jest/Vitest.
- **Use `Bun.serve`**: For max performance HTTP servers.

**Don't**:

- **Don't use for everything**: Some niche Node C++ addons might still have issues.

## References

- [Bun Documentation](https://bun.sh/)

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/g1joshi) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-14 -->

