C.W.K.
Stream
Lesson 03 of 05 · published

Bun 과 Deno: Native TS Runtime

~8 min · tooling, bun, deno, runtime

Level 0Curious
0 XP0/93 lessons0/23 achievements
0/100 XP to next level100 XP to go0% complete
"Bun 이 너의 `.ts` 파일 실행. Deno 도. Compile step 없음. tsc 없음."

뭔지

Bun (bun.sh) — JavaScriptCore 위에 빌드된 JavaScript runtime. 많은 use case 엔 Node 의 drop-in 대체, 내장 TypeScript 지원, 빠른 startup, 포괄 standard library. bun run script.ts 가 그냥 작동.

Deno (deno.com) — V8 위에 빌드된 JavaScript/TypeScript runtime. Security-first (명시 permission 모델), TS-native, 내장 linter/formatter/test runner. deno run script.ts 가 그냥 작동.

둘 다 `.ts → .js` compile step 제거. Runtime 이 import 시 내부적으로 transpilation 처리; `.ts` 파일 직접 ship. Tooling 감소가 script, CLI, 작은 service 엔 significant.

타입 체크 여전히 중요

Bun 과 Deno 둘 다 default 로 transpile-하지만-타입체크-안 함 — 타입 떼고 JavaScript 돌림. 타입 체크 돌리려면 여전히 `tsc --noEmit` (또는 Deno 에서 `deno check`) 원해. 성능 trade-off: runtime 에 빠르게 transpile, 필요할 때 별도로 타입-체크.

어느 거 쓸 때

Bun — 속도와 단순성 원하는 Node-호환 프로젝트엔. Npm 패키지 작동, standard library 풍부, dev 경험 통합 (test runner, bundler, package manager 다 내장).

Deno — security 모델 가치 둘 때 (명시 `--allow-net`, `--allow-read` 등), Web Standard 선호 (Deno 가 default 로 URL import 와 Fetch 씀), 더 tight 한 standard library 원할 때.

Node + tsc + bundler — 특정 Node 버전 필요, 특정 Node-전용 library, 또는 전환 비용이 이득 초과하는 큰 기존 codebase 작업 시.

2026 의 새 TypeScript 프로젝트엔 Bun 이 default fast 옵션, Deno 가 secure 옵션, Node 가 호환 옵션. 셋 다 유효; 선택이 프로젝트의 다른 제약에 달림.

Code

3개 TS runtime 경험 나란히·bash
# Bun — native TS, 빠른 startup.
bun run hello.ts            # 그냥 실행
bun test                    # 내장 test runner
bun --hot run server.ts     # hot reload 내장

# Deno — native TS, security 모델.
deno run hello.ts           # permission 명시 요청
deno run --allow-net script.ts  # network 접근 허용
deno test                   # 내장 test runner
deno fmt && deno lint       # formatter 와 linter 내장

# Node + tsc workflow — 여러 tool.
npm install --save-dev typescript tsx
npx tsx hello.ts            # tsx 가 TS 지원 위해 Node + esbuild wrap
# (또는: hot reload 엔 nodemon + tsx)
# (또는: 타입 체크엔 tsc --noEmit, runtime 엔 node dist/hello.js)

External links

Exercise

Bun 이나 Deno 로컬 설치. 가진 작은 TypeScript script 가져와 (또는 써). bun run file.tsdeno run file.ts 로 돌려. node --import tsx file.ts 와 startup 시간과 ergonomics 비교.
Hint
작은 script 엔 startup 차이 극적 — 자주 node + tsx 보다 10x 빠름. 장기 server 엔 startup 차이 덜 중요, 근데 한 binary 의 단순성이 자주 중요.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.