Watch
1
0
Fork
You've already forked bun
0
mirror of https://github.com/Primexz/bun.git synced 2026-08-14 22:18:19 +00:00
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one https://bun.sh
  • Zig 59.4%
  • C++ 24.6%
  • JavaScript 6%
  • TypeScript 5.3%
  • C 3.3%
  • Other 1.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-01-25 21:59:11 -08:00
.docker [misc] Remove irrelevant scripts 2022-07-27 21:21:36 -07:00
.github Force \n instead of \r\n on Windows CI 2024-01-25 19:05:47 -08:00
.vscode [internal] Tweak jsonc formatting 2024-01-25 19:19:32 -08:00
bench use Biome to format Bun's codebase instead of Prettier (#8494) 2024-01-25 19:15:26 -08:00
completions Prevent shell-option changes leaking out of the bash-completion script (#7646) 2023-12-13 17:32:53 -08:00
dockerhub Make tsc --help 2x faster (#7365) 2023-12-01 22:56:40 +01:00
docs docs: update the windows build documentation and list it on the docs site 2024-01-25 04:15:41 -08:00
examples Automatically hot reload Bun.serve() (#4344) 2023-08-25 21:08:41 -07:00
misctools 8096 isnt 8kb, 8192 is (#8296) 2024-01-19 23:16:11 -08:00
packages use Biome to format Bun's codebase instead of Prettier (#8494) 2024-01-25 19:15:26 -08:00
scripts windows: fix some websocket tests (#8433) 2024-01-24 19:40:59 -08:00
src Track hasInstallScript and libc in NPM registry api (#8495) 2024-01-25 20:38:20 -08:00
test [windows] Remove no longer failing tests from being marked as failing 2024-01-25 21:59:11 -08:00
.dockerignore feat: Windows + CMake Build System (#4410) 2023-10-27 01:51:56 -07:00
.editorconfig Bring uSockets & uWebSockets forks into Bun's repository (#4372) 2023-08-28 08:38:30 -07:00
.gitattributes Add brotli test (#7976) 2024-01-03 21:57:19 -08:00
.gitignore ci: run windows tests and also run them concurrently (#7758) 2024-01-12 17:02:20 -08:00
.gitmodules feat(http2) Client Support (#6761) 2023-11-17 18:14:54 -08:00
.prettierignore Fix prettier 2024-01-16 20:20:30 -08:00
.prettierrc.cjs Docs for DOM testing and FileSink (#3330) 2023-06-20 18:57:37 -07:00
biome.json [internal] Tweak jsonc formatting 2024-01-25 19:19:32 -08:00
build.zig Rename bun.zig to BunObject.zig (#8344) 2024-01-21 19:55:24 -08:00
bun.lockb use Biome to format Bun's codebase instead of Prettier (#8494) 2024-01-25 19:15:26 -08:00
bunfig.toml fix typo and grammar errors (#5046) 2023-09-12 18:53:23 -07:00
CMakeLists.txt Bump + ci autofix (#8490) 2024-01-25 13:58:59 -08:00
CODE_OF_CONDUCT.md Add a code of conduct 2022-09-03 20:54:15 -07:00
CONTRIBUTING.md CLI flags (#6395) 2023-11-15 18:15:10 -08:00
Dockerfile feat: Implement using keyword (explicit resource management) (#8151) 2024-01-15 23:14:41 -08:00
entitlements.debug.plist Create entitlements.debug.plist 2022-02-18 15:24:19 -08:00
entitlements.plist New subcommand: bun upgrade. It upgrades bun to the latest version. 2021-10-28 05:34:38 -07:00
Makefile feat: Implement using keyword (explicit resource management) (#8151) 2024-01-15 23:14:41 -08:00
package.json use Biome to format Bun's codebase instead of Prettier (#8494) 2024-01-25 19:15:26 -08:00
README.md CLI flags (#6395) 2023-11-15 18:15:10 -08:00
root.zig Rename bun.zig to BunObject.zig (#8344) 2024-01-21 19:55:24 -08:00
root_wasm.zig WASM test analyzer (#4043) 2023-08-07 18:51:16 -07:00
SECURITY.md Create SECURITY.md 2023-09-12 16:53:59 -07:00
tsconfig.base.json Better types (#7670) 2023-12-18 13:27:48 -08:00
tsconfig.json Better types (#7670) 2023-12-18 13:27:48 -08:00
workspace.code-workspace go 2021-08-11 13:56:03 -07:00

Logo

Bun

stars Bun speed

Documentation   •   Discord   •   Issues   •   Roadmap

Read the docs →

What is Bun?

Bun is under active development. Use it to speed up your development workflows or run simpler production code in resource-constrained environments like serverless functions. We're working on more complete Node.js compatibility and integration with existing frameworks. Join the Discord and watch the GitHub repository to keep tabs on future releases.

Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It ships as a single executable called bun.

At its core is the Bun runtime, a fast JavaScript runtime designed as a drop-in replacement for Node.js. It's written in Zig and powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage.

bun run index.tsx             # TS and JSX supported out-of-the-box

The bun command-line tool also implements a test runner, script runner, and Node.js-compatible package manager. Instead of 1,000 node_modules for development, you only need bun. Bun's built-in tools are significantly faster than existing options and usable in existing Node.js projects with little to no changes.

bun test                      # run tests
bun run start                 # run the `start` script in `package.json`
bun install <pkg>             # install a package
bunx cowsay 'Hello, world!'   # execute a package

Install

Bun supports Linux (x64 & arm64) and macOS (x64 & Apple Silicon).

Linux users — Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1.

Windows users — Bun does not currently provide a native Windows build. We're working on this; progress can be tracked at this issue. In the meantime, use one of the installation methods below for Windows Subsystem for Linux.

# with install script (recommended)
curl -fsSL https://bun.sh/install | bash

# with npm
npm install -g bun

# with Homebrew
brew tap oven-sh/bun
brew install bun

# with Docker
docker pull oven/bun
docker run --rm --init --ulimit memlock=-1:-1 oven/bun

Upgrade

To upgrade to the latest version of Bun, run:

bun upgrade

Bun automatically releases a canary build on every commit to main. To upgrade to the latest canary build, run:

bun upgrade --canary

View canary build

Contributing

Refer to the Project > Contributing guide to start contributing to Bun.

License

Refer to the Project > License page for information about Bun's licensing.