A typed programming language for AI.

Edit individual functions with revision-checked patches. Compile to native code, WebAssembly, C and other targets.

> curl -fsSL https://raw.githubusercontent.com/Joe-Simo/a0/main/install.sh | sh
PS> irm https://raw.githubusercontent.com/Joe-Simo/a0/main/install.ps1 | iex

Source tokens

29 fixed benchmark programs · o200k_base

A09,028
C6,402
JavaScript6,400
Rust6,565

0 → 10,000 tokens · lower is better

Exact source counts and method →

Small programs, compiled

Time per call as a multiple of A0's · geometric mean · log scale · shorter is faster

C
0.86x
Rust
0.93x
C++
0.94x
A0
1.00x
Zig
1.11x
Java
1.30x
TypeScript
1.40x
Go
1.53x
C#
1.57x
OCaml
2.72x
JavaScript
5.77x
Forth
15.3x
PHP
19.6x
Lua
19.6x
Ruby
73.9x
Python
169x

3 of 48 languages within 5% of A0; 8 faster

  • − Slower than the best of C, Rust and Zig on 8 of 19 programs, worst 4.31x (mat4)

Source: results/exec-benchmark-full.json · method →

Whole-program check, fresh process

A0's front end against TypeScript's checkers · median ms · lower is better

macOS arm64 · load average at most 10.0, limit 10.0 · check-latency-darwin-arm64.json

A0
72.6
tsc
530.5
tsgo
56.7
tsc-rs
53.7

Linux x64 · load average at most 1.2, limit 10.0 · check-latency-linux-x64.json

A0
69.2
tsc
872.4
tsgo
120.3
tsc-rs
86.0

Windows x64 · CPU use at most 8.0, limit 10.0 · check-latency-win32-x64.json

A0
847.1
tsc
3918.1
tsgo
25651.8

A0 against 8 checker runs: 5 faster, 1 tied, 2 slower

  • − macOS arm64: tsgo 56.7 ms, A0 72.6 ms
  • − macOS arm64: tsc-rs 53.7 ms, A0 72.6 ms

Source: results/check-latency-*.json · method →

WebAssembly, against clang -O3

19 programs · Windows x64 · CPU use at most 8.0, limit 10.0

Module bytes, summed · lower is better

A0
9336
clang
11394

Time per trip as a multiple of A0's · geometric mean

A0
1.00x
clang
1.08x

Per program: 7 faster, 7 tied, 5 slower

  • − Slower than clang on 5 of 19 programs, slowest at 0.78x
  • − Larger module on 1 of 19 programs

Source: results/wasm-benchmark.json · method →

01 / Language and tools

Write, check and compile.

Language

Typed functions

Every function states its types. One operation per line.

a0 check sq.a0
Edits

Revision-checked patches

Change instructions or replace a function. A0 checks the patch before applying it.

a0 patch sq.a0 edit.patch
Targets

C, arm64, WebAssembly

Compile the same source to different targets. See the benchmarks for verification coverage.

a0 emit arm64 sq.a0
Agents

MCP server

Open function views, apply patches, run checks and save changes through MCP.

a0 mcp .

02 / Quick start

Run your first function.

  • printf 'fn sq u32 -> u32\na mul p0 p0\nret a\nend\n' > sq.a0

    One typed function.

  • a0 run sq.a0 sq 12

    Prints 144.

  • a0 check sq.a0

    Reports type and bounds errors. --fix applies supported diagnostic fixes.

  • a0 emit arm64 sq.a0

    Emits ARM64 machine code. Other targets include C, JavaScript, Java and SystemVerilog.

  • a0 mcp .

    Serves the folder to an agent over MCP.

Full list in the CLI reference.

03 / Limits

Limits and benchmark results.

LossMeasuredSource
Native speed against the best of C, Rust and Zigslower on 8 of 19 programs, worst 4.31xexec-benchmark-full.json
What the language lacksfloats, heap, recursionSTATUS.md

04 / Install

Install

> curl -fsSL https://raw.githubusercontent.com/Joe-Simo/a0/main/install.sh | sh