---
title: "Bun v1.2.1"
description: "Bun v1.2.1 fixes 32 bugs and adds S3 storage class support, X25519 key generation in crypto.generateKeyPair, Node's --zero-fill-buffers flag, indented inline snapshots in bun test, and a bunfig option to disable minification for HTML imports."
url: "https://swe.quest/articles/bun-v1-2-1-aab3e8d9e0004536"
canonical: "https://bun.com/blog/bun-v1.2.1"
source: "Bun"
published: "2025-01-27"
difficulty: "medium"
kind: "Release"
reading_minutes: 7
tags: ["javascript","runtimes","memory-management","zig"]
---

# Bun v1.2.1

A post on [Bun](https://swe.quest/sources/bun.md), published 2025-01-27, 7 min read, Release. Original: [https://bun.com/blog/bun-v1.2.1](https://bun.com/blog/bun-v1.2.1)

## Summary

Bun v1.2.1 fixes 32 bugs and adds S3 storage class support, X25519 key generation in crypto.generateKeyPair, Node's --zero-fill-buffers flag, indented inline snapshots in bun test, and a bunfig option to disable minification for HTML imports. The most technical change fixes GC memory accounting: WebKit reports a ref-counted string's cost as its byte length divided by its reference count, so Bun's Zig bindings, which briefly held an extra reference, under-reported string memory (a 64 KB file read reported as 32 KB). A new single-step createUTF8ForJS pattern avoids that extra reference. Other fixes cover fs.Stats and bigint fstat parity with Node, EINTR retries in fs reads and writes, a child\_process spawn race, Worker reliability, and memory leaks in Bun.serve() and Bun.pathToFileURL caused by refcount mistakes.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)
- [Zig](https://swe.quest/tags/zig.md) (Languages)

## Prerequisites

- Node.js APIs ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- reference counting and GC basics ([easy posts on Memory management](https://swe.quest/tags/memory-management.md?difficulty=easy))

## Keywords

Bun, JavaScriptCore, WebKit, X25519, Amazon S3, node:fs

## Related posts

- [Bun v1.1.7](https://swe.quest/articles/bun-v1-1-7-443b16215b4eb538.md): Bun · 2024-05-03 · Medium · 7 min read · JavaScript, Runtimes & VMs, Debugging
  Bun v1.1.7 fixes 28 bugs and adds glob patterns in package.json workspaces (via Bun.Glob), asymmetric matcher support in expect.extend's this.equals, and a working bunx --version.
- [Bun v1.2.2](https://swe.quest/articles/bun-v1-2-2-430cc9d4f8048e2e.md): Bun · 2025-02-01 · Medium · 8 min read · JavaScript, Runtimes & VMs, Memory management
  Bun v1.2.2 fixes 38 bugs and cuts idle JavaScript memory usage by 10–30% (28% for Next.js, 11% for Elysia).
- [Bun v0.6.9](https://swe.quest/articles/bun-v0-6-9-0635261452349fca.md): Bun · 2023-06-13 · Medium · 3 min read · JavaScript, Runtimes & VMs, Memory management
  Bun v0.6.9 focuses on memory reductions: zero-copy string Response bodies in Bun.serve() and Response (60 MB vs Deno's 425 MB and Node's 1414 MB after 1000 responses of a 12 MB string), 50% less memory for cold bun install, and fixed leaks when importing modules.
- [Bun v1.1.17](https://swe.quest/articles/bun-v1-1-17-36691cca78554f0f.md): Bun · 2024-06-25 · Medium · 3 min read · JavaScript, Runtimes & VMs, Performance engineering, Zig
  Bun v1.1.17 fixes four bugs and makes two small macOS performance improvements.
- [Bun v1.1.16](https://swe.quest/articles/bun-v1-1-16-73af18d20e38e0ab.md): Bun · 2024-06-23 · Medium · 6 min read · JavaScript, Runtimes & VMs, Testing, Build systems
  Bun v1.1.16 fixes 41 bugs and adds lcov output for \`bun test --coverage\`, configurable in bunfig.toml.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
