experimental native systems language · x86-64 · Windows & Linux

Safe by default.
No garbage collector.
Tiny native binaries.

ae is a small, independently-built systems language. Every integer op is checked, memory is freed deterministically with no garbage collector, borrow-checked views stay zero-copy, and programs compile to C11 — small native binaries with no runtime VM.

$ git clone https://github.com/bdprk/ae && cd ae && cargo run -- run examples/hello.ae

Requires Rust + a C11 compiler (GCC/Clang). MIT licensed.

~25KB
smallest benchmark binary
0
garbage collector
2
C11 backends
100%
checked arithmetic

Why ae

Safety and speed, optimized together

Correctness is non-negotiable; runtime cost, compile speed and binary size are tuned jointly against benchmark budgets.

Checked arithmetic by default

Overflow and division-by-zero trap with the exact source location — before any value is corrupted. No silent wraparound to reason about.

No GC · deterministic free

Move semantics free memory at a known point. No collector pauses, no runtime bookkeeping, no unbounded heap growth.

Borrow-checked views

Zero-copy &T, &vec, &string and string views, checked at compile time — no lifetime annotations to write.

Bounds-checked data

Fixed arrays, growable vec, slices and string ops are all checked. Out-of-bounds indexing traps with a location instead of corrupting memory.

Enums & exhaustive match

Tagged variants with payloads and compile-time exhaustive match. Reassigning releases the previous payload deterministically.

Generics & traits

Monomorphized generics with bounds (Add/Eq/Ord/Copy), traits and impls with static dispatch — no method tables.

Real concurrency

OS threads, channels (bounded, rendezvous, select), atomic cells, shared boxes, mutexes, a cooperative executor and a worker pool.

Two C11 backends

A legacy MIR backend and an independent pure-MIR backend emit identical semantics — the pure path is faster on recursion- and index-heavy code.

Small footprint

Compiles to C11 and links against libc only. Our benchmark programs build to tens of kilobytes — no bundled runtime VM.

The language

Familiar, small, and honest about cost

C-family surface syntax with the guarantees wired into the compiler, not bolted on.

checked.ae
// Every integer op is checked: overflow and /0 trap
// with the source location, before a value corrupts.
fn fib(n: i64) -> i64 {
    if n < 2 { return n; }
    return fib(n - 1) + fib(n - 2);
}

fn main() {
    var total = 0;
    for i in 0..10 { total = total + fib(i); }
    print(total);
}
enums.ae
enum Shape { Circle(i64), Rect(i64, i64), Empty }

fn area(s: Shape) -> i64 {
    match s {
        Shape::Circle(r) => { return 3 * r * r; }
        Shape::Rect(w, h) => { return w * h; }
        Shape::Empty => { return 0; }
    }
}
borrow.ae
// Borrowed, not copied — checked at compile time.
fn sum(values: &[i64; 3]) -> i64 {
    return values[0] + values[1] + values[2];
}

fn main() {
    let values = [10, 20, 30];
    print(sum(&values));
}
traits.ae
// Static dispatch: no method table anywhere.
trait Area { fn area(shape: T) -> i64; }

impl Area for i64 {
    fn area(shape: i64) -> i64 { return shape * shape; }
}

fn report[T: Area](shape: T) -> string {
    return "area=" + to_string(area(shape));
}

Benchmarks

Same algorithm, same host, identical output

Workloads are ports from the Computer Language Benchmarks Game. Every implementation uses the same algorithm and input, prints byte-for-byte identical output, and runs single-threaded on the same host.

Zig is built in ReleaseSafe mode (runtime safety on); ae builds with its default checked pipeline. Single-threaded, one process at a time.

Scope & honesty

What ae does — and doesn't — claim

It's an experimental prototype. These limits are stated up front by design.

Implemented

  • Checked integer arithmetic with source locations
  • Move semantics + deterministic deallocation (no GC)
  • Borrow checking for &T, &vec, &string + string views
  • Bounds-checked arrays, vec, slices
  • Enums + exhaustive match, structs, generics, traits (static)
  • Modules, Option[T], recoverable *Result types
  • Threads, channels, atomics, executor, worker pool
  • Files, process, paths, time, JSON, string toolkit

Not yet / out of scope

  • No formal memory-safety proof (borrow checker calibrated to a corpus)
  • No dynamic dispatch / trait objects; no lifetime annotations
  • No async networking / reactor (std/net unimplemented)
  • No package registry; f64 has no implicit conversions
  • Benchmarks are exploratory — not a language ranking
  • No claim of surpassing Go or Rust as a general result

Get started

Build it in a minute

ae is source-distributed today. You need a Rust toolchain and a C11 compiler.

terminal
# clone and build the compiler
git clone https://github.com/bdprk/ae && cd ae
cargo build --release

# run a program (or use --pure for the pure-MIR backend)
./target/release/ae run examples/hello.ae
./target/release/ae build examples/arithmetic.ae -o arithmetic
./target/release/ae test tests_demo/strings_test.ae