---
title: "Bun v1.0.4"
description: "Bun v1.0.4 fixes 62 bugs, adds server.requestIP() for retrieving a request's socket IP (not proxy headers), and supports esbuild-compatible virtual modules in runtime plugins via builder.module()."
url: "https://swe.quest/articles/bun-v1-0-4-607f4ffff0bda429"
canonical: "https://bun.com/blog/bun-v1.0.4"
source: "Bun"
published: "2023-10-03"
difficulty: "medium"
kind: "Release"
reading_minutes: 7
tags: ["javascript","runtimes","memory-management"]
---

# Bun v1.0.4

A post on [Bun](https://swe.quest/sources/bun.md), published 2023-10-03, 7 min read, Release. Original: [https://bun.com/blog/bun-v1.0.4](https://bun.com/blog/bun-v1.0.4)

## Summary

Bun v1.0.4 fixes 62 bugs, adds server.requestIP() for retrieving a request's socket IP (not proxy headers), and supports esbuild-compatible virtual modules in runtime plugins via builder.module(). Bun.serve() now reports manually managed per-request memory to JavaScriptCore's GC, cutting memory by up to ~50% (e.g. Fastify 267 MB to 114 MB after 800k requests). The default fetch() and bun install timeout rises from 30 seconds to 5 minutes between data chunks. The lockfile now stores workspace member versions, and fixes cover getaddrinfo fallback across all results, 3xx fetch hangs, and Node.js compatibility.

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)

## Prerequisites

- JavaScript runtimes ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Node.js APIs ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Bun, Bun.serve, JavaScriptCore, bun install, Bun.plugin, getaddrinfo

## Related posts

- [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 v0.8.1](https://swe.quest/articles/bun-v0-8-1-ecd25e5146563167.md): Bun · 2023-08-26 · Medium · 6 min read · Runtimes & VMs, JavaScript, Performance engineering, Memory management
  Bun v0.8.1 adds unix domain socket support to Bun.serve() via a new \`unix\` option and fixes a 2.8x request-body throughput regression from v0.8.0 (about 38.6k to 110k req/s).
- [Bun v0.2.0](https://swe.quest/articles/bun-v0-2-0-c0c3775be874dec7.md): Bun · 2022-10-13 · Medium · 5 min read · JavaScript, Runtimes & VMs, Performance engineering
  Bun v0.2.0 adds \`bun --hot\` for server-side hot reloading that preserves global state and in-flight HTTP requests, \`Bun.spawn\`/\`Bun.spawnSync\` for process spawning with flexible stdin sources and ReadableStream output, and streaming request bodies in \`Bun.serve\`.
- [Bun v1.1.10](https://swe.quest/articles/bun-v1-1-10-7013099545edcaeb.md): Bun · 2024-05-24 · Medium · 9 min read · JavaScript, Runtimes & VMs, Memory management, Performance engineering
  Bun v1.1.10 fixes 20 bugs, makes uncached bun install on Windows about 2x faster, and cuts fetch() memory use by up to 2.8x by freeing response bodies sooner.
- [Bun v1.1.13](https://swe.quest/articles/bun-v1-1-13-5296aa9cfb98f4b1.md): Bun · 2024-06-05 · Medium · 13 min read · JavaScript, Runtimes & VMs, Testing, Networking, Build systems
  Bun v1.1.13 fixes 97 bugs and adds \`eval: true\` for \`node:worker\_threads\`, \`URL.createObjectURL\` for spawning TypeScript workers from Blobs, custom failure messages in \`expect\`, and five new \`bun:test\` matchers.

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)
