diff options
author | 2022-07-11 05:37:30 +0300 | |
---|---|---|
committer | 2022-07-10 19:37:30 -0700 | |
commit | 418972b42360e6c48f104aff1deaa75b54d7de39 (patch) | |
tree | 416994073d479e272e0c9c04226accfb155796ac | |
parent | 1e9cba99720e110e6a4d8fe3014491118b123fdc (diff) | |
download | bun-418972b42360e6c48f104aff1deaa75b54d7de39.tar.gz bun-418972b42360e6c48f104aff1deaa75b54d7de39.tar.zst bun-418972b42360e6c48f104aff1deaa75b54d7de39.zip |
Update GitHub URL to match new repo URL (#547)
* Update repo URLs
* GitHub URL update
* Revert accidental URL changes
-rw-r--r-- | .devcontainer/scripts/getting-started.sh | 2 | ||||
-rw-r--r-- | .github/workflows/bun.yml | 2 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | packages/bun-landing/page.tsx | 28 | ||||
-rw-r--r-- | packages/bun-landing/public/index.html | 4 | ||||
-rw-r--r-- | packages/bun-types/package.json | 2 | ||||
-rw-r--r-- | src/bun.js/api/FFI.h | 2 | ||||
-rw-r--r-- | src/cli/install.sh | 2 | ||||
-rw-r--r-- | src/cli/upgrade_command.zig | 2 | ||||
-rw-r--r-- | src/env_loader.zig | 2 | ||||
-rw-r--r-- | src/install/install.zig | 2 | ||||
-rw-r--r-- | src/js_parser.zig | 4 | ||||
-rw-r--r-- | test/apps/bun-install-utf8.sh | 2 | ||||
-rw-r--r-- | test/apps/bun-run-check.sh | 4 | ||||
-rw-r--r-- | test/bun.js/ffi.test.fixture.callback.c | 2 | ||||
-rw-r--r-- | test/bun.js/ffi.test.fixture.receiver.c | 2 | ||||
-rw-r--r-- | test/bun.js/url.test.ts | 4 | ||||
-rw-r--r-- | types/bun/bun.d.ts | 2 | ||||
-rw-r--r-- | types/bun/bundle.ts | 2 | ||||
-rw-r--r-- | types/bun/header.txt | 2 | ||||
-rw-r--r-- | types/bun/index.d.ts | 2 |
22 files changed, 47 insertions, 47 deletions
diff --git a/.devcontainer/scripts/getting-started.sh b/.devcontainer/scripts/getting-started.sh index aeef96865..32c29443a 100644 --- a/.devcontainer/scripts/getting-started.sh +++ b/.devcontainer/scripts/getting-started.sh @@ -4,7 +4,7 @@ echo "To get started, login to GitHub and clone bun's GitHub repo into /workspac echo "Make sure to login with a Personal Access Token" echo "# First time setup" echo "gh auth login" -echo "gh repo clone Jarred-Sumner/bun . -- --depth=1 --progress -j8" +echo "gh repo clone oven-sh/bun . -- --depth=1 --progress -j8" echo "" echo "# Compile bun dependencies (zig is already compiled)" echo "make devcontainer" diff --git a/.github/workflows/bun.yml b/.github/workflows/bun.yml index dffab549c..b7be54d5f 100644 --- a/.github/workflows/bun.yml +++ b/.github/workflows/bun.yml @@ -161,7 +161,7 @@ jobs: org.opencontainers.image.title=bun org.opencontainers.image.description=bun is a fast bundler, transpiler, JavaScript Runtime environment and package manager for web software. The image is an Ubuntu 20.04 image with bun preinstalled into /opt/bun. org.opencontainers.image.vendor=bun - org.opencontainers.image.source=https://github.com/Jarred-Sumner/bun + org.opencontainers.image.source=https://github.com/oven-sh/bun org.opencontainers.image.url=https://bun.sh builder: ${{ steps.buildx.outputs.name }} push: true @@ -748,7 +748,7 @@ release-create-auto-updater: release-create: gh release create --title "bun v$(PACKAGE_JSON_VERSION)" "$(BUN_BUILD_TAG)" - gh release create --repo=$(BUN_AUTO_UPDATER_REPO) --title "bun v$(PACKAGE_JSON_VERSION)" "$(BUN_BUILD_TAG)" -n "See https://github.com/Jarred-Sumner/bun/releases/tag/$(BUN_BUILD_TAG) for release notes. Using the install script or bun upgrade is the recommended way to install bun. Join bun's Discord to get access https://bun.sh/discord" + gh release create --repo=$(BUN_AUTO_UPDATER_REPO) --title "bun v$(PACKAGE_JSON_VERSION)" "$(BUN_BUILD_TAG)" -n "See https://github.com/oven-sh/bun/releases/tag/$(BUN_BUILD_TAG) for release notes. Using the install script or bun upgrade is the recommended way to install bun. Join bun's Discord to get access https://bun.sh/discord" release-bin-entitlements: @@ -195,7 +195,7 @@ bun.js prefers Web API compatibility instead of designing new APIs when possible - `.env` files automatically load into `process.env` and `Bun.env` - top level await -The runtime uses JavaScriptCore, the JavaScript engine powering WebKit and Safari. Some web APIs like [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) and [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) directly use [Safari's implementation](https://github.com/Jarred-Sumner/bun/blob/HEAD/src/bun.js/bindings/webcore/JSFetchHeaders.cpp). +The runtime uses JavaScriptCore, the JavaScript engine powering WebKit and Safari. Some web APIs like [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) and [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) directly use [Safari's implementation](https://github.com/oven-sh/bun/blob/HEAD/src/bun.js/bindings/webcore/JSFetchHeaders.cpp). `cat` clone that runs [2x faster than GNU cat](https://twitter.com/jarredsumner/status/1511707890708586496) for large files on Linux @@ -521,7 +521,7 @@ And to the `types` field in your `tsconfig.json`: bun is a project with an incredibly large scope and is still in its early days. -You can see [Bun's Roadmap](https://github.com/Jarred-Sumner/bun/issues/159), but here are some additional things that are planned: +You can see [Bun's Roadmap](https://github.com/oven-sh/bun/issues/159), but here are some additional things that are planned: | Feature | In | | ------------------------------------------------------------------------------------- | -------------- | @@ -541,7 +541,7 @@ You can see [Bun's Roadmap](https://github.com/Jarred-Sumner/bun/issues/159), bu | `@jsxPragma` comments | JS Transpiler | | Sharing `.bun` files | bun | | Dates & timestamps | TOML parser | -| [Hash components for Fast Refresh](https://github.com/Jarred-Sumner/bun/issues/18) | JSX Transpiler | +| [Hash components for Fast Refresh](https://github.com/oven-sh/bun/issues/18) | JSX Transpiler | <small> JS Transpiler == JavaScript Transpiler @@ -1173,7 +1173,7 @@ Packages, metadata for those packages, the hoisted install order, dependencies f #### Why is it fast? -It uses linear arrays for all data. [Packages](https://github.com/Jarred-Sumner/bun/blob/be03fc273a487ac402f19ad897778d74b6d72963/src/install/install.zig#L1825) are referenced by auto-incrementing integer ID or a hash of the package name. Strings longer than 8 characters are de-duplicated. Prior to saving on disk, the lockfile is garbage-collected & made deterministic by walking the package tree and cloning the packages in dependency order. +It uses linear arrays for all data. [Packages](https://github.com/oven-sh/bun/blob/be03fc273a487ac402f19ad897778d74b6d72963/src/install/install.zig#L1825) are referenced by auto-incrementing integer ID or a hash of the package name. Strings longer than 8 characters are de-duplicated. Prior to saving on disk, the lockfile is garbage-collected & made deterministic by walking the package tree and cloning the packages in dependency order. #### Cache @@ -1475,7 +1475,7 @@ Run `bun bun ./path-to.js` to generate a `node_modules.bun` file containing all #### What is `.bun`? -Note: [This format may change soon](https://github.com/Jarred-Sumner/bun/issues/121) +Note: [This format may change soon](https://github.com/oven-sh/bun/issues/121) The `.bun` file contains: @@ -2792,7 +2792,7 @@ const out = encode_png( ); ``` -The [auto-generated wrapper](https://github.com/Jarred-Sumner/bun/blob/c6d732eee2721cd6191672cbe2c57fb17c3fffe4/src/bun.js/ffi.exports.js#L146-L148) converts the pointer to a TypedArray +The [auto-generated wrapper](https://github.com/oven-sh/bun/blob/c6d732eee2721cd6191672cbe2c57fb17c3fffe4/src/bun.js/ffi.exports.js#L146-L148) converts the pointer to a TypedArray <details> @@ -2860,7 +2860,7 @@ await Bun.write("out.png", png); Bun.js implements 90% of the APIs available in [Node-API](https://nodejs.org/api/n-api.html) (napi). -You can see the status of [this here](https://github.com/Jarred-Sumner/bun/issues/158). +You can see the status of [this here](https://github.com/oven-sh/bun/issues/158). Loading Node-API modules in Bun.js works the same as in Node.js: @@ -2891,7 +2891,7 @@ require("./my-node-module.node"); import.meta.require("./my-node-module.node"); ``` -Bun doesn't currently support dynamic requires, but `import.meta.require` is an escape hatch for that. It uses a [JavaScriptCore builtin function](https://github.com/Jarred-Sumner/bun/blob/aa87d40f4b7fdfb52575f44d151906ddba6a82d0/src/bun.js/bindings/builtins/js/JSZigGlobalObject.js#L26). +Bun doesn't currently support dynamic requires, but `import.meta.require` is an escape hatch for that. It uses a [JavaScriptCore builtin function](https://github.com/oven-sh/bun/blob/aa87d40f4b7fdfb52575f44d151906ddba6a82d0/src/bun.js/bindings/builtins/js/JSZigGlobalObject.js#L26). ### `Bun.Transpiler` @@ -3214,7 +3214,7 @@ Inside the container, run this: ```bash # First time setup gh auth login -gh repo clone Jarred-Sumner/bun . -- --depth=1 --progress -j8 +gh repo clone oven-sh/bun . -- --depth=1 --progress -j8 # update all submodules except webkit because webkit takes awhile and it's already compiled for you. git -c submodule."src/bun.js/WebKit".update=none submodule update --init --recursive --depth=1 --progress diff --git a/packages/bun-landing/page.tsx b/packages/bun-landing/page.tsx index da91cf90d..f508d7038 100644 --- a/packages/bun-landing/page.tsx +++ b/packages/bun-landing/page.tsx @@ -1,7 +1,7 @@ import { readFileSync } from "fs"; import * as shiki from "shiki"; -const DOCS = "https://github.com/Jarred-Sumner/bun#Reference"; +const DOCS = "https://github.com/oven-sh/bun#Reference"; // because we don't want to wait for it to reload everytime this page reloads globalThis._highlighter ||= await shiki.getHighlighter({ @@ -279,7 +279,7 @@ export default ({ inlineCSS }) => ( <li> <a className="NavText" - href="https://github.com/Jarred-Sumner/bun" + href="https://github.com/oven-sh/bun" > GitHub </a> @@ -371,17 +371,17 @@ export default ({ inlineCSS }) => ( <BarGraphLabel name="bun" version="v0.1.0" - source="https://github.com/Jarred-Sumner/bun/bench/react-hello-world.jsx" + source="https://github.com/oven-sh/bun/bench/react-hello-world.jsx" /> <BarGraphLabel name="node" version="v18.1.0" - source="https://github.com/Jarred-Sumner/bun/bench/react-hello-world.node.jsx" + source="https://github.com/oven-sh/bun/bench/react-hello-world.node.jsx" /> <BarGraphLabel name="deno" version="v1.23.2" - source="https://github.com/Jarred-Sumner/bun/bench/react-hello-world.deno.jsx" + source="https://github.com/oven-sh/bun/bench/react-hello-world.deno.jsx" /> </div> </div> @@ -423,17 +423,17 @@ export default ({ inlineCSS }) => ( <BarGraphLabel name="bun:sqlite" version="v0.1.0" - source="https://github.com/Jarred-Sumner/bun/blob/main/bench/sqlite/query.js" + source="https://github.com/oven-sh/bun/blob/main/bench/sqlite/query.js" /> <BarGraphLabel name="better-sqlite3" - source="https://github.com/Jarred-Sumner/bun/blob/main/bench/sqlite/query.better-sqlite3.mjs" + source="https://github.com/oven-sh/bun/blob/main/bench/sqlite/query.better-sqlite3.mjs" version="node v18.2.0" /> <BarGraphLabel name="deno (x/sqlite)" version="v1.23.2" - source="https://github.com/Jarred-Sumner/bun/blob/main/bench/sqlite/query.deno.js" + source="https://github.com/oven-sh/bun/blob/main/bench/sqlite/query.deno.js" /> </div> </div> @@ -473,17 +473,17 @@ export default ({ inlineCSS }) => ( <BarGraphLabel name="bun:ffi" version="v0.1.0" - source="https://github.com/Jarred-Sumner/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.bun.js" + source="https://github.com/oven-sh/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.bun.js" /> <BarGraphLabel name="node (napi)" - source="https://github.com/Jarred-Sumner/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.napi.mjs" + source="https://github.com/oven-sh/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.napi.mjs" version="node v18.2.0" /> <BarGraphLabel name="deno (ffi)" version="v1.23.2" - source="https://github.com/Jarred-Sumner/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.deno.js" + source="https://github.com/oven-sh/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.deno.js" /> </div> </div> @@ -574,7 +574,7 @@ export default ({ inlineCSS }) => ( bun ships with a fast SQLite3 client builtin <Bun>bun:sqlite</Bun> </li> <li> - <NodeJS href="https://github.com/Jarred-Sumner/bun/issues/158"> + <NodeJS href="https://github.com/oven-sh/bun/issues/158"> Node-API </NodeJS>{" "} bun.js implements most of{" "} @@ -684,7 +684,7 @@ export default { <br /> <br /> See{" "} - <a href="https://github.com/Jarred-Sumner/bun/tree/main/examples"> + <a href="https://github.com/oven-sh/bun/tree/main/examples"> more examples </a>{" "} and check out <a href={DOCS}>the docs</a>. If you have any questions @@ -749,7 +749,7 @@ export default { </p> <h2>How do I see the source code?</h2> <p> - Bun is on <a href="https://github.com/Jarred-Sumner/bun">GitHub</a> + Bun is on <a href="https://github.com/oven-sh/bun">GitHub</a> </p> </div> </section> diff --git a/packages/bun-landing/public/index.html b/packages/bun-landing/public/index.html index 1fe7d08aa..453104c92 100644 --- a/packages/bun-landing/public/index.html +++ b/packages/bun-landing/public/index.html @@ -947,7 +947,7 @@ img { white-space: nowrap; width: 1px; } -</style></head><body><div id="header-wrap"><header><a href="/" id="logo-link" aria-label="home"><img height="61px" src="/logo.svg" alt="Bun logo" id="logo"/><img height="31.65px" src="/Bun.png" srcSet="/Bun.png 1x, /Bun@2x.png 2x" alt="Bun" id="logo-text"/></a><nav class="Navigation"><li><a class="NavText" href="https://github.com/Jarred-Sumner/bun#Reference">Docs</a></li><li><a class="NavText" href="https://bun.sh/discord">Discord</a></li><li><a class="NavText" href="https://github.com/Jarred-Sumner/bun">GitHub</a></li></nav></header></div><div id="pitch"><main><div id="pitch-content"><h1 class="tagline">Bun is a fast all-in-one JavaScript runtime</h1><p class="subtitle">Bundle, transpile, install and run JavaScript & TypeScript projects — all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner and npm client built-in.</p><div class="InstallBox InstallBox--desktop" id="install"><div id="install-label"><div class="unselectable" id="install-label-heading">Install Bun CLI v0.1.0 (beta)</div><div class="unselectable" id="install-label-subtitle">macOS x64 & Silicon, Linux x64, Windows Subsystem for Linux</div></div><div id="code-box"><div id="curl">curl https://bun.sh/install | bash</div><button class="unselectable" id="code-box-copy" aria-label="Copy installation script">copy</button></div><a class="unselectable" id="view-source-link" target="_blank" href="https://bun.sh/install">Show script source</a></div></div><div class="Graphs Graphs--active-react"><ul class="Tabs" role="tablist"><li class="Tab"><button data-tab="react" id="tab-react" aria-controls="react-tab-content" class="TabButton" role="tab" aria-selected="true" tabindex="0">Bun.serve</button></li><li class="Tab"><button data-tab="sqlite" id="tab-sqlite" aria-controls="sqlite-tab-content" class="TabButton" role="tab" tabindex="-1">bun:sqlite</button></li><li class="Tab"><button data-tab="ffi" id="tab-ffi" aria-controls="ffi-tab-content" class="TabButton" role="tab" tabindex="-1">bun:ffi</button></li></ul><div id="active-tab" class="ActiveTab"><div role="tabpanel" tabindex="0" id="react-tab-content" aria-labelledby="tab-react" class="BarGraph BarGraph--react BarGraph--horizontal BarGraph--dark"><h2 class="BarGraph-heading">Server-side rendering React</h2><p class="BarGraph-subheading">HTTP requests per second (Linux AMD64)</p><ul style="--count:3" class="BarGraphList"><li class="BarGraphItem BarGraphItem--bun" style="--amount:48936;--max:61170"><div class="visually-hidden">bun: 48,936 requests per second</div><div style="--amount:48936;--max:61170" class="BarGraphBar" aria-hidden="true"><div style="--amount:48936;--max:61170" class="BarGraphBar-label">48,936</div></div></li><li class="BarGraphItem BarGraphItem--node" style="--amount:16288;--max:61170"><div class="visually-hidden">node: 16,288 requests per second</div><div style="--amount:16288;--max:61170" class="BarGraphBar" aria-hidden="true"><div style="--amount:16288;--max:61170" class="BarGraphBar-label">16,288</div></div></li><li class="BarGraphItem BarGraphItem--deno" style="--amount:15786;--max:61170"><div class="visually-hidden">deno: 15,786 requests per second</div><div style="--amount:15786;--max:61170" class="BarGraphBar" aria-hidden="true"><div style="--amount:15786;--max:61170" class="BarGraphBar-label">15,786</div></div></li></ul><div style="--count:3" class="BarGraphKey"><a href="https://github.com/Jarred-Sumner/bun/bench/react-hello-world.jsx" target="_blank" class="BarGraphKeyItem" aria-label="bun benchmark source"><div class="BarGraphKeyItem-label">bun</div><div class="BarGraphKeyItem-value">v0.1.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/Jarred-Sumner/bun/bench/react-hello-world.node.jsx" target="_blank" class="BarGraphKeyItem" aria-label="node benchmark source"><div class="BarGraphKeyItem-label">node</div><div class="BarGraphKeyItem-value">v18.1.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/Jarred-Sumner/bun/bench/react-hello-world.deno.jsx" target="_blank" class="BarGraphKeyItem" aria-label="deno benchmark source"><div class="BarGraphKeyItem-label">deno</div><div class="BarGraphKeyItem-value">v1.23.2</div><div class="BarGraphKeyItem-viewSource">View source</div></a></div></div><div role="tabpanel" tabindex="-1" id="sqlite-tab-content" aria-labelledby="tab-sqlite" class="BarGraph--sqlite BarGraph BarGraph--horizontal BarGraph--dark"><h2 class="BarGraph-heading">Load a huge table</h2><p class="BarGraph-subheading">Average queries per second</p><ul style="--count:3" class="BarGraphList"><li class="BarGraphItem BarGraphItem--bun" style="--amount:60.24;--max:76"><div class="visually-hidden">bun: 60.24 queries per second</div><div style="--amount:60.24;--max:76" class="BarGraphBar" aria-hidden="true"><div style="--amount:60.24;--max:76" class="BarGraphBar-label">60.24</div></div></li><li class="BarGraphItem BarGraphItem--better-sqlite3" style="--amount:23.28;--max:76"><div class="visually-hidden">better-sqlite3: 23.28 queries per second</div><div style="--amount:23.28;--max:76" class="BarGraphBar" aria-hidden="true"><div style="--amount:23.28;--max:76" class="BarGraphBar-label">23.28</div></div></li><li class="BarGraphItem BarGraphItem--deno" style="--amount:9.55;--max:76"><div class="visually-hidden">deno: 9.55 queries per second</div><div style="--amount:9.55;--max:76" class="BarGraphBar" aria-hidden="true"><div style="--amount:9.55;--max:76" class="BarGraphBar-label">9.55</div></div></li></ul><div style="--count:3" class="BarGraphKey"><a href="https://github.com/Jarred-Sumner/bun/blob/main/bench/sqlite/query.js" target="_blank" class="BarGraphKeyItem" aria-label="bun:sqlite benchmark source"><div class="BarGraphKeyItem-label">bun:sqlite</div><div class="BarGraphKeyItem-value">v0.1.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/Jarred-Sumner/bun/blob/main/bench/sqlite/query.better-sqlite3.mjs" target="_blank" class="BarGraphKeyItem" aria-label="better-sqlite3 benchmark source"><div class="BarGraphKeyItem-label">better-sqlite3</div><div class="BarGraphKeyItem-value">node v18.2.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/Jarred-Sumner/bun/blob/main/bench/sqlite/query.deno.js" target="_blank" class="BarGraphKeyItem" aria-label="deno (x/sqlite) benchmark source"><div class="BarGraphKeyItem-label">deno (x/sqlite)</div><div class="BarGraphKeyItem-value">v1.23.2</div><div class="BarGraphKeyItem-viewSource">View source</div></a></div></div><div role="tabpanel" tabindex="-1" id="ffi-tab-content" aria-labelledby="tab-ffi" class="BarGraph BarGraph--ffi BarGraph--horizontal BarGraph--dark"><h2 class="BarGraph-heading">How fast can it get?</h2><p class="BarGraph-subheading">Operations per second</p><ul style="--count:3" class="BarGraphList"><li class="BarGraphItem BarGraphItem--bun" style="--amount:115473441.00;--max:144341802"><div class="visually-hidden">bun: 115,473,441 operations per second</div><div style="--amount:115473441.00;--max:144341802" class="BarGraphBar" aria-hidden="true"><div style="--amount:115473441.00;--max:144341802" class="BarGraphBar-label">115,473,441</div></div></li><li class="BarGraphItem BarGraphItem--Node-API" style="--amount:43478261.00;--max:144341802"><div class="visually-hidden">Node-API: 43,478,261 operations per second</div><div style="--amount:43478261.00;--max:144341802" class="BarGraphBar" aria-hidden="true"><div style="--amount:43478261.00;--max:144341802" class="BarGraphBar-label">43,478,261</div></div></li><li class="BarGraphItem BarGraphItem--deno" style="--amount:2891761.00;--max:144341802"><div class="visually-hidden">deno: 2,891,761 operations per iteration</div><div style="--amount:2891761.00;--max:144341802" class="BarGraphBar" aria-hidden="true"><div style="--amount:2891761.00;--max:144341802" class="BarGraphBar-label">2,891,761</div></div></li></ul><div style="--count:3" class="BarGraphKey"><a href="https://github.com/Jarred-Sumner/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.bun.js" target="_blank" class="BarGraphKeyItem" aria-label="bun:ffi benchmark source"><div class="BarGraphKeyItem-label">bun:ffi</div><div class="BarGraphKeyItem-value">v0.1.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/Jarred-Sumner/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.napi.mjs" target="_blank" class="BarGraphKeyItem" aria-label="node (napi) benchmark source"><div class="BarGraphKeyItem-label">node (napi)</div><div class="BarGraphKeyItem-value">node v18.2.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/Jarred-Sumner/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.deno.js" target="_blank" class="BarGraphKeyItem" aria-label="deno (ffi) benchmark source"><div class="BarGraphKeyItem-label">deno (ffi)</div><div class="BarGraphKeyItem-value">v1.23.2</div><div class="BarGraphKeyItem-viewSource">View source</div></a></div></div></div></div><div class="InstallBox InstallBox--mobile" id="install"><div id="install-label"><div class="unselectable" id="install-label-heading">Install Bun CLI v0.1.0 (beta)</div><div class="unselectable" id="install-label-subtitle">macOS x64 & Silicon, Linux x64, Windows Subsystem for Linux</div></div><div id="code-box"><div id="curl">curl https://bun.sh/install | bash</div><button class="unselectable" id="code-box-copy" aria-label="Copy installation script">copy</button></div><a class="unselectable" id="view-source-link" target="_blank" href="https://bun.sh/install">Show script source</a></div></main></div><section id="explain-section"><div id="explain"><h2>Tell me more about Bun</h2><p>Bun is a modern JavaScript runtime like Node or Deno. It was built from scratch to focus on three main things:</p><ul><li>Start fast (it has the edge in mind).</li><li>New levels of performance (extending JavaScriptCore, the engine).</li><li>Being a great and complete tool (bundler, transpiler, package manager).</li></ul><p>Bun is designed as a drop-in replacement for your current JavaScript & TypeScript apps or scripts — on your local computer, server or on the edge. Bun natively implements hundreds of Node.js and Web APIs, including ~90% of<!-- --> <!-- --><a href="https://nodejs.org/api/n-api.html" target="_blank">Node-API</a> <!-- -->functions (native modules), fs, path, Buffer and more.<!-- --></p><p>The goal of Bun is to run most of the worlds JavaScript outside of browsers, bringing performance and complexity enhancements to your future infrastructure, as well as developer productivity through better, simpler tooling.</p><h2>Batteries included</h2><ul id="batteries"><li>Web APIs like<!-- --> <!-- --><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/fetch" class="Tag Tag--WebAPI">fetch</a>,<!-- --> <!-- --><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket" class="Tag Tag--WebAPI">WebSocket</a>, and<!-- --> <!-- --><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream" class="Tag Tag--WebAPI">ReadableStream</a> <!-- -->are builtin<!-- --></li><li><span target="_blank" class="Tag Tag--NodeJS">node_modules</span> bun implements Node.js' module resolution algorithm, so you can use npm packages in bun.js. ESM and CommonJS are supported, but Bun internally uses ESM.<!-- --></li><li>In bun.js, every file is transpiled.<!-- --> <!-- --><span target="_blank" class="Tag Tag--TypeScript">TypeScript</span> & <!-- --><span target="_blank" class="Tag Tag--React">JSX</span> just work.<!-- --></li><li>bun supports <!-- --><code class="">"paths"</code>,<!-- --> <!-- --><code>"jsxImportSource"</code>and more from <!-- --><span target="_blank" class="Tag Tag--TypeScript">tsconfig.json</span> files<!-- --></li><li><span target="_blank" class="Tag Tag--Bun">Bun.Transpiler</span> bun's JSX & TypeScript transpiler is available as an API in Bun.js<!-- --></li><li>use the fastest system calls available with <!-- --><span target="_blank" class="Tag Tag--Bun">Bun.write</span> <!-- -->to write, copy, pipe, send and clone files.<!-- --></li><li>bun.js automatically loads environment variables from<!-- --> <!-- --><span target="_blank" class="Tag Tag--Bun">.env</span> files. No more<!-- --> <!-- --><code class="mono">require("dotenv").load()</code></li><li>bun ships with a fast SQLite3 client builtin <!-- --><span target="_blank" class="Tag Tag--Bun">bun:sqlite</span></li><li><a target="_blank" href="https://github.com/Jarred-Sumner/bun/issues/158" class="Tag Tag--NodeJS">Node-API</a> <!-- -->bun.js implements most of<!-- --> <!-- --><a href="https://nodejs.org/api/n-api.html#node-api" target="_blank">Node-API (N-API)</a>. Many Node.js native modules just work.<!-- --></li><li><span target="_blank" class="Tag Tag--Bun">bun:ffi</span> call native code from JavaScript with bun's low-overhead foreign function interface<!-- --></li><li><span target="_blank" class="Tag Tag--NodeJS">node:fs</span> <!-- --><span target="_blank" class="Tag Tag--NodeJS">node:path</span> bun.js natively supports a growing list of Node.js core modules along with globals like Buffer and process.<!-- --></li></ul><h2>How does Bun work?</h2><p>Bun.js uses the<!-- --> <!-- --><a href="https://github.com/WebKit/WebKit/tree/main/Source/JavaScriptCore">JavaScriptCore</a> <!-- -->engine, which tends<!-- --> <!-- --><a target="blank" href="https://twitter.com/jarredsumner/status/1499225725492076544">to start</a> <!-- -->and perform a little faster than more traditional choices like V8. Bun is written in<!-- --> <!-- --><a href="https://ziglang.org/"><svg xmlns="http://www.w3.org/2000/svg" height="1.2rem" class="Zig" viewBox="0 0 400 140"><title>Zig</title><g fill="#F7A41D"><g><polygon points="46,22 28,44 19,30"></polygon><polygon points="46,22 33,33 28,44 22,44 22,95 31,95 20,100 12,117 0,117 0,22" shape-rendering="crispEdges"></polygon><polygon points="31,95 12,117 4,106"></polygon></g><g><polygon points="56,22 62,36 37,44"></polygon><polygon points="56,22 111,22 111,44 37,44 56,32" shape-rendering="crispEdges"></polygon><polygon points="116,95 97,117 90,104"></polygon><polygon points="116,95 100,104 97,117 42,117 42,95" shape-rendering="crispEdges"></polygon><polygon points="150,0 52,117 3,140 101,22"></polygon></g><g><polygon points="141,22 140,40 122,45"></polygon><polygon points="153,22 153,117 106,117 120,105 125,95 131,95 131,45 122,45 132,36 141,22" shape-rendering="crispEdges"></polygon><polygon points="125,95 130,110 106,117"></polygon></g></g><g fill="#121212"><g><polygon points="260,22 260,37 229,40 177,40 177,22" shape-rendering="crispEdges"></polygon><polygon points="260,37 207,99 207,103 176,103 229,40 229,37"></polygon><polygon points="261,99 261,117 176,117 176,103 206,99" shape-rendering="crispEdges"></polygon></g><rect x="272" y="22" shape-rendering="crispEdges" width="22" height="95"></rect><g><polygon points="394,67 394,106 376,106 376,81 360,70 346,67" shape-rendering="crispEdges"></polygon><polygon points="360,68 376,81 346,67"></polygon><path d="M394,106c-10.2,7.3-24,12-37.7,12c-29,0-51.1-20.8-51.1-48.3c0-27.3,22.5-48.1,52-48.1 +</style></head><body><div id="header-wrap"><header><a href="/" id="logo-link" aria-label="home"><img height="61px" src="/logo.svg" alt="Bun logo" id="logo"/><img height="31.65px" src="/Bun.png" srcSet="/Bun.png 1x, /Bun@2x.png 2x" alt="Bun" id="logo-text"/></a><nav class="Navigation"><li><a class="NavText" href="https://github.com/oven-sh/bun#Reference">Docs</a></li><li><a class="NavText" href="https://bun.sh/discord">Discord</a></li><li><a class="NavText" href="https://github.com/oven-sh/bun">GitHub</a></li></nav></header></div><div id="pitch"><main><div id="pitch-content"><h1 class="tagline">Bun is a fast all-in-one JavaScript runtime</h1><p class="subtitle">Bundle, transpile, install and run JavaScript & TypeScript projects — all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner and npm client built-in.</p><div class="InstallBox InstallBox--desktop" id="install"><div id="install-label"><div class="unselectable" id="install-label-heading">Install Bun CLI v0.1.0 (beta)</div><div class="unselectable" id="install-label-subtitle">macOS x64 & Silicon, Linux x64, Windows Subsystem for Linux</div></div><div id="code-box"><div id="curl">curl https://bun.sh/install | bash</div><button class="unselectable" id="code-box-copy" aria-label="Copy installation script">copy</button></div><a class="unselectable" id="view-source-link" target="_blank" href="https://bun.sh/install">Show script source</a></div></div><div class="Graphs Graphs--active-react"><ul class="Tabs" role="tablist"><li class="Tab"><button data-tab="react" id="tab-react" aria-controls="react-tab-content" class="TabButton" role="tab" aria-selected="true" tabindex="0">Bun.serve</button></li><li class="Tab"><button data-tab="sqlite" id="tab-sqlite" aria-controls="sqlite-tab-content" class="TabButton" role="tab" tabindex="-1">bun:sqlite</button></li><li class="Tab"><button data-tab="ffi" id="tab-ffi" aria-controls="ffi-tab-content" class="TabButton" role="tab" tabindex="-1">bun:ffi</button></li></ul><div id="active-tab" class="ActiveTab"><div role="tabpanel" tabindex="0" id="react-tab-content" aria-labelledby="tab-react" class="BarGraph BarGraph--react BarGraph--horizontal BarGraph--dark"><h2 class="BarGraph-heading">Server-side rendering React</h2><p class="BarGraph-subheading">HTTP requests per second (Linux AMD64)</p><ul style="--count:3" class="BarGraphList"><li class="BarGraphItem BarGraphItem--bun" style="--amount:48936;--max:61170"><div class="visually-hidden">bun: 48,936 requests per second</div><div style="--amount:48936;--max:61170" class="BarGraphBar" aria-hidden="true"><div style="--amount:48936;--max:61170" class="BarGraphBar-label">48,936</div></div></li><li class="BarGraphItem BarGraphItem--node" style="--amount:16288;--max:61170"><div class="visually-hidden">node: 16,288 requests per second</div><div style="--amount:16288;--max:61170" class="BarGraphBar" aria-hidden="true"><div style="--amount:16288;--max:61170" class="BarGraphBar-label">16,288</div></div></li><li class="BarGraphItem BarGraphItem--deno" style="--amount:15786;--max:61170"><div class="visually-hidden">deno: 15,786 requests per second</div><div style="--amount:15786;--max:61170" class="BarGraphBar" aria-hidden="true"><div style="--amount:15786;--max:61170" class="BarGraphBar-label">15,786</div></div></li></ul><div style="--count:3" class="BarGraphKey"><a href="https://github.com/oven-sh/bun/bench/react-hello-world.jsx" target="_blank" class="BarGraphKeyItem" aria-label="bun benchmark source"><div class="BarGraphKeyItem-label">bun</div><div class="BarGraphKeyItem-value">v0.1.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/oven-sh/bun/bench/react-hello-world.node.jsx" target="_blank" class="BarGraphKeyItem" aria-label="node benchmark source"><div class="BarGraphKeyItem-label">node</div><div class="BarGraphKeyItem-value">v18.1.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/oven-sh/bun/bench/react-hello-world.deno.jsx" target="_blank" class="BarGraphKeyItem" aria-label="deno benchmark source"><div class="BarGraphKeyItem-label">deno</div><div class="BarGraphKeyItem-value">v1.23.2</div><div class="BarGraphKeyItem-viewSource">View source</div></a></div></div><div role="tabpanel" tabindex="-1" id="sqlite-tab-content" aria-labelledby="tab-sqlite" class="BarGraph--sqlite BarGraph BarGraph--horizontal BarGraph--dark"><h2 class="BarGraph-heading">Load a huge table</h2><p class="BarGraph-subheading">Average queries per second</p><ul style="--count:3" class="BarGraphList"><li class="BarGraphItem BarGraphItem--bun" style="--amount:60.24;--max:76"><div class="visually-hidden">bun: 60.24 queries per second</div><div style="--amount:60.24;--max:76" class="BarGraphBar" aria-hidden="true"><div style="--amount:60.24;--max:76" class="BarGraphBar-label">60.24</div></div></li><li class="BarGraphItem BarGraphItem--better-sqlite3" style="--amount:23.28;--max:76"><div class="visually-hidden">better-sqlite3: 23.28 queries per second</div><div style="--amount:23.28;--max:76" class="BarGraphBar" aria-hidden="true"><div style="--amount:23.28;--max:76" class="BarGraphBar-label">23.28</div></div></li><li class="BarGraphItem BarGraphItem--deno" style="--amount:9.55;--max:76"><div class="visually-hidden">deno: 9.55 queries per second</div><div style="--amount:9.55;--max:76" class="BarGraphBar" aria-hidden="true"><div style="--amount:9.55;--max:76" class="BarGraphBar-label">9.55</div></div></li></ul><div style="--count:3" class="BarGraphKey"><a href="https://github.com/oven-sh/bun/blob/main/bench/sqlite/query.js" target="_blank" class="BarGraphKeyItem" aria-label="bun:sqlite benchmark source"><div class="BarGraphKeyItem-label">bun:sqlite</div><div class="BarGraphKeyItem-value">v0.1.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/oven-sh/bun/blob/main/bench/sqlite/query.better-sqlite3.mjs" target="_blank" class="BarGraphKeyItem" aria-label="better-sqlite3 benchmark source"><div class="BarGraphKeyItem-label">better-sqlite3</div><div class="BarGraphKeyItem-value">node v18.2.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/oven-sh/bun/blob/main/bench/sqlite/query.deno.js" target="_blank" class="BarGraphKeyItem" aria-label="deno (x/sqlite) benchmark source"><div class="BarGraphKeyItem-label">deno (x/sqlite)</div><div class="BarGraphKeyItem-value">v1.23.2</div><div class="BarGraphKeyItem-viewSource">View source</div></a></div></div><div role="tabpanel" tabindex="-1" id="ffi-tab-content" aria-labelledby="tab-ffi" class="BarGraph BarGraph--ffi BarGraph--horizontal BarGraph--dark"><h2 class="BarGraph-heading">How fast can it get?</h2><p class="BarGraph-subheading">Operations per second</p><ul style="--count:3" class="BarGraphList"><li class="BarGraphItem BarGraphItem--bun" style="--amount:115473441.00;--max:144341802"><div class="visually-hidden">bun: 115,473,441 operations per second</div><div style="--amount:115473441.00;--max:144341802" class="BarGraphBar" aria-hidden="true"><div style="--amount:115473441.00;--max:144341802" class="BarGraphBar-label">115,473,441</div></div></li><li class="BarGraphItem BarGraphItem--Node-API" style="--amount:43478261.00;--max:144341802"><div class="visually-hidden">Node-API: 43,478,261 operations per second</div><div style="--amount:43478261.00;--max:144341802" class="BarGraphBar" aria-hidden="true"><div style="--amount:43478261.00;--max:144341802" class="BarGraphBar-label">43,478,261</div></div></li><li class="BarGraphItem BarGraphItem--deno" style="--amount:2891761.00;--max:144341802"><div class="visually-hidden">deno: 2,891,761 operations per iteration</div><div style="--amount:2891761.00;--max:144341802" class="BarGraphBar" aria-hidden="true"><div style="--amount:2891761.00;--max:144341802" class="BarGraphBar-label">2,891,761</div></div></li></ul><div style="--count:3" class="BarGraphKey"><a href="https://github.com/oven-sh/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.bun.js" target="_blank" class="BarGraphKeyItem" aria-label="bun:ffi benchmark source"><div class="BarGraphKeyItem-label">bun:ffi</div><div class="BarGraphKeyItem-value">v0.1.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/oven-sh/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.napi.mjs" target="_blank" class="BarGraphKeyItem" aria-label="node (napi) benchmark source"><div class="BarGraphKeyItem-label">node (napi)</div><div class="BarGraphKeyItem-value">node v18.2.0</div><div class="BarGraphKeyItem-viewSource">View source</div></a><a href="https://github.com/oven-sh/bun/blob/f5527c976e20cb60b977cc1b21df079f3e388cc9/bench/ffi/plus100/add3.deno.js" target="_blank" class="BarGraphKeyItem" aria-label="deno (ffi) benchmark source"><div class="BarGraphKeyItem-label">deno (ffi)</div><div class="BarGraphKeyItem-value">v1.23.2</div><div class="BarGraphKeyItem-viewSource">View source</div></a></div></div></div></div><div class="InstallBox InstallBox--mobile" id="install"><div id="install-label"><div class="unselectable" id="install-label-heading">Install Bun CLI v0.1.0 (beta)</div><div class="unselectable" id="install-label-subtitle">macOS x64 & Silicon, Linux x64, Windows Subsystem for Linux</div></div><div id="code-box"><div id="curl">curl https://bun.sh/install | bash</div><button class="unselectable" id="code-box-copy" aria-label="Copy installation script">copy</button></div><a class="unselectable" id="view-source-link" target="_blank" href="https://bun.sh/install">Show script source</a></div></main></div><section id="explain-section"><div id="explain"><h2>Tell me more about Bun</h2><p>Bun is a modern JavaScript runtime like Node or Deno. It was built from scratch to focus on three main things:</p><ul><li>Start fast (it has the edge in mind).</li><li>New levels of performance (extending JavaScriptCore, the engine).</li><li>Being a great and complete tool (bundler, transpiler, package manager).</li></ul><p>Bun is designed as a drop-in replacement for your current JavaScript & TypeScript apps or scripts — on your local computer, server or on the edge. Bun natively implements hundreds of Node.js and Web APIs, including ~90% of<!-- --> <!-- --><a href="https://nodejs.org/api/n-api.html" target="_blank">Node-API</a> <!-- -->functions (native modules), fs, path, Buffer and more.<!-- --></p><p>The goal of Bun is to run most of the worlds JavaScript outside of browsers, bringing performance and complexity enhancements to your future infrastructure, as well as developer productivity through better, simpler tooling.</p><h2>Batteries included</h2><ul id="batteries"><li>Web APIs like<!-- --> <!-- --><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/fetch" class="Tag Tag--WebAPI">fetch</a>,<!-- --> <!-- --><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket" class="Tag Tag--WebAPI">WebSocket</a>, and<!-- --> <!-- --><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream" class="Tag Tag--WebAPI">ReadableStream</a> <!-- -->are builtin<!-- --></li><li><span target="_blank" class="Tag Tag--NodeJS">node_modules</span> bun implements Node.js' module resolution algorithm, so you can use npm packages in bun.js. ESM and CommonJS are supported, but Bun internally uses ESM.<!-- --></li><li>In bun.js, every file is transpiled.<!-- --> <!-- --><span target="_blank" class="Tag Tag--TypeScript">TypeScript</span> & <!-- --><span target="_blank" class="Tag Tag--React">JSX</span> just work.<!-- --></li><li>bun supports <!-- --><code class="">"paths"</code>,<!-- --> <!-- --><code>"jsxImportSource"</code>and more from <!-- --><span target="_blank" class="Tag Tag--TypeScript">tsconfig.json</span> files<!-- --></li><li><span target="_blank" class="Tag Tag--Bun">Bun.Transpiler</span> bun's JSX & TypeScript transpiler is available as an API in Bun.js<!-- --></li><li>use the fastest system calls available with <!-- --><span target="_blank" class="Tag Tag--Bun">Bun.write</span> <!-- -->to write, copy, pipe, send and clone files.<!-- --></li><li>bun.js automatically loads environment variables from<!-- --> <!-- --><span target="_blank" class="Tag Tag--Bun">.env</span> files. No more<!-- --> <!-- --><code class="mono">require("dotenv").load()</code></li><li>bun ships with a fast SQLite3 client builtin <!-- --><span target="_blank" class="Tag Tag--Bun">bun:sqlite</span></li><li><a target="_blank" href="https://github.com/oven-sh/bun/issues/158" class="Tag Tag--NodeJS">Node-API</a> <!-- -->bun.js implements most of<!-- --> <!-- --><a href="https://nodejs.org/api/n-api.html#node-api" target="_blank">Node-API (N-API)</a>. Many Node.js native modules just work.<!-- --></li><li><span target="_blank" class="Tag Tag--Bun">bun:ffi</span> call native code from JavaScript with bun's low-overhead foreign function interface<!-- --></li><li><span target="_blank" class="Tag Tag--NodeJS">node:fs</span> <!-- --><span target="_blank" class="Tag Tag--NodeJS">node:path</span> bun.js natively supports a growing list of Node.js core modules along with globals like Buffer and process.<!-- --></li></ul><h2>How does Bun work?</h2><p>Bun.js uses the<!-- --> <!-- --><a href="https://github.com/WebKit/WebKit/tree/main/Source/JavaScriptCore">JavaScriptCore</a> <!-- -->engine, which tends<!-- --> <!-- --><a target="blank" href="https://twitter.com/jarredsumner/status/1499225725492076544">to start</a> <!-- -->and perform a little faster than more traditional choices like V8. Bun is written in<!-- --> <!-- --><a href="https://ziglang.org/"><svg xmlns="http://www.w3.org/2000/svg" height="1.2rem" class="Zig" viewBox="0 0 400 140"><title>Zig</title><g fill="#F7A41D"><g><polygon points="46,22 28,44 19,30"></polygon><polygon points="46,22 33,33 28,44 22,44 22,95 31,95 20,100 12,117 0,117 0,22" shape-rendering="crispEdges"></polygon><polygon points="31,95 12,117 4,106"></polygon></g><g><polygon points="56,22 62,36 37,44"></polygon><polygon points="56,22 111,22 111,44 37,44 56,32" shape-rendering="crispEdges"></polygon><polygon points="116,95 97,117 90,104"></polygon><polygon points="116,95 100,104 97,117 42,117 42,95" shape-rendering="crispEdges"></polygon><polygon points="150,0 52,117 3,140 101,22"></polygon></g><g><polygon points="141,22 140,40 122,45"></polygon><polygon points="153,22 153,117 106,117 120,105 125,95 131,95 131,45 122,45 132,36 141,22" shape-rendering="crispEdges"></polygon><polygon points="125,95 130,110 106,117"></polygon></g></g><g fill="#121212"><g><polygon points="260,22 260,37 229,40 177,40 177,22" shape-rendering="crispEdges"></polygon><polygon points="260,37 207,99 207,103 176,103 229,40 229,37"></polygon><polygon points="261,99 261,117 176,117 176,103 206,99" shape-rendering="crispEdges"></polygon></g><rect x="272" y="22" shape-rendering="crispEdges" width="22" height="95"></rect><g><polygon points="394,67 394,106 376,106 376,81 360,70 346,67" shape-rendering="crispEdges"></polygon><polygon points="360,68 376,81 346,67"></polygon><path d="M394,106c-10.2,7.3-24,12-37.7,12c-29,0-51.1-20.8-51.1-48.3c0-27.3,22.5-48.1,52-48.1 c14.3,0,29.2,5.5,38.9,14l-13,15c-7.1-6.3-16.8-10-25.9-10c-17,0-30.2,12.9-30.2,29.5c0,16.8,13.3,29.6,30.3,29.6 c5.7,0,12.8-2.3,19-5.5L394,106z"></path></g></g></svg></a>, a low-level programming language with manual memory management.<!-- --><br/><br/>Most of Bun is written from scratch including the JSX/TypeScript transpiler, npm client, bundler, SQLite client, HTTP client, WebSocket client and more.<!-- --></p><h2>Why is Bun fast?</h2><p>An enormous amount of time spent profiling, benchmarking and optimizing things. The answer is different for every part of Bun, but one general theme:<!-- --> <!-- --><a href="https://ziglang.org/"><svg xmlns="http://www.w3.org/2000/svg" height="1.2rem" class="Zig" viewBox="0 0 400 140"><title>Zig</title><g fill="#F7A41D"><g><polygon points="46,22 28,44 19,30"></polygon><polygon points="46,22 33,33 28,44 22,44 22,95 31,95 20,100 12,117 0,117 0,22" shape-rendering="crispEdges"></polygon><polygon points="31,95 12,117 4,106"></polygon></g><g><polygon points="56,22 62,36 37,44"></polygon><polygon points="56,22 111,22 111,44 37,44 56,32" shape-rendering="crispEdges"></polygon><polygon points="116,95 97,117 90,104"></polygon><polygon points="116,95 100,104 97,117 42,117 42,95" shape-rendering="crispEdges"></polygon><polygon points="150,0 52,117 3,140 101,22"></polygon></g><g><polygon points="141,22 140,40 122,45"></polygon><polygon points="153,22 153,117 106,117 120,105 125,95 131,95 131,45 122,45 132,36 141,22" shape-rendering="crispEdges"></polygon><polygon points="125,95 130,110 106,117"></polygon></g></g><g fill="#121212"><g><polygon points="260,22 260,37 229,40 177,40 177,22" shape-rendering="crispEdges"></polygon><polygon points="260,37 207,99 207,103 176,103 229,40 229,37"></polygon><polygon points="261,99 261,117 176,117 176,103 206,99" shape-rendering="crispEdges"></polygon></g><rect x="272" y="22" shape-rendering="crispEdges" width="22" height="95"></rect><g><polygon points="394,67 394,106 376,106 376,81 360,70 346,67" shape-rendering="crispEdges"></polygon><polygon points="360,68 376,81 346,67"></polygon><path d="M394,106c-10.2,7.3-24,12-37.7,12c-29,0-51.1-20.8-51.1-48.3c0-27.3,22.5-48.1,52-48.1 c14.3,0,29.2,5.5,38.9,14l-13,15c-7.1-6.3-16.8-10-25.9-10c-17,0-30.2,12.9-30.2,29.5c0,16.8,13.3,29.6,30.3,29.6 @@ -963,7 +963,7 @@ img { <span class="line"></span> <span class="line"><span style="color: #F8F8F2"> },</span></span> <span class="line"></span> -<span class="line"><span style="color: #F8F8F2">};</span></span></code></pre></div><p>Run it with bun:</p><div class="CodeBlock"><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #F8F8F2">bun run http.js</span></span></code></pre></div><p>Then open<!-- --> <!-- --><a target="_blank" href="http://localhost:3000">http://localhost:3000</a> <!-- -->in your browser<!-- --><br/><br/>See<!-- --> <!-- --><a href="https://github.com/Jarred-Sumner/bun/tree/main/examples">more examples</a> <!-- -->and check out <!-- --><a href="https://github.com/Jarred-Sumner/bun#Reference">the docs</a>. If you have any questions or want help, join<!-- --> <!-- --><a href="https://bun.sh/discord">Bun's Discord</a></p><h2>Bun CLI</h2><div class="Group"><span target="_blank" class="Tag Tag--Command">bun run</span><p>The same command for running JavaScript & TypeScript files with bun's JavaScript runtime also runs package.json<!-- --> <!-- --><code class="mono">"scripts"</code>.<!-- --></p><strong>Replace <!-- --><code class="mono">npm run</code> with<!-- --> <!-- --><code class="mono">bun run</code> and save 160ms on every run.<!-- --></strong><br/><div>bun runs package.json scripts<!-- --> <!-- --><a href="https://twitter.com/jarredsumner/status/1454218996983623685" target="_blank" class="PerformanceClaim">30x faster than <!-- --><code class="mono">npm run</code></a></div> <!-- --></div><div class="Group"><span target="_blank" class="Tag Tag--Command">bun install</span><p>bun install is an npm-compatible package manager. You probably will be surprised by how much faster copying files can get.</p><strong>Replace <!-- --><code class="mono">yarn</code> with<!-- --> <!-- --><code class="mono">bun install</code> and get 20x faster package installs.<!-- --></strong><br/><div>bun install uses the fastest system calls available to copy files.</div></div><div class="Group"><span target="_blank" class="Tag Tag--Command">bun wiptest</span><p>A Jest-like test runner for JavaScript & TypeScript projects builtin to bun</p><div class="Label"><a href="https://twitter.com/jarredsumner/status/1542824445810642946" target="_blank" class="PerformanceClaim">You've never seen a JavaScript test runner this fast</a> <!-- -->(or incomplete)<!-- --></div></div><h2>What is the license?</h2><p>MIT License, excluding dependencies which have various licenses.</p><h2>How do I see the source code?</h2><p>Bun is on <!-- --><a href="https://github.com/Jarred-Sumner/bun">GitHub</a></p></div></section><section id="explain-section"><div id="explain"></div></section><script> +<span class="line"><span style="color: #F8F8F2">};</span></span></code></pre></div><p>Run it with bun:</p><div class="CodeBlock"><pre class="shiki" style="background-color: #282A36"><code><span class="line"><span style="color: #F8F8F2">bun run http.js</span></span></code></pre></div><p>Then open<!-- --> <!-- --><a target="_blank" href="http://localhost:3000">http://localhost:3000</a> <!-- -->in your browser<!-- --><br/><br/>See<!-- --> <!-- --><a href="https://github.com/oven-sh/bun/tree/main/examples">more examples</a> <!-- -->and check out <!-- --><a href="https://github.com/oven-sh/bun#Reference">the docs</a>. If you have any questions or want help, join<!-- --> <!-- --><a href="https://bun.sh/discord">Bun's Discord</a></p><h2>Bun CLI</h2><div class="Group"><span target="_blank" class="Tag Tag--Command">bun run</span><p>The same command for running JavaScript & TypeScript files with bun's JavaScript runtime also runs package.json<!-- --> <!-- --><code class="mono">"scripts"</code>.<!-- --></p><strong>Replace <!-- --><code class="mono">npm run</code> with<!-- --> <!-- --><code class="mono">bun run</code> and save 160ms on every run.<!-- --></strong><br/><div>bun runs package.json scripts<!-- --> <!-- --><a href="https://twitter.com/jarredsumner/status/1454218996983623685" target="_blank" class="PerformanceClaim">30x faster than <!-- --><code class="mono">npm run</code></a></div> <!-- --></div><div class="Group"><span target="_blank" class="Tag Tag--Command">bun install</span><p>bun install is an npm-compatible package manager. You probably will be surprised by how much faster copying files can get.</p><strong>Replace <!-- --><code class="mono">yarn</code> with<!-- --> <!-- --><code class="mono">bun install</code> and get 20x faster package installs.<!-- --></strong><br/><div>bun install uses the fastest system calls available to copy files.</div></div><div class="Group"><span target="_blank" class="Tag Tag--Command">bun wiptest</span><p>A Jest-like test runner for JavaScript & TypeScript projects builtin to bun</p><div class="Label"><a href="https://twitter.com/jarredsumner/status/1542824445810642946" target="_blank" class="PerformanceClaim">You've never seen a JavaScript test runner this fast</a> <!-- -->(or incomplete)<!-- --></div></div><h2>What is the license?</h2><p>MIT License, excluding dependencies which have various licenses.</p><h2>How do I see the source code?</h2><p>Bun is on <!-- --><a href="https://github.com/oven-sh/bun">GitHub</a></p></div></section><section id="explain-section"><div id="explain"></div></section><script> [...document.querySelectorAll(".TabButton")].map(el => { diff --git a/packages/bun-types/package.json b/packages/bun-types/package.json index c98586107..4845bbfb8 100644 --- a/packages/bun-types/package.json +++ b/packages/bun-types/package.json @@ -12,6 +12,6 @@ "bun.js", "types" ], - "repository": "https://github.com/Jarred-Sumner/bun", + "repository": "https://github.com/oven-sh/bun", "homepage": "https://bun.sh" } diff --git a/src/bun.js/api/FFI.h b/src/bun.js/api/FFI.h index b0a754a01..84a2dad83 100644 --- a/src/bun.js/api/FFI.h +++ b/src/bun.js/api/FFI.h @@ -1,6 +1,6 @@ // This file is part of Bun! // You can find the original source: -// https://github.com/Jarred-Sumner/bun/blob/main/src/bun.js/api/FFI.h#L2 +// https://github.com/oven-sh/bun/blob/main/src/bun.js/api/FFI.h#L2 // // clang-format off // This file is only compatible with 64 bit CPUs diff --git a/src/cli/install.sh b/src/cli/install.sh index 269513295..5d2577d72 100644 --- a/src/cli/install.sh +++ b/src/cli/install.sh @@ -30,7 +30,7 @@ if test -t 1; then fi if ! command -v unzip >/dev/null; then - echo -e "\n${Red}error${Color_Off}: unzip is required to install bun (see: https://github.com/Jarred-Sumner/bun#unzip-is-required)." 1>&2 + echo -e "\n${Red}error${Color_Off}: unzip is required to install bun (see: https://github.com/oven-sh/bun#unzip-is-required)." 1>&2 exit 1 fi diff --git a/src/cli/upgrade_command.zig b/src/cli/upgrade_command.zig index aafbd7e18..a64985bbb 100644 --- a/src/cli/upgrade_command.zig +++ b/src/cli/upgrade_command.zig @@ -583,7 +583,7 @@ pub const UpgradeCommand = struct { Output.printStartEnd(ctx.start_time, std.time.nanoTimestamp()); - Output.prettyErrorln("<r> Upgraded.\n\n<b><green>Welcome to bun v{s}!<r>\n\n Report any bugs:\n https://github.com/Jarred-Sumner/bun/issues\n\n What's new:\n https://github.com/Jarred-Sumner/bun/releases/tag/{s}<r>", .{ version_name, version.tag }); + Output.prettyErrorln("<r> Upgraded.\n\n<b><green>Welcome to bun v{s}!<r>\n\n Report any bugs:\n https://github.com/oven-sh/bun/issues\n\n What's new:\n https://github.com/oven-sh/bun/releases/tag/{s}<r>", .{ version_name, version.tag }); Output.flush(); return; } diff --git a/src/env_loader.zig b/src/env_loader.zig index 41bb7e804..afd7fa9ff 100644 --- a/src/env_loader.zig +++ b/src/env_loader.zig @@ -298,7 +298,7 @@ pub const Lexer = struct { // we don't need to do special parsing on process-level environment variable values // if they're quoted, we should keep them quoted. - // https://github.com/Jarred-Sumner/bun/issues/40 + // https://github.com/oven-sh/bun/issues/40 if (comptime is_process_env) { const current = this.current; // TODO: remove this loop diff --git a/src/install/install.zig b/src/install/install.zig index fb53b8ecc..68b9c422a 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -186,7 +186,7 @@ const NetworkTask = struct { } // We must use a less restrictive Acccept header value - // https://github.com/Jarred-Sumner/bun/issues/341 + // https://github.com/oven-sh/bun/issues/341 // https://www.jfrog.com/jira/browse/RTFACT-18398 const accept_header_value = "application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"; diff --git a/src/js_parser.zig b/src/js_parser.zig index 23a945bbe..34e4b3a9f 100644 --- a/src/js_parser.zig +++ b/src/js_parser.zig @@ -16044,7 +16044,7 @@ fn NewParser_( return; }, .s_class => |class| { - // TODO: https://github.com/Jarred-Sumner/bun/issues/51 + // TODO: https://github.com/oven-sh/bun/issues/51 _ = p.visitClass(s2.loc, &class.class); if (p.is_control_flow_dead) @@ -17175,7 +17175,7 @@ fn NewParser_( stmts.append(closure) catch unreachable; } - // TODO: https://github.com/Jarred-Sumner/bun/issues/51 + // TODO: https://github.com/oven-sh/bun/issues/51 fn lowerClass( p: *P, stmtorexpr: js_ast.StmtOrExpr, diff --git a/test/apps/bun-install-utf8.sh b/test/apps/bun-install-utf8.sh index e7eaab93f..ca6858513 100644 --- a/test/apps/bun-install-utf8.sh +++ b/test/apps/bun-install-utf8.sh @@ -8,7 +8,7 @@ DIR=$(mktemp -d -t bun-ADD) cd "$DIR" -# https://github.com/Jarred-Sumner/bun/issues/115 +# https://github.com/oven-sh/bun/issues/115 echo '{ "author": "Arnaud Barré (https://github.com/ArnaudBarre)" }' >package.json $BUN_BIN add react diff --git a/test/apps/bun-run-check.sh b/test/apps/bun-run-check.sh index 096d80385..a904959e9 100644 --- a/test/apps/bun-run-check.sh +++ b/test/apps/bun-run-check.sh @@ -4,7 +4,7 @@ set -euo pipefail (killall -9 "$(basename "$BUN_BIN")" || echo "") >/dev/null 2>&1 -# https://github.com/Jarred-Sumner/bun/issues/40 +# https://github.com/oven-sh/bun/issues/40 # Define a function (details aren't important) fn() { :; } # The important bit: export the function @@ -22,7 +22,7 @@ if (($?)); then exit 1 fi -# https://github.com/Jarred-Sumner/bun/issues/53 +# https://github.com/oven-sh/bun/issues/53 rm -f "$DIR/bun-run-out.expected.txt" "$DIR/bun-run-out.txt" >/dev/null 2>&1 $BUN_BIN run --silent argv -- foo bar baz > "$DIR/bun-run-out.txt" diff --git a/test/bun.js/ffi.test.fixture.callback.c b/test/bun.js/ffi.test.fixture.callback.c index d48ef6753..1a43a098c 100644 --- a/test/bun.js/ffi.test.fixture.callback.c +++ b/test/bun.js/ffi.test.fixture.callback.c @@ -1,7 +1,7 @@ #define IS_CALLBACK 1 // This file is part of Bun! // You can find the original source: -// https://github.com/Jarred-Sumner/bun/blob/main/src/bun.js/api/FFI.h#L2 +// https://github.com/oven-sh/bun/blob/main/src/bun.js/api/FFI.h#L2 // // clang-format off // This file is only compatible with 64 bit CPUs diff --git a/test/bun.js/ffi.test.fixture.receiver.c b/test/bun.js/ffi.test.fixture.receiver.c index 5bb51bda5..a6f647253 100644 --- a/test/bun.js/ffi.test.fixture.receiver.c +++ b/test/bun.js/ffi.test.fixture.receiver.c @@ -2,7 +2,7 @@ #define USES_FLOAT 1 // This file is part of Bun! // You can find the original source: -// https://github.com/Jarred-Sumner/bun/blob/main/src/bun.js/api/FFI.h#L2 +// https://github.com/oven-sh/bun/blob/main/src/bun.js/api/FFI.h#L2 // // clang-format off // This file is only compatible with 64 bit CPUs diff --git a/test/bun.js/url.test.ts b/test/bun.js/url.test.ts index 37ea2008b..87291a09c 100644 --- a/test/bun.js/url.test.ts +++ b/test/bun.js/url.test.ts @@ -9,11 +9,11 @@ describe("url", () => { expect( Bun.inspect( new URL( - "https://github.com/Jarred-Sumner/bun/issues/135?hello%20i%20have%20spaces%20thank%20you%20good%20night" + "https://github.com/oven-sh/bun/issues/135?hello%20i%20have%20spaces%20thank%20you%20good%20night" ) ) ).toBe( - "https://github.com/Jarred-Sumner/bun/issues/135?hello%20i%20have%20spaces%20thank%20you%20good%20night" + "https://github.com/oven-sh/bun/issues/135?hello%20i%20have%20spaces%20thank%20you%20good%20night" ); }); it("works", () => { diff --git a/types/bun/bun.d.ts b/types/bun/bun.d.ts index bb59e1c15..60e81212f 100644 --- a/types/bun/bun.d.ts +++ b/types/bun/bun.d.ts @@ -992,7 +992,7 @@ declare module "bun" { * * I don't know how to make this something Chrome or Safari can read. * - * If you have any ideas, please file an issue https://github.com/Jarred-Sumner/bun + * If you have any ideas, please file an issue https://github.com/oven-sh/bun */ interface HeapSnapshot { /** "2" */ diff --git a/types/bun/bundle.ts b/types/bun/bundle.ts index 0f4ea34bf..8ad66d974 100644 --- a/types/bun/bundle.ts +++ b/types/bun/bundle.ts @@ -47,7 +47,7 @@ const packageJSON = { files: ["types.d.ts"], private: false, keywords: ["bun", "bun.js", "types"], - repository: "https://github.com/Jarred-Sumner/bun", + repository: "https://github.com/oven-sh/bun", homepage: "https://bun.sh", }; diff --git a/types/bun/header.txt b/types/bun/header.txt index 5edb3390d..66bcde3a9 100644 --- a/types/bun/header.txt +++ b/types/bun/header.txt @@ -1,5 +1,5 @@ // Type definitions for bun 0.0 -// Project: https://github.com/Jarred-Sumner/bun +// Project: https://github.com/oven-sh/bun // Definitions by: Jarred Sumner <https://github.com/Jarred-Sumner> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// <reference no-default-lib="true" /> diff --git a/types/bun/index.d.ts b/types/bun/index.d.ts index a223f6a0c..2540d2639 100644 --- a/types/bun/index.d.ts +++ b/types/bun/index.d.ts @@ -1,5 +1,5 @@ // Type definitions for bun 0.0 -// Project: https://github.com/Jarred-Sumner/bun +// Project: https://github.com/oven-sh/bun // Definitions by: Jarred Sumner <https://github.com/Jarred-Sumner> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// <reference no-default-lib="true" /> |