---
title: "Bun v1.0.21"
description: "Bun v1.0.21 fixes 33 bugs and focuses on memory: blob.arrayBuffer() now uses copy-on-write virtual memory mappings for blobs of 8 MB or more (1 MB with --smol), so 100 copies of a 128 MB blob use 192 MB instead of 12.9 GB. bun:sqlite now reports SQLite's memory to the garbage collector, cutting usage 4x for 100,000 prepared statements, and throws SQLiteError with extended error codes and messages."
url: "https://swe.quest/articles/bun-v1-0-21-862b3088d30db391"
canonical: "https://bun.com/blog/bun-v1.0.21"
source: "Bun"
published: "2024-01-02"
difficulty: "medium"
kind: "Release"
reading_minutes: 10
tags: ["javascript","runtimes","memory-management","sqlite"]
---

# Bun v1.0.21

A post on [Bun](https://swe.quest/sources/bun.md), published 2024-01-02, 10 min read, Release. Original: [https://bun.com/blog/bun-v1.0.21](https://bun.com/blog/bun-v1.0.21)

## Summary

Bun v1.0.21 fixes 33 bugs and focuses on memory: blob.arrayBuffer() now uses copy-on-write virtual memory mappings for blobs of 8 MB or more (1 MB with --smol), so 100 copies of a 128 MB blob use 192 MB instead of 12.9 GB. bun:sqlite now reports SQLite's memory to the garbage collector, cutting usage 4x for 100,000 prepared statements, and throws SQLiteError with extended error codes and messages. The release also adds console.table(), Blob support in Bun.CryptoHasher and a toBeObject matcher. It fixes path-string memory leaks in Bun.file, Bun.write and node:fs errors, plus several TLS and WebSocket crashes.

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)
- [SQLite](https://swe.quest/tags/sqlite.md) (Data & databases)

## Prerequisites

- JavaScript runtimes ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Blob and ArrayBuffer APIs ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))

## Keywords

Bun, bun:sqlite, copy-on-write, console.table, Bun.CryptoHasher, FormData

## Related posts

- [Bun v1.0.26](https://swe.quest/articles/bun-v1-0-26-3ad49b25623332b4.md): Bun · 2024-02-03 · Medium · 6 min read · JavaScript, Runtimes & VMs, SQLite, Testing
  Bun v1.0.26 fixes 30 bugs and adds multi-statement queries to bun:sqlite via db.run() and db.exec(), though not query or prepare. bun --watch now reliably closes file descriptors on reload, using close\_range(2) on Linux and POSIX\_SPAWN\_CLOEXEC\_DEFAULT on macOS, and resets signal handlers.
- [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 v1.2.1](https://swe.quest/articles/bun-v1-2-1-aab3e8d9e0004536.md): Bun · 2025-01-27 · Medium · 7 min read · JavaScript, Runtimes & VMs, Memory management, Zig
  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.
- [Bun v1.0.20](https://swe.quest/articles/bun-v1-0-20-4c5d451d499e769b.md): Bun · 2023-12-24 · Medium · 6 min read · JavaScript, Runtimes & VMs, Memory management, Performance engineering
  Bun v1.0.20 cuts memory usage in node:fs async operations by avoiding redundant cross-thread string clones.
- [Bun v1.0.19](https://swe.quest/articles/bun-v1-0-19-97f3853badb73f03.md): Bun · 2023-12-22 · Medium · 9 min read · JavaScript, Runtimes & VMs, Performance engineering, Testing, TypeScript
  Bun v1.0.19 fixes 26 bugs and replaces bun-types with @types/bun, which re-exports the real @types/node to avoid type conflicts.

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)
