Aye

A small systems language without a garbage collector, built so AI agents can learn it from one command.

Your agent reads aye spec, writes the code, and aye check says what to fix. Aye compiles to C and builds one small native binary with clang. No GC, no exceptions, no macros: memory comes from allocators you pass in and is released with defer.

macOS and Linux, arm64 and x86_64, plus wasm32 as a target. Pre-1.0: expect breaking changes.

sum.aye prints 42
import std.heap.General
import std.list.List

error ParseError { BadDigit }

fn parse(s: []u8) ParseError!i64 {
    var n: i64 = 0
    for c in s {
        if c < '0' || c > '9' {
            return ParseError.BadDigit
        }
        n = n * 10 + (c - '0') as i64
    }
    return n
}

pub fn main() !void {
    var gpa = General.init()
    defer gpa.deinit()
    var xs = List(i64).init(gpa.allocator())
    defer xs.deinit()
    try xs.append(try parse("12"))
    try xs.append(try parse("30"))
    var total: i64 = 0
    for x in xs.items() {
        total += x
    }
    @println(total)
}

Why Aye

A new language has no training data. Aye is small enough that an agent learns it from the reference in one read, and strict enough that the checker catches the rest. Three results you can check:

15 / 15

Agents learn it cold

Fresh Claude Sonnet agents, given only aye spec and the checker, passed 15 of 15 runs of five tasks: grep, line counts, an HTTP server, JSON totals and word frequencies. Median 11 turns and one aye check call per run; 1.85 USD for all 15.

Source: docs/aye-eval.md (2026-10-11), rerun with scripts/eval.py

112k lines

It scales to a web browser

Dweller is a web browser written in Aye: HTML and CSS parsing, a JavaScript engine, layout and painting, with SDL2, FreeType and libcurl called through @cimport. CI builds and tests it against the compiler on every push to main.

Source: aye-lang/dweller (112,198 lines of Aye in 192 files at c40f2c9, 2026-10-15), CI job downstream

43.6 KB

Small, fast binaries

The hello-world HTTP server in std.http is a 43,600-byte binary (Go: 8.2 MB). It served 146k requests per second under wrk, against 70k for Go net/http and 16.6k for Node 22. A microbenchmark, with caveats below.

Source: docs/aye-bench.md (2026-10-14, commit 0e7463d)

Built for the loop an agent runs

  • One spec, one read. aye spec prints the core of the language reference in under 28 KB, and the whole reference stays under 30k tokens. The test suite type-checks every example in it (tests/spec.rs).
  • Errors that fix themselves. Every error has a stable code and a position, often a fix-it. aye explain shows a wrong and a fixed example, aye fix applies the fix-its, and aye check --json gives all of it to a tool.
  • No hidden costs. A function that allocates takes an Allocator. No GC, no exceptions, no operator overloading, no destructors. Overflow, out-of-bounds access and bad casts trap in debug and safe builds.
Delete the first line of sum.aye, then:
$ aye check sum.aye
sum.aye:17:15: error[E0084]: `General` is not declared: it is `std.heap.General` (add `import std.heap.General`)
sum.aye:2:1: help: add `import std.heap.General`
$ aye fix sum.aye
sum.aye:2:1: fixed: add `import std.heap.General`
$ aye check sum.aye
$ aye run sum.aye
42

Install

One command installs the latest release for macOS or Linux, arm64 or x86_64, into ~/.aye. Aye emits C, so every build also needs clang on your PATH.

  1. Install aye

    curl -fsSL https://ayelang.dev/install.sh | sh

    The script checks the download against the release's SHA256SUMS, never uses sudo, and prints the line to add to your shell profile (export PATH="$HOME/.aye/bin:$PATH"). Run it again to upgrade; AYE_VERSION=v0.1.0 picks a release, AYE_HOME another directory. The tarballs are also on the releases page.

    clang on macOS

    xcode-select --install

    The Command Line Tools bring clang and libclang (for @cimport).

    clang on Linux (Debian, Ubuntu)

    sudo apt install clang libclang-dev pkg-config

    The Linux binaries need glibc 2.39 or newer (Ubuntu 24.04). CI runs on Ubuntu 24.04 and macOS 15.

  2. Write and run a program

    hello.aye prints hello, world then bye
    pub fn main() {
        defer @println("bye")
        @print("hello, ")
        @println("world")
    }
    aye run hello.aye                      # build in debug mode and run
    aye build --mode fast hello.aye        # write ./hello, optimized
  3. Hand it to your agent

    Start a session in Claude Code, Codex or Cursor with a line like this. aye spec is the whole onboarding:

    Run `aye spec` and read it before you write any Aye. Check your code with `aye check --json` and fix every error before you run it.
Build from source

With Rust (1.85 or newer) and clang, Cargo builds aye and puts it in ~/.cargo/bin. This also works on an older Linux than the release binaries need.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install --git https://github.com/aye-lang/aye aye
WebAssembly targets

--target wasm32-wasip1 builds a WASI module, and aye run runs it under Node's node:wasi. --target wasm32-freestanding has no libc and exports your pub extern fns to JavaScript. On macOS, install the WASI toolchain with brew install llvm wasi-libc wasi-runtimes. On Linux, scripts/setup-ubuntu.sh installs wasi-sdk. Details are in spec ยง2.

aye run --target wasm32-wasip1 hello.aye

Windows is not supported.

A five-minute tour

If you know Go, Zig or Rust, most of Aye will look familiar: braces and name: Type like Go, errors as values like Zig, tagged enums and exhaustive match like Rust. Every sample below compiles with today's aye.

Structs and methods

Methods live in the struct. The first parameter says whether a method gets a copy (Self), a read-only pointer (*Self) or a writable one (*mut Self).

struct Point {
    x: f64
    y: f64

    fn len2(self: Self) f64 {
        return self.x * self.x + self.y * self.y
    }

    fn scale(self: *mut Self, k: f64) {
        self.x *= k
        self.y *= k
    }
}

pub fn main() {
    var p = Point { x: 3.0, y: 4.0 }
    p.scale(2.0)
    @println(p.len2())
}

Prints 100.

Errors are values

A function returns E!T: an error of set E, or a T. try passes the error up; catch handles it, here with an exhaustive match.

error ParseError { Empty, BadDigit }

fn digit(s: []u8) ParseError!u8 {
    if s.len == 0 {
        return ParseError.Empty
    }
    if s[0] < '0' || s[0] > '9' {
        return ParseError.BadDigit
    }
    return s[0] - '0'
}

pub fn main() !void {
    @println(try digit("7"))
    let d = digit("x") catch |e| match e {
        .Empty => 0
        .BadDigit => 9
    }
    @println(d)
}

Prints 7 then 9.

Generics are compile-time code

A comptime T: type parameter makes a function generic, and a function that returns type makes a new type. No separate macro or template language.

fn max(comptime T: type, a: T, b: T) T where T: Integer {
    if a > b {
        return a
    }
    return b
}

fn Pair(comptime T: type) type {
    return struct {
        first: T
        second: T
    }
}

pub fn main() {
    @println(max(i32, -4, 3))
    let p = Pair(u8) { first: 1, second: 2 }
    @println(max(u8, p.first, p.second))
}

Prints 3 then 2.

C is one line away

@cimport reads a C header with libclang and you call its functions directly, with no wrapper. Add @link("zlib") to link a library such as zlib.

let m = @cimport("math.h")

pub fn main() {
    @println(m.sqrt(2.0))
    @println(m.pow(2.0, 10.0))
}

Prints 1.41421 then 1024.

Built with Aye

Dweller

A web browser for people and AI agents: HTML, CSS, a JavaScript engine, layout and painting. Agents can read pages as Markdown or as an accessibility tree, or drive it over MCP. It calls SDL2, FreeType and libcurl through @cimport. MIT OR Apache-2.0.

The standard library

Written in Aye: files, processes, threads, coroutines, TCP, an HTTP server and client, JSON, maps, sorting, time and crypto. Browse it in the std reference.

The hello-server benchmark

Requests per second for GET / returning hello\n, wrk -t2 -c64 -d10s, median of three runs
Serverreq/sp50Binary
Aye std.http, --mode fast145,9660.22 ms43,600 B
Go 1.24 net/http70,2700.59 ms8,215,565 B
Node 22 http16,5563.52 msn/a

Read this with care. It is a hello-world microbenchmark, not a general claim that Aye is faster than Go. All three servers and the wrk client ran on one 4-core cloud VM (Intel Xeon 2.80 GHz, Ubuntu 24.04), so the client competes with the server for CPU. Results move with the VM shape: on another VM, Go did 126k under ab; before std.http got its worker pool (2026-10-11), Go beat Aye 99k to 39k. The driver script for the wrk runs is not committed yet. Machine, commands, all runs and the older tables are in docs/aye-bench.md; the servers are in scripts/bench.

Docs and community

Learn

Talk