Sign in

Bun

@bun.sh
3.6K followers 1 following 52 posts

Bun is a fast, all-in-one toolkit for installing, bundling, running and testing JavaScript & TypeScript. To install Bun: ``` curl bun.sh/install | bash -s ``` bun.sh

PostsRepliesMedia
Bun @bun.sh · 29/08/2025
30 days until Bun v1.3
3561
Bun @bun.sh · 22/06/2025
wow maybe ur right
020
Bun @bun.sh · 28/05/2025
Bun v1.2.15
2672
Bun @bun.sh · 28/05/2025
Bun v1.2.15 - Fixes 11 issues (addressing 261 👍) - `bun audit` scans for vulnerabilities - `bun pm view <pkg>` - `bun init` adds a Cursor rule - `bun ./index.html` gets "Automatic workspace folders" edit files in browser - Fixes for vm & worker_threads bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.15
Fixes 11 issues (addressing 261 👍). bun audit scans dependencies for security vulnerabilities, bun pm view shows package metadata from npm. bun init adds a Cursor rule to use Bun instead of Node.js/Vi...
3383
Bun @bun.sh · 22/05/2025
Bun v1.2.14 - Fixes 39 issues (addressing 179 👍) - Catalogs in bun install simplify sharing dependency versions in monorepos - Fixes HTTPS proxy issue impacting OpenAI Codex - zstd + fetch - Several Node compatibility bugfixes Thanks to 13 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.14
Fixes 39 issues (addressing 179 👍). Adds support for catalogs in bun install, --react flag for bun init, improved HTTP routing with method-specific routes, better TypeScript default module settings, f...
1250
Bun @bun.sh · 05/05/2025
Bun v1.2.12
Stream browser console. log to terminal
Memory
272 MB
OLD
150 мв
NEW
Hot reloads with lucide-react (307 reloads)
[browser)
Hello!
Node.js
Compatibility
98.4% of timers tests pass
node,js
3683
Bun @bun.sh · 04/05/2025
Bun v1.2.12 - Echo browser console logs to terminal - Reduced memory usage for frontend hmr with Bun.serve() - Node.js compatibility fixes for `timers`, `vm`, `net`, and `http` - bugfix for global postinstalls impacting Claude Code thx 10 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.12
Stream browser console logs to your terminal, dev server uses less memory. Node.js compatibility improvements for timers, vm, net, http, and bugfixes for TextDecoder, hot reloading reliability bugfixe...
0333
Bun @bun.sh · 05/04/2025
github.com/WebKit/WebKi...
github.com
[JSC] Add MultiGetByVal FTL node by Constellation · Pull Request #43579 · WebKit/WebKit
ed70771 [JSC] Add MultiGetByVal FTL node https://bugs.webkit.org/show_bug.cgi?id=291030 rdar://148552535 Reviewed by Yijia Huang. This patch adds new FTL node MultiGetByVal. In DFG / FTL, we atte...
080
Bun @bun.sh · 05/04/2025
In the next version of Bun & Safari Polymorphic array access gets up to 8x faster, thanks to @yusukesuzuki.bsky.social
mport { run, bench } from "mitata";

// Assuming the vectors are of the same length
function cosineDistance(a, b) {
  let dotProduct = 0;
  let magA = 0;
  let magB = 0;
  for (let i = 0; i < a.length; i++) {
    dotProduct += a[i] * b[i];
    magA += a[i] * a[i];
    magB += b[i] * b[i];
  }
  return 1 - dotProduct / (Math.sqrt(magA) * Math.sqrt(magB));
}

// Generate random data for testing
const dimensions = 1536; // Adjust dimensions as needed
const array1 = Array.from({ length: dimensions }, () => Math.random() * 100);
const array2 = Array.from({ length: dimensions }, () => Math.random() * 100);
const floatArray1 = new Float32Array(array1);
const floatArray2 = new Float32Array(array2);

bench("Array", () => {
  cosineDistance(array1, array2);
});

bench("Float32Array", () => {
  cosineDistance(floatArray1, floatArray2);
});

await run();
bun-latest array.mjs # New
clk: ~3.94 GHz
cpu: Apple M3 Max
runtime: bun 1.2.9 (arm64-darwin)

benchmark                   avg (min … max)
-------------------------------------------
Array                          1.07 µs/iter   1.07 µs  ▇▃ ▄█▂
                        (1.06 µs … 1.13 µs)   1.09 µs ▄██▆███▇▅▄▄▄▂▂▂▁▁▁▁▂▂
Float32Array                   1.64 µs/iter   1.64 µs                   █
                        (1.46 µs … 1.68 µs)   1.67 µs ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██▃▁
bun-1.2.8 array.mjs # Prev
clk: ~3.87 GHz
cpu: Apple M3 Max
runtime: bun 1.2.8 (arm64-darwin)

benchmark                   avg (min … max)
-------------------------------------------
Array                          1.07 µs/iter   1.07 µs  ▄  █▂
                        (1.06 µs … 1.11 µs)   1.10 µs ▅█▆▆██▄▄▅▂▁▁▁▂▂▁▁▁▁▁▁
Float32Array                  13.52 µs/iter  13.50 µs  █   █
                      (13.41 µs … 14.02 µs)  13.59 µs ██▁▁▁███▁██▁▁▁▁▁▁▁▁██
node array.mjs # Node, for comparison
clk: ~3.94 GHz
cpu: Apple M3 Max
runtime: node 23.10.0 (arm64-darwin)

benchmark                   avg (min … max)
-------------------------------------------
Array
1353
Bun @bun.sh · 31/03/2025
Thanks to 10 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.8
Fixes 18 bugs (addressing 18 👍). napi improvements make node-sdl 100x faster. Headers.get() is 2x faster. Several node:http bugfixes. node:fs improvements. `bun install --frozen-lockfile` now works wi...
0100
Bun @bun.sh · 31/03/2025
Bun v1.2.8 - Fixes 18 bugs (addressing 18 👍) - napi perf improvement for integers - 2x faster headers.get() - node:http & node:fs bugfixes - `bun install --frozen-lockfile` + `overrides` fix - `bun pack` directory-specific ignores Full release notes below
1582
Bun @bun.sh · 27/03/2025
bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.7
Fixes 35 bugs (addressing 219 👍). Bun.CookieMap is a Map-like API for getting & setting cookies. Bun's TypeScript type declarations have been rewritten to eliminate conflicts with Node.js and DOM type...
050
Bun @bun.sh · 27/03/2025
Bun v1.2.7 - Fixes 35 bugs (addressing 219 👍) - Builtin request.cookies.set & get in Bun.serve() routes - Fixed TypeScript type definitions conflicts with `@types/node` & libdom - Bugfixes for node:http, node:vm Thanks to 13 contributors! Full release notes below
2583
Bun @bun.sh · 26/03/2025
2332
Bun @bun.sh · 25/03/2025
Bun v1.2.6 - Fixes 74 bugs (addressing 36 👍) - node:crypto gets faster & more Node.js compatible - Faster fastify & express - `timeout` in Bun.spawn - Dev Server stability fixes - Bun.SQL unix domain sockets Thanks to 23 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.6
Fixes 74 bugs (addressing 36 👍). Faster, more compatible node:crypto. `timeout` option in Bun.spawn. Support for `module.children` in `node:module`. Connect to PostgreSQL via unix sockets with `Bun.SQ...
1566
Bun @bun.sh · 11/03/2025
Bun v1.2.5 - Fixes 75 bugs (addressing 162 👍) +69 passing tests from Node.js - Frontend Dev Server fixes, CSS Modules support - Full rewrite of N-API (napi addons) - Faster Sign, Verify, Hash, Hmac from node:crypto Thanks to 25 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.5
Fixes 75 bugs (addressing 162 👍), and adds +69 passing Node.js tests. Improvements to the frontend dev server, CSS modules support, a full rewrite of Node-API, faster `Sign`, `Verify`, `Hash`, `Hmac` ...
0413
Reposted by Bun
denis @shutock.com · 02/03/2025
built a @turbo.build template with a shared @tailwindcss.com v4 config, @biomejs.dev for linting & formatting, and powered by @bun.sh Check it out: github.com/shutock/twur...
github.com
GitHub - shutock/twurbun: A Turborepo template with a shared Tailwind v4 config, Biome for linting & formatting, and Bun for blazing-fast package management.
A Turborepo template with a shared Tailwind v4 config, Biome for linting & formatting, and Bun for blazing-fast package management. - shutock/twurbun
0101
Bun @bun.sh · 26/02/2025
Bun v1.2.4 - Frontend dev server stability improvements - Codesign compiled executables on macOS - Up to 60% faster `bun build` on macOS - Node.js compatibility fixes - Faster array.includes - Many bugfixes Thanks to 17 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.4
Up to 60% faster Bun.build on macOS, codesigning support for single-file executables on macOS, dev server stability improvements, fixes a regression from v1.2.3 affecting Hono, fixes up/down buttons i...
1824
Bun @bun.sh · 22/02/2025
Bun v1.2.3 - Fixes 128 bugs (addressing 349 👍) - Incredibly fast frontend dev server with hot reloading - Builtin routes in Bun.serve - Many Bun.SQL fixes - Wasm gets faster - Node compatibility improvements for napi & Buffer Thanks to 23 contributors! bun.sh/blog/release...
bun.sh
Bun v1.2.3
Fixes 128 bugs (addressing 349 👍). Bun gets a full-featured frontend development toolchain with incredibly fast hot reloading and bundling. Built-in routing for Bun.serve() makes it simpler to build w...
28413
Reposted by Bun
Dave Vasilevsky @vasilevsky.ca · 19/02/2025
And done! Try exporting your Paper docs with my new tool: www.npmjs.com/package/drop...
npmjs.com
dropbox-paper-export-2020plus
## A command-line tool to export your Dropbox Paper docs. Latest version: 1.0.1, last published: 10 hours ago. Start using dropbox-paper-export-2020plus in your project by running `npm i dropbox-paper...
141
Bun @bun.sh · 11/02/2025
The above is a TailwindCSS + shadcn/ui Twitter frontend clone demo app. This is hot reloading css & js/ts/tsx, running a tailwindcss plugin, transpiling jsx/tsx, websocket hmr happening live as you type.
0110
Bun @bun.sh · 11/02/2025
In the next version of Bun Bun.serve() gets builtin support for hot reloading frontend applications.
31329
Reposted by Bun
Jack Herrington @jherr.dev · 04/02/2025
@bun.sh is gunning for @vite.dev! youtu.be/NvitRPQqaSs Now it can serve HTML files right off the command line, and it even supports API routes!
youtu.be
Is Bun The End Of Vite?
YouTube video by Jack Herrington
2183
Bun @bun.sh · 01/02/2025
Bun v1.2.2 - Fixes 38 bugs (addressing 129 👍) - JavaScript idle memory usage reduced by 10–30% - Fixes v1.2.1 regression impacting `vite build` - Node compatibility fixes - Reliability improvements to Bun.SQL and Bun.S3Client Thanks to 12 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.2
Fixes 38 bugs (addressing 129 👍). JavaScript idle memory usage drops by 10–30%. Fixes regression impacting vite build. Reliability improvements to Bun.SQL, Bun.S3Client, Bun's CSS parser. Node.js comp...
2696
Bun @bun.sh · 27/01/2025
Bun v.1.2.1 - Fixes 32 bugs - S3Client gets `storageClass` support - X25519 support in node:crypto - Node.js compatibility improvements for node:fs & node:child_process. fs.stat uses less memory. - Several memory leak fixes Thanks to 16 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.2.1
Fixes 32 bugs. S3 storage class support, X25519 support in crypto.generateKeyPair. fs.stat uses less memory. node:fs, node:child_process, and node:process compatibility improvements. CSS parser bugfix...
1351
Bun @bun.sh · 26/01/2025
If we don’t already do this then that’s a bug. I’m pretty sure we already do this though
030
Bun @bun.sh · 26/01/2025
bun dler youtu.be/Y5JrsqBt7sI?...
youtu.be
Bun's FINALLY A Bundler (and much much more)
YouTube video by Theo - t3․gg
2410
Bun @bun.sh · 22/01/2025
Introducing Bun 1.2 bun.sh/blog/bun-v1.2
bun.sh
Bun 1.2
Built-in Postgres client with Bun.sql, built-in S3 object support with Bun.s3, a new text-based lockfile: bun.lock, Express is 3x faster, and a major update on Node.js compatibility.
111420
Bun @bun.sh · 20/01/2025
Bun v1.2 in 17 hours youtu.be/uSzffuqfJQk?...
youtu.be
Bun 1.2
YouTube video by Bun
2587
Bun @bun.sh · 20/01/2025
it was fixed, and then msw switched to using an undocumented internal node module that we haven't implemented support for
020
Bun @bun.sh · 17/01/2025
many such cases
Fucking hell, bun is so fast
1
It's out of this world fast
What kind of black magic is this haha
I got expo working with bun
Literally 10min of work lol
1230
Bun @bun.sh · 17/01/2025
Bun v1.1.45 - Fixes 13 bugs (addressing 50 👍) - X509Certificate, diffieHellman, getCipherInfo in 'crypto' - 82% of Node.js' "stream" tests pass (several remaining test Node internals) - Bugfixes to fs.mkdir and more Thanks to 5 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.1.45
Fixes 13 bugs (addressing 50 👍) 82% of the 'streams' module tests from Node.js' test suite now pass in Bun. node:crypto now implements diffieHellman, getCipherInfo, and X509Certificate. The checkServe...
1310
Reposted by Bun
Nick The Sick @nickthesick.com · 17/01/2025
Wow, @bun.sh is adding a really useful set of features for its standard lib. I was able to write a s3 upload client with ZERO dependencies when running in bun!
A simple S3 upload client written using only Bun APIs, zero dependencies and very simple code that does what you would expect
0191
Bun @bun.sh · 17/01/2025
You can read more about HTML imports released in Bun v1.1.44 bun.sh/docs/bundler...
bun.sh
Fullstack Dev Server – Bundler | Bun Docs
Serve your frontend and backend from the same app with Bun's dev server.
060
Bun @bun.sh · 17/01/2025
This `bun-use-static` package is a small function that calls `reload` on the underlying Bun.serve() used by node:http This depends on `--experimental-html` flag to work in Bun v1.1.44 ``` bun --experimental-html <file> ``` github.com/jarred-sumne...
github.com
GitHub - Jarred-Sumner/bun-use-static
Contribute to Jarred-Sumner/bun-use-static development by creating an account on GitHub.
170
Bun @bun.sh · 17/01/2025
Add a React frontend to your Express app in 7 lines of code with Bun
mport useStatic from "bun-use-static";
import app from "./my-express-app";
import mySinglePageApp from "./dashboard.html";

// Get the node:http Server from calling app.listen()
const server = app.listen(3000, () => {
  console.log(`Example app listening on port 3000`);
});

useStatic(server, {
  "/dashboard": mySinglePageApp,
});
2665
Bun @bun.sh · 17/01/2025
Bun v1.1.44 - Fixes 43 bugs - 90% of Node's tests for the `dns` module pass in Bun - Bundle & serve frontend apps in Bun.serve() - `bunx --no-install <pkg> [...]` - Bugfixes to Bun's S3 client, HTMLRewriter, node:fs and more Thanks to 21 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.1.44
Fixes 43 bugs. > 90% of the 'dns' module tests from Node.js' test suite now pass in Bun. You can now build frontend applications on-demand in Bun.serve(). Adds xxHash support to Bun.hash(). Adds suppo...
0253
Bun @bun.sh · 08/01/2025
Bun v1.1.43 - 1st-class S3 support - HTML bundler - V8 heap snapshots - All but 1 of Node.js' "zlib" tests pass - 100% of Node.js[ "path" module tests pass - Many reliability & Node.js compatibility improvements Thanks to 22 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.1.43
Bun v1.1.43 introduces 1st-class S3 support, HTML bundling, bun install --filter, V8 heap snapshots, bun install --lockfile-only, bun add --peer, 100% of `node:path` module Node.js test pass, 98% of `...
0645
Bun @bun.sh · 29/12/2024
The API is designed to work very similarly to Response, Blob, and Bun.file(path), so you can read from S3 just like from the local filesystem or fetch().
0140
Bun @bun.sh · 29/12/2024
When you pass `new Response` an S3 file, it turns into a redirect to a presigned expiring URL so that you don't waste your server's resources downloading to S3 and sending to the user
1160
Bun @bun.sh · 29/12/2024
In the next version of Bun Bun gets first-class support for S3. Upload, download, stream, and presign with 0 dependencies
import { s3, file, write } from "bun";

const svg = s3("logo.svg", {
  accessKeyId: process.env.S3_ACCESS_KEY,
  secretAccessKey: process.env.S3_SECRET_KEY,
  endpoint: process.env.S3_ENDPOINT,
  bucket: process.env.S3_BUCKET,
});

// Upload a local file to S3
await write(svg, file("./logo.svg"));

// Download from S3 as text 
const text = await svg.text();
// or .json(), .bytes(), etc

// Presign a URL
const url = svg.presign();
console.log(url);
51108
Bun @bun.sh · 20/12/2024
Bun v1.1.41 - Fixes 12 bugs (addressing 196 👍) - JSDOM & happy-dom fixes - Customize the icon on Windows in single-file executables - bun install --omit=dev - `"use strict";` is now CommonJS - expect().toHaveBeenCalledOnce() Thanks to 6 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.1.41
Fixes 12 bugs (addressing 196 👍). JSDOM & happy-dom work more reliably due to node:vm compatibility improvements. Single-file executables on Windows now support custom icons and hiding the console. th...
0342
Bun @bun.sh · 18/12/2024
Bun v1.1.40 - Fixes 14 bugs - Adds `install.saveTextLockfile` to bunfig.toml (on by default in Bun v1.2) - Fixes a regression in process.on - Fixes a napi issue impacting DuckDB - More reliable git dependencies in bun install Thanks to 4 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.1.40
Fixes 14 bugs. Adds `install.saveTextLockfile` option in bunfig.toml to make the text lockfile format the default. Fixes a bug in package-lock.json migration when manually changing npm URLs to git URL...
0615
Bun @bun.sh · 17/12/2024
Bun v1.1.39 - Fixes 61 bugs, addressing 99 👍 - bun.lock – bun's new text lockfile - 30% faster cached bun install - Lots of Node compatibility improvements - `bun build` Rust plugins - fetch() request body stream - more!! Thanks to 20 contributors bun.sh/blog/bun-v1....
bun.sh
Bun v1.1.39
Fixes 61 bugs (addressing 99 👍). bun.lock is bun's new text-based lockfile. Cached bun install gets 30% faster. fetch() request body streams. 100% of string_decoder, punycode and querystring Node.js t...
1495
Bun @bun.sh · 16/12/2024
1240
Bun @bun.sh · 15/12/2024
yeah
030
Reposted by Bun
Gavin Morgan @gavmor.bsky.social · 08/12/2024
Wow, I am super enamored of @bun.sh's `--hot` flag for running my @benchristel/taste #Typescript tests! Sub-second reruns on every keystroke? This is the way to write code without bugs.
071
Bun @bun.sh · 11/12/2024
Bun will continue to support the binary `bun.lockb` for awhile. `bun.lock` will be the default for `bun install` after Bun v1.2. To try the new text-based lockfile before then, use the `--save-text-lockfile` flag and upgrade to --canary.
0100
Bun @bun.sh · 11/12/2024
Merge conflicts are inevitable, and that's why we put each package and it's dependencies on a single line. Fewer lines means easier merge conflicts.
1150