---
title: "Bun v0.2.2"
description: "Bun v0.2.2 adds a TCP/TLS socket API for clients and servers."
url: "https://swe.quest/articles/bun-v0-2-2-758afa2db2ef7788"
canonical: "https://bun.com/blog/bun-v0.2.2"
source: "Bun"
published: "2022-10-27"
difficulty: "medium"
kind: "Release"
reading_minutes: 5
tags: ["javascript","runtimes","networking"]
---

# Bun v0.2.2

A post on [Bun](https://swe.quest/sources/bun.md), published 2022-10-27, 5 min read, Release. Original: [https://bun.com/blog/bun-v0.2.2](https://bun.com/blog/bun-v0.2.2)

## Summary

Bun v0.2.2 adds a TCP/TLS socket API for clients and servers. It defines callbacks once per server rather than per socket, and a TCP echo server runs 24% faster than in Node. The release also implements WebCrypto, which lets libraries such as jose run, along with fs.createReadStream and better Node.js stream support, Bun.peek for synchronously reading already-settled promises, and an official Homebrew tap. Bug fixes include a transpiler fix for default-plus-named imports of builtin modules, now rewritten to import.meta.require, and several segfault fixes.

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)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)

## 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, WebCrypto, TCP, TLS, Bun.peek, Node.js streams, Homebrew, jose

## Related posts

- [Bun v1.2.6](https://swe.quest/articles/bun-v1-2-6-f72795d94f6eaf67.md): Bun · 2025-03-25 · Medium · 11 min read · JavaScript, Runtimes & VMs, Cryptography, Performance engineering
  Bun v1.2.6 fixes 74 bugs and rewrites more of node:crypto (Cipheriv/Decipheriv, DiffieHellman, ECDH, randomBytes) in native code on BoringSSL, with benchmarks showing AES-256-GCM going from ~1.15 ms to ~3.5 µs per iteration and scrypt from 365 ms to 47 ms. node:http compatibility work makes Express 9% and Fastify 5.4% faster.
- [Bun v1.2.5](https://swe.quest/articles/bun-v1-2-5-0384b8a49ec32571.md): Bun · 2025-03-11 · Medium · 19 min read · JavaScript, Runtimes & VMs, Frontend
  Bun v1.2.5 fixes 75 bugs, adds 69 passing Node.js tests, and nearly rewrites its Node-API implementation, which now passes 98% of Node's js-native-api suite.
- [Bun v1.4.1](https://swe.quest/articles/bun-v1-4-1-d28e00ae252842cf.md): Bun · 2026-09-04 · Medium · 38 min read · JavaScript, Runtimes & VMs, Performance engineering, Build systems, Networking
  Bun v1.4.1 fixes 202 issues and ships runtime, install and bundler improvements.
- [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.
- [Bun v0.3.0](https://swe.quest/articles/bun-v0-3-0-ce34b4df06ef614a.md): Bun · 2022-12-07 · Medium · 8 min read · JavaScript, Runtimes & VMs, Performance engineering
  Bun v0.3.0 focuses on stability and Node.js/Web API compatibility, cutting memory use 3-5x under load by scheduling garbage collection in coordination with the event loop and speeding up TextEncoder.encodeInto() 3x via simdutf.

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)
