Introduction to Turbo
A compiled, type-safe programming language with JavaScript's developer experience, Rust's performance, and a modern built-in toolchain.
JavaScript's soul. Rust's speed. Honest about what ships today.
What is Turbo?
Turbo compiles directly to machine code using Cranelift (default) or LLVM (optional). 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
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
- Tiny binaries -- ~55 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 that want native-speed tooling today with a core small enough to stay stable
- Anyone who wants a modern language with batteries included
- Systems programmers who appreciate clean, expressive syntax
Performance
Benchmarked on Apple Silicon (fib(40), recursive):
| Language | Time | Binary Size |
|---|---|---|
| Rust (rustc -O) | 180ms | 441 KB |
| Turbo (Cranelift) | 250ms | 55 KB |
| C (cc -O2) | 290ms | 33 KB |
| Turbo (LLVM) | 290ms | 55 KB |
| Node.js | 580ms | N/A |
| Python | 13.1s | N/A |