Documentation

Everything you need to write, compile, and execute Turbo programs — from source code to silicon.

What is Turbo?

Turbo is a statically-typed programming language with a C-like syntax. The Turbo toolchain compiles .turbo source files through two stages:

  1. Compilation — the compiler parses source code, builds an AST, type-checks it, allocates registers, and emits Turbo assembly (.asm).
  2. Assembly — the assembler resolves labels, encodes instructions into the Turbo binary format (.bin), and produces an executable.

The resulting binary can be run on the software simulator (included in the toolchain) or loaded onto the Turbo Processor, a hardware CPU written in SystemVerilog that implements the same 32-bit RISC instruction set.

Quick Start

# Install the CLI (requires Rust/Cargo)
cargo install turbo-lang

# Write your first program
echo 'fn main() -> int { return 42; }' > hello.turbo

# Compile and run in one step
turbo run hello.turbo
# → 42

# Step through interactively
turbo sim hello.turbo --debug

CLI Commands

CommandDescription
turbo run <file.turbo>Compile and execute in the simulator
turbo build <file.turbo>Compile to a .bin binary
turbo asm <file.asm>Assemble a Turbo assembly file
turbo disasm <file.bin>Disassemble a binary back to readable assembly
turbo sim <file.bin>Run a binary in the simulator

References