Introduction to Turbo

A compiled, type-safe programming language with JavaScript's developer experience, Rust's performance, and first-class AI agent primitives.

JavaScript's soul. Rust's speed. Built for the AI age.

What is Turbo?

Turbo compiles directly to machine code using Cranelift. No interpreter, no VM, no garbage collector. Programs start instantly and run at native speed. It features strong static typing with type inference, generics, traits, and algebraic data types -- all while keeping a clean, approachable syntax.

Key Features

  • Native compilation -- JIT via turbo run, AOT via turbo build
  • Type-safe -- Generics, traits, pattern matching, Result/Optional types
  • Async runtime -- async/await, spawn, channels, mutex
  • AI agent primitives -- agent and tool fn keywords
  • Modern toolchain -- built-in test runner, formatter, REPL, LSP, package manager
  • Tiny binaries -- ~35 KB for a hello world, no runtime dependencies

A Quick Taste

fn fib(n: i64) -> i64 {
    if n <= 1 {
        n
    } else {
        fib(n - 1) + fib(n - 2)
    }
}

fn main() {
    let mut i = 0
    while i <= 15 {
        print(fib(i))
        i += 1
    }
}

Who is Turbo for?

  • Developers who want native performance without Rust's complexity
  • Teams building AI-powered applications with agents and tools
  • Anyone who wants a modern language with batteries included
  • Systems programmers who appreciate clean, expressive syntax

Performance

Benchmarked on Apple Silicon (fib(40), recursive):

LanguageTimeBinary Size
Turbo (LLVM)160ms35 KB
C (cc -O2)170ms33 KB
Rust (rustc -O)180ms441 KB
Turbo (Cranelift)220ms35 KB
Node.js580msN/A
Python13.1sN/A