I built FAF using Zig on Bun for Claude

Published: (December 23, 2025 at 05:59 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

⏺ Yes, that title is real. Let me explain.
FAF = Foundational AI‑context Format (IANA registered)
Zig = The language Bun is built with
Bun = The fast JS runtime
Claude = Anthropic’s AI

The Problem

AI coding tools have amnesia. Every session starts from zero. You explain your stack, your conventions, your architecture—gone.

The Solution

A file format that persists. .faf – your project’s DNA for any AI.

I Built Two CLIs

bun-sticky-faf (TypeScript)

bun add -g bun-sticky-faf
bun-sticky score

Zero deps. 328 tests. Pure Bun APIs.

bun-sticky-zig (Zig)

77 KB binary. 31 µs scoring. 55 million ops/sec.
Built in Bun’s own language. 220× faster than TypeScript.

Why Bun?

Bun’s philosophy aligns with FAF: fast, lean, no bloat. Zig (Bun’s core language) takes it further—freestanding WASM, no hidden allocations, raw speed.

The Numbers

MetricValue
Scoring speed31 µs
Ops/sec55 million
Binary size77 KB
vs TS baseline220× faster

Why This Stack?

Bun is fast. Zig is faster. Claude needs context. FAF provides it. The circle completes.

Diagram

Learn More

Back to Blog

Related posts

Read more »