DEV Community

wolfejam.dev
wolfejam.dev Subscriber

Posted on

I built FAF using Zig on Bun for Claude

⏺ 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)


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

  Zero deps. 328 tests. Pure Bun APIs.

  bun-sticky-zig (Zig)

  77KB binary. 31µs scoring. 55 million ops/sec.

  Built in Bun's own language. 220X 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

  | Metric         | Value       |
  |----------------|-------------|
  | Scoring speed  | 31µs        |
  | Ops/sec        | 55 million  |
  | Binary size    | 77KB        |
  | vs TS baseline | 220X faster |

  Why This Stack?

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

  The circle completes.

  https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h31z2kpmcvbjxcgz4bpb.png

  Learn More

  - https://faf.one
  - https://faf.one/blog/bun-sticky-launch
  - https://faf.one/blog/bun-sticky-zig-launch
  - https://www.iana.org/assignments/media-types/application/vnd.faf+yaml
Enter fullscreen mode Exit fullscreen mode

Top comments (0)