Introduction to Turbo
A compiled, type-safe programming language with JavaScript's developer experience, native execution, and a modern built-in toolchain.
Familiar code. Native execution. A path to deeper control.
What is Turbo?
Turbo compiles directly to machine code using Cranelift. No interpreter, no VM, and no tracing garbage collector. It features strong static typing with type inference, generics, traits, and algebraic data types while keeping a clean, approachable syntax. Performance work is measured publicly against Rust, with current gaps and targets called out instead of hidden behind a slogan.
Key Features
- Native compilation -- JIT via
turbolang run, AOT viaturbolang build - Type-safe -- Generics, traits, pattern matching, Result/Optional types
- Thread-based concurrency -- spawn, await, channels, mutex
- Small, honest core -- Turbo keeps the compiler focused on a general-purpose language. Agent/tool workflows will ship in a separate
turbo-agentlibrary after 1.0, not as compiler keywords - Modern toolchain -- built-in test runner, formatter, REPL, LSP, package manager
- Native binaries -- AOT builds produce self-contained executables; exact size and startup claims are tracked per benchmark instead of treated as universal promises
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 like TypeScript/JavaScript ergonomics but want native binaries
- Teams building CLIs, local tools, small services, and compute workers
- People who want simple code first and lower-level control later
- Systems, GUI, and game developers evaluating a future direction, not a finished platform today
Performance
The current public baseline is the committed G2.1 initial diagnostic run from 2026-09-06 on Apple M5 Max / macOS 26.5.1. It uses paired, randomized runs with warmups, bootstrap intervals, and output-oracle checks. It is incomplete and should not be read as a Rust-parity claim:
| Language | Time | Binary Size |
|---|---|---|
| Rust fib(40) | 161.09 ms | 1.000× |
| Turbo AOT fib(40) | 233.31 ms | 1.444× paired |
| Rust word count | 22.64 ms | 1.000× |
| Turbo AOT word count | 88.62 ms | 3.871× paired |
The fib subset misses the CPU target today; word count is an application diagnostic with proven output equivalence but non-identical implementation shape. Reproduce the baseline with python3 benchmarks/evaluator.py --output benchmarks/results/a-new-run-name.
Real-world workload: word-count
The next performance milestone is not a slogan. Turbo is aiming for Rust-class performance under explicit gates: CPU geometric mean at or below 1.15× for managed code and 1.05× for controlled code, no individual CPU workload above 1.35× / 1.15×, and memory profiles that can prove live payload and allocation behavior rather than relying on RSS alone.