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 · 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
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
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 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 · 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
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
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 · 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
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
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
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
In the next version of Bun `bun.lock` is the new lockfile in `bun install`
/tmp/nexty
❯ rm -rf bun.lockb

/tmp/nexty
❯ bun install --save-text-lockfile # text-based lockfile
bun install v1.1.39 (b55ca429)

Checked 35 installs across 60 packages (no changes) [9.00ms]

/tmp/nexty
❯ cat bun.lock -l json --no-paging
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: bun.lock
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ {
   2   │   "lockfileVersion": 0,
   3   │   "workspaces": {
   4   │     "": {
   5   │       "dependencies": {
   6   │         "next": "^15.1.0"
   7   │       },
   8   │       "devDependencies": {
   9   │         "@types/bun": "latest"
  10   │       }
  11   │     }
  12   │
5777
Reposted by Bun
Aaron @aaronrussell.dev · 27/11/2024
I love the fact that with @bun.sh my moderately sized test suite runs in 300ms ⚡😎
1101
Bun @bun.sh · 26/11/2024
Bun v1.1.37 - Fixes 62 bugs (addressing 109 👍) - Realtime debuggerless error reporting in VSCode - Fixed memory leak in Prisma - Fixed shadcn & sv crash on Windows - Better CSS parser errors - Fixed regression from v1.1.35 Thanks to 14 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.1.37
Fixes 62 bugs (addressing 109 👍). Realtime error reporting & test runner in VSCode, self-referencing `import` & `require`, package.json `config` environment variables, improved CSS parser errors, fixe...
3533
Bun @bun.sh · 19/11/2024
Bun v1.1.35 - Fixes 46 bugs (addressing 570 👍) - Native support for Musl & Alpine Linux - 6 MB smaller binary - JUnit test reporter - `preload` option for `Worker` - `http://console.group` - `net` compatibility improvements Thanks to 16 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.1.35
Fixes 46 bugs (addressing 570 👍). Musl LibC support, JUnit XML test output, 6 MB binary size reduction, `Worker` `preload` option, faster `fs.readFile` for small files, deep equality support for `Head...
0849
Bun @bun.sh · 09/11/2024
what’s stopping you from switching to bun
Bunny bun bun bun bun
6321
Reposted by Bun
Eric Fredine @fredine.bsky.social · 07/11/2024
Update: they tried bun and realized it was much faster. So we ended up using it.
0161
Reposted by Bun
Andrew 🇵🇸 @src.rip · 04/11/2024
New video alert! I made a video on using Bun with Phoenix. I'm extolling the virtues of Bun a lot, and I think there's just a lot of benefits to using it for everything. youtu.be/axa9lrzbrSQ This is probably going to have at least one follow up at some point with some more asset handling tips...
youtu.be
Phoenix, ESBuild, and Bun
YouTube video by Andrew Stewart
3257
Bun @bun.sh · 08/11/2024
😭
2405
Reposted by Bun
Jarred Sumner @jarredsumner.com · 08/11/2024
Bun v1.2’s dev server makes react server components hot reload speed a rounding error
got it to work! <:awesomebun:1136571782472683571> 

I was testing weekly for a while (my last test was Oct 18) and it would crash

this is nuts, I am seeing **0ms** and **1ms** reload speeds, *what the bun* kind of magic is that
2813
Reposted by Bun
Jarred Sumner @jarredsumner.com · 07/11/2024
Bun v1.1.35 ships tonight
2564
Bun @bun.sh · 04/11/2024
> Bun has definitely lived up to the hype ❤️
I now use it as at least a package manager on every project; So install command will be `bun i` but commands to run the application will still use node `node dist/server.js` or npm `npm run dev`. This has saved us 1000's of dollars in CI bills because installing modules has gone from like 20s to 2s on some projects. Infact it's so fast that it's slower to use CircleCI's node_modules caching than it is to just do a fresh install.
Use it as a server runtime in one project, this has been a near seamless experience with minor incompatibilities early on that have now been fixed (Some GraphQL packages would throw runtime errors).
Use it as a test runner on the projects that use it as a server runtime. Seamless experience and insanley fast.
Bun has definitely lived up to the hype, you can feel the performance difference regardless of what any benchmark shows. I feel like some of the latest ones trying to prove they're as fast or faster than Bun are purposely lieing. I.E there's a benchmark between encore.dev with bun and bun directly, and they say encore is faster. This I strongly suspect isn't correct as they're comparing encore.dev's rust runtime which utilizes multiple threads against a default configuration of bun which wouldn't.

If they change their benchmark on github to use https://bun.sh/guides/http/cluster which is only available on linux I have a feeling Bun would shred encore.dev
1344
Reposted by Bun
Jarred Sumner @jarredsumner.com · 03/11/2024
In the next version of Bun bun build gets a fast native plugin API Using the same .mdx library to bundle 6 .mdx files: - Bun's native api: 13.2ms - Bun's js api: 18ms (1.36x slower) - Rolldown: 33.5ms (2.5x slower) - esbuild: 36.1ms (2.7x slower)
❯ hyperfine  "bun bun-onBeforeParse.js # New" "bun bun-onLoad.js" "bun rolldown-plugin.js" "bun esbuild-onLoad.js" "node rolldown-plugin.js" "node esbuild-onLoad.js" --warmup=100
Benchmark 1: bun bun-onBeforeParse.js # New
  Time (mean ± σ):      13.2 ms ±   0.4 ms    [User: 11.7 ms, System: 6.5 ms]
  Range (min … max):    12.5 ms …  15.5 ms    178 runs

Benchmark 2: bun bun-onLoad.js
  Time (mean ± σ):      18.0 ms ±   0.4 ms    [User: 18.2 ms, System: 8.6 ms]
  Range (min … max):    17.2 ms …  20.4 ms    137 runs

Benchmark 3: bun rolldown-plugin.js
  Time (mean ± σ):      33.5 ms ±   0.4 ms    [User: 39.2 ms, System: 32.3 ms]
  Range (min … max):    32.6 ms …  35.3 ms    79 runs

Benchmark 4: bun esbuild-onLoad.js
  Time (mean ± σ):      36.1 ms ±   0.6 ms    [User: 28.1 ms, System: 7.3 ms]
  Range (min … max):    34.8 ms …  37.8 ms    75 runs

Benchmark 5: node rolldown-plugin.js
  Time (mean ± σ):      55.3 ms ±   0.7 ms    [User: 57.0 ms, System: 30.9 ms]
  Range (min … max):
1834
Bun @bun.sh · 02/11/2024
Bun v1.1.34 - Fixes 64 bugs (addressing 62 👍) - Bun.randomUUIDv7() - Long-running processes use less memory - ReadableStream & HTTP/1.1 server spec-related bugfixes - `bun install` redacts secrets in error messages Thanks to 14 contributors! bun.sh/blog/bun-v1....
bun.sh
Bun v1.1.34
Fixes 64 bugs (addressing 62 👍). `Bun.randomUUIDv7`, reduced memory usage for long-running processes, `napi_type_tag_object` and `napi_check_object_type_tag`, redacted secrets from config logs, `Reada...
1354