# Xo 0.22 release notes


## Introduction

Xo 0.22 builds Windows programs with Xo's own backend and no C
toolchain, cuts the size of LLVM builds to between a half and a third,
speeds up the edit loop, makes HTTP and TLS cheaper, and fixes a heap
overrun every native program had at startup since 0.21's development.

## Fixes

- The runtime's root context registry used a byte offset as a slot
  index and wrote about 2 KB past a 296-byte runtime record at startup
  on every OS. It was silent on macOS and Linux and a crash at startup
  on Windows.

## Ports

- Windows: Xo's own x86-64 backend builds `windows/amd64`
  (`--backend=amd64`) with its own COFF writer and PE linker, a
  checked-in import table, manifest and version resources, and no C
  runtime: no clang, lld-link, or Windows SDK
  ([decision 0254](https://github.com/xo-lang/xo/blob/main/knowledgebase/decisions/0254-amd64-backend.md)).
  The default backend on x86-64 hosts stays LLVM for now
  ([decision 0270](https://github.com/xo-lang/xo/blob/main/knowledgebase/decisions/0270-amd64-native-default.md)).

## Compiler

- Smaller binaries: `xo`'s code went from 40.18 MB to 31.78 MB built
  natively and from 89.82 MB to 32.59 MB built with LLVM; the Windows
  `xo.exe` from 160 MB to 63.65 MB.
- A faster edit loop: packed and lazily decoded cache entries, parallel
  borrow inference, and a front end cache for function bodies
  ([decision 0220](https://github.com/xo-lang/xo/blob/main/knowledgebase/decisions/0220-per-module-parallel-compilation.md)).
  Rebuilding `xo` after a one-constant edit went from about 9.5 s to
  about 6 to 8 s.

## Runtime and standard library

- TLS is 8.2% and HTTP/2 9.2% cheaper per request on arm64, with
  cheaper JSON encoding and HTTP/1 headers.
- Faster allocation while other threads run.
- Task stacks are kept at their peak size: 97% fewer page faults in
  connection bursts.

