본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)280k · #145

bun-runtime

하는 일

Bun은 JavaScript와 TypeScript로 작업하는 개발자를 위한 도구 모음입니다. 코드를 실행하고, 패키지를 설치하고, 파일을 묶고, 프로그램을 테스트하는 일을 모두 매우 빠르게 합니다.

사용하는 경우

  • ✓새 JavaScript나 TypeScript 프로그래밍 프로젝트를 시작할 때.
  • ✓코드가 매우 빠르게 실행되거나 패키지가 빠르게 설치되어야 할 때.
  • ✓Bun 런타임 환경을 사용해 Vercel 플랫폼에 프로젝트를 배포할 때.

스킬 링크

https://github.com/affaan-m/ECC/blob/main/pi/core/skills/bun-runtime/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/affaan-m/ECC/blob/main/pi/core/skills/bun-runtime/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Bun을 사용해 제 메인 스크립트 ‘app.js’를 어떻게 실행할 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Bun은 다른 흔한 도구를 대신하는 빠른 대체재로 작동합니다. 패키지를 설치하는 자체 프로그램과, 스크립트와 테스트를 실행하는 체계를 갖추고 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Bun Runtime

Bun is a fast all-in-one JavaScript runtime and toolkit: runtime, package manager, bundler, and test runner.

When to Use

  • Prefer Bun for: new JS/TS projects, scripts where install/run speed matters, Vercel deployments with Bun runtime, and when you want a single toolchain (run + install + test + build).
  • Prefer Node for: maximum ecosystem compatibility, legacy tooling that assumes Node, or when a dependency has known Bun issues.

Use when: adopting Bun, migrating from Node, writing or debugging Bun scripts/tests, or configuring Bun on Vercel or other platforms.

How It Works

  • Version baseline: guidance below targets Bun 1.4.x. Check the actual version with bun --version before relying on flag names, since CLI flags can change between releases.
  • Runtime: Drop-in Node-compatible runtime, built on JavaScriptCore. As of Bun 1.4 the runtime itself is implemented in Rust (migrated from Zig). Not 100% Node-compatible — some native addons, less-common node: internal APIs, and packages that depend on Node-specific internals can still fail; verify before depending on it in production.
  • Package manager: Bun includes a package manager; installation performance depends on the project, network conditions, and cache state. Lockfile is bun.lock (text) by default in current Bun; older versions used bun.lockb (binary) — Bun still reads that format for migration, but new projects should use bun.lock.
  • Bundler: Built-in bundler and transpiler for apps and libraries.
  • Test runner: Built-in bun test with a Jest-like API.

Migration from Node: Replace node script.js with bun run script.js or bun script.js. Run bun install in place of npm install; most packages work. Use bun run for npm scripts; bun x for npx-style one-off runs. Node built-ins are supported; prefer Bun APIs where they exist for better performance.

Package and workspace commands: bun add <pkg> / bun remove <pkg> / bun update [pkg] manage dependencies; bun outdated lists stale deps. bun pm ls lists project dependencies and resolved versions using the lockfile; --all includes transitive dependencies. It is not an integrity check of installed file contents. bun audit queries registry advisories using package names and versions from bun.lock; it does not modify package.json, bun.lock, or node_modules. Review approved destinations before sending private package metadata. Packages whose scoped registry lacks an advisory endpoint are skipped and do not affect the exit code. bun audit fix upgrades and installs dependencies, changing the lockfile and installed packages and sometimes direct version pins; review it as a modifying install operation, including applicable lifecycle scripts. bun dedupe collapses duplicate installs, and bun prune removes packages no longer referenced. Monorepos use a root workspaces array in package.json (same convention as npm/yarn); run a script in one workspace with bun run --filter <pkg-name> <script>.

Built-in APIs: reach for these before adding a dependency — Bun.file / Bun.write for file I/O, bun:sqlite for an embedded SQLite database, Bun.serve for an HTTP/WebSocket server, Bun.sql for SQL databases, Bun.redis for Redis, and Bun.S3Client for S3-compatible object storage. See the 1.4 release notes for the rest of what's new.

Vercel: Set bunVersion: "1.4.x" in vercel.json to use Bun 1.4 (Rust runtime). See Vercel's Bun runtime docs. Build: bun run build or bun build ./src/index.ts --outdir=dist. Install: bun install --frozen-lockfile for reproducible deploys.

Reference: Bun 1.4 release notes.

Examples

Run and install

# Install dependencies (creates/updates bun.lock)
bun install

# Run a script or file
bun run dev
bun run src/index.ts
bun src/index.ts

Scripts and env

bun run --env-file=.env dev
FOO=bar bun run script.ts

Testing

bun test
bun test --watch

…

자주 묻는 질문

Bun은 Node.js와 100% 호환되나요?

완전히는 아닙니다. 대부분은 작동하지만, 아주 특정한 Node.js 기능이나 그것에 의존하는 패키지는 Bun에서 완벽하게 작동하지 않을 수 있습니다.

`bun install`과 `npm install`의 차이는 무엇인가요?

둘 다 프로젝트의 의존성을 설치합니다. `bun install`은 보통 더 빠르며, 모두가 같은 패키지 버전을 쓰도록 `bun.lock` 파일을 사용합니다.

`bun.lock` 파일이란 무엇인가요?

설치된 모든 패키지의 정확한 버전을 기록한 파일입니다. 이로써 프로젝트가 어느 컴퓨터나 환경에서도 같은 방식으로 작동하며, 설치가 재현 가능해집니다.

상세 정보

작성자의 원본 설명

Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.

repo: affaan-m/ECC

인기도

GitHub 스타
280k
순위
#145
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬