Installation

Get Turbo up and running on your machine.

Prerequisites

  • Rust (stable toolchain) -- rustup.rs
  • C compiler -- gcc or clang (for linking AOT binaries)

Option 1: Homebrew (macOS)

Install on macOS via Homebrew. Requires the Rust toolchain (installed automatically as a build dependency).

brew tap ZVN-DEV/turbo
brew install turbo-lang

Option 2: Build from Source

# Clone the repository
git clone https://github.com/ZVN-DEV/Turbo-Language.git
cd Turbo-Language/turbo

# Build in release mode
cargo build --release -p turbo-cli

# The binary is at target/release/turbolang

Option 3: Build with LLVM Backend (Optional)

Turbo includes an optional LLVM backend in addition to the default Cranelift backend. This requires LLVM 18 to be installed on your system.

# Install LLVM 18 (macOS)
brew install llvm@18

# Build Turbo with LLVM support enabled
cd Turbo-Language/turbo
LLVM_SYS_180_PREFIX=/opt/homebrew/opt/llvm@18 cargo build --release -p turbo-codegen-llvm -p turbo-cli --features turbo-cli/llvm

# Use the LLVM backend with the --llvm flag
./target/release/turbolang build --llvm hello.tb

The LLVM backend is fully functional (116/116 tests pass) but requires LLVM 18 as an external dependency. Cranelift is the default and requires no extra setup.

Add to PATH

Add the Turbo binary to your shell's PATH so you can use it from anywhere:

# Add to ~/.bashrc, ~/.zshrc, or equivalent
export PATH="$HOME/Turbo-Language/turbo/target/release:$PATH"

Verify Installation

turbolang --version

You should see the current version number printed to the terminal.

Editor Support

Install the Turbo VS Code extension for syntax highlighting, snippets, and LSP integration:

# Search "Turbo Language" in the VS Code Extensions panel
# Or install from the command line:
code --install-extension zvndev.turbo-lang