Early & Experimental:Rey v0.3.1 is under active development. APIs may evolve before v1.0.Learn more →
REY v0.3.1+ Capybara v0.1.1

A systems language built for speed, safety, and joy.

Rey combines the raw speed of native LLVM compilation with zero garbage-collection pauses, pattern matching, explicit null safety, and a self-hosted compiler.

$curl -fsSL https://raw.githubusercontent.com/rey-language/capybara/main/install.sh | sh
Installs Capybara CLI + bundled Rey v0.3.1 compiler & standard libraryAll downloads →
example_1.rey
struct Task {
    pub id: int,
    pub title: string,
    pub priority: int,

    pub func summary(): string {
        return "#{id} - {title} (P{priority})";
    }
}

func main(): void {
    var queue = Vec.new();
    queue.push(Task { id: 101, title: "LLVM 18 backend", priority: 1 });
    queue.push(Task { id: 102, title: "Type inference", priority: 2 });

    for task in queue {
        println(task.summary());
    }

    var scores = [88, 92, 97];
    var avg = scores.reduce((acc: int, s: int) => acc + s, 0) / scores.len();
    println("Average score: {avg}%");
}
Typechecked with Rey v0.3.1Run live in Playground →
DESIGN PHILOSOPHY

Why Rey?

Built from scratch to deliver the deterministic performance of C and Rust, combined with the syntactic elegance and developer velocity of modern languages.

⚡LLVM 18+ Backend

Blistering Performance

Compiles directly to native machine code with zero garbage collector pauses. Minimal runtime overhead and predictable microsecond-level latency.

🛡️Strict Typechecker

Memory & Type Safety

Strong static typing with inference, explicit nullable types (T?), algebraic enums with exhaustive pattern matching, and runtime-checked arithmetic.

📦3.3 MiB Peak RSS

Zero-Bloat Footprint

Rey programs launch in milliseconds with a tiny 1.82 MiB compiler binary and 1.49 MiB compact standard library—over 15x leaner than Node.js and 4x leaner than Python.

🔄Rey-in-Rey Architecture

Self-Hosting Compiler

The modern Rey compiler is written directly in Rey itself. Code transforms through typed AST lowering, high-level IR, and native LLVM code generation.

USE CASES

Build it in Rey

Whether you need lightweight command-line executables, ultra-fast WebAssembly modules, or deterministic backend microservices.

💻

CLI Tools & Utilities

Instant startup, standalone single-binary distribution, and rich standard library I/O primitives.

var args = sys.args();
println("Processing: " + args[1]);
🌐

WebAssembly & Browser Apps

Zero-runtime sandbox execution in WebAssembly with instantaneous compilation in the browser.

var wasmResult = runReyWasm(code);
console.log(wasmResult.stdout);
🚀

High-Throughput Services

Zero-GC pauses, low memory footprint, deterministic CPU cycles, and predictable concurrency.

for req in incomingQueue {
  handleRequest(req);
}
📊

Data & Algorithmic Computing

Exact IEEE-754 precision, verified 0 relative error against C/Rust, and fast vector math.

var v = Vector3.new(1.0, 2.0, 3.0);
var norm = v.normalize();
PROVEN BENCHMARKS

Speed Metrics & Specs

Measured on Apple Silicon M1 (macOS 15+) under strict deterministic conditions.

View full benchmark methodology →
Benchmark WorkloadRey v0.3.1Python 3.14Node.js 25Go 1.23Rust 1.98
math_bench (Trig & Vectors)
50,000 iterations sin/cos & vector dot products. Rey achieves exact 0 error vs IEEE-754.
344.6 ms164.0 ms165.6 ms29.3 ms71.3 ms
Peak Memory (RSS)
Measured with /usr/bin/time -l on Apple Silicon. Rey is 4.4x leaner than Python, 15.4x leaner than Node.js.
3.30 MiB14.52 MiB50.86 MiB3.77 MiB1.72 MiB
Executable & Runtime Size
Standalone distribution footprint. Rey bundles its runtime and stdlib under 3.4 MiB total.
1.82 MiB5.23 MiB + 61 MiB63.03 MiB12.43 MiB402 KiB
Math Accuracy (vs Rust f64)
Deterministic math verification across all workloads in the comprehensive benchmark suite.
0 relative error0 relative error~1e-15 drift~1e-15 driftReference
Source: Standardized cross-language benchmark suite (`benchmarks/BENCHMARK_REPORT.md`).✓ Verified deterministic checksum pass across all workloads
BATTERIES INCLUDED

A modern Standard Library engineered for zero bloat.

Rey ships with essential high-performance data structures and system operations out of the box, without pulling in heavy runtime bloat.

Collections
Vec, HashMap, Stack, Queue, LinkedList
Math & Vectors
sin, cos, sqrt, pow, Vector2/3 arithmetic
File System (FS)
readFile, writeFile, listDir, fileExists
Process & System
exec, execDetailed, env, args, cwd
stdlib_showcase.reyRUNNABLE
// Functional collections & file operations
var numbers = Vec.new();
for i in 1..=5 {
    numbers.push(i * 10);
}

// Higher-order pipeline
var doubled = numbers.map((n: int) => n * 2);
var total = doubled.reduce((acc: int, v: int) => acc + v, 0);
println("Total sum: {total}");

// Option & Result handling
var scores = HashMap.new();
scores.set("alice", 98);
scores.set("bob", 84);

if scores.has("alice") {
    println("Alice's Score: " + scores.get("alice").toString());
}
TOOLCHAIN & CLI

Meet Capybara: Your Rey Command Center

The official CLI front door. Project scaffolding, dependency management, fast builds, test running, and environment doctor all in one tool.

$capy init --name my-app

Scaffold a brand new Rey project with capy.toml and source tree.

$capy run

Build and run your application with zero-config compilation.

$capy build -o dist/app

Produce optimized, native standalone binaries via LLVM.

$capy doctor

Verify Clang toolchain, environment paths, and Rey compiler readiness.

Get Started with Capybara →
DEVELOPMENT ROADMAP

The Road to Rey v1.0

A transparent, phased development plan tracking our progression from reference interpreter to a battle-tested, self-hosting native language.

Completedv0.1 — v0.3.1

Phase 0: Foundations

  • •Reference interpreter & recursive descent parser
  • •Hindley-Milner inspired static typechecker with inference
  • •Algebraic enums, structs, methods, and pattern matching
  • •Compact standard library (Vec, HashMap, Option, Result, Math, FS)
In Progress (Active)v0.4 target

Phase 1: Native Self-Hosted Compiler

  • •Self-hosted compiler in rey-compiler/ compiling Rey source code
  • •LLVM 18+ code generator backend emitting native binaries
  • •Capybara CLI (capy) front door with project initialization and build runner
  • •WebAssembly browser compilation target for playground and web apps
Plannedv0.5 target

Phase 2: Standard Library Expansion

  • •Non-blocking async/await and event loop runtime
  • •High-performance HTTP/1.1 and HTTP/2 client & server modules
  • •JSON serializer/deserializer with compile-time schema derivation
  • •SIMD vector math intrinsics and cryptographic primitives
Plannedv0.8 target

Phase 3: Tooling & Package Registry

  • •Capybara central package repository and dependency solver
  • •Language Server Protocol (LSP) engine with hover, completions, and refactoring
  • •Interactive debugger (DWARF / LLDB integration)
  • •Automated cross-compilation matrix for 12+ OS/architecture targets
Goalv1.0 LTS

Phase 4: Production v1.0 LTS

  • •Guaranteed ABI stability and backwards syntax compatibility
  • •Formal language specification and conformance test suite
  • •Enterprise production deployment guidelines and long-term support
OPEN SOURCE ECOSYSTEM

Shape the Future of Rey

Rey is free and open-source under the MIT license. We invite contributors of all skill levels to help build the compiler, standard library, and package manager.

Compiler & ToolchainRust, C++, Rey, LLVM

Rey Compiler Core

Help write the self-hosted Rey compiler frontend, parser, type checker, LLVM IR lowerer, and WebAssembly code generator.

View Repository on GitHub →
Package ManagerRey, Shell, Tooling

Capybara CLI & Build System

Build out project scaffolding, automated dependency resolution, lockfile generation, testing harnesses, and doctor diagnostics.

View Repository on GitHub →
Core LibrariesRey, Algorithms

Standard Library (std)

Implement foundational data structures, networking, math routines, file manipulation, and serialization algorithms in pure Rey.

View Repository on GitHub →