Strada Documentation

Everything you need to master Strada programming.

Getting Started

QuickStart Guide

Install Strada and write your first program in 5 minutes.

Get started →

REPL & Scripting

Interactive shell for experimentation and quick scripts without compilation.

Try the REPL →

Language Basics

Learn syntax, operators, and fundamental concepts.

Learn basics →

Interpreter

Tree-walking interpreter for scripts and embedded eval — no C compiler needed.

Learn more →

Language Guide

Types & Variables

Understand Strada's type system: int, num, str, array, hash, and sigils.

Read more →

Functions

Define functions, use closures, and work with references.

Read more →

Control Flow

Conditionals (if/unless), loops (while/until/for/foreach), statement modifiers, redo, map/grep/sort, and exception handling.

Read more →

Object-Oriented Programming

Classes, objects, methods, and inheritance with packages.

Read more →

Regular Expressions

Pattern matching, substitution, captures, and text processing with regex.

Read more →

Advanced

Memory Management

Automatic reference counting, object destruction, and performance optimization.

Learn more →

Debugging

Inspect variables with dumper, trace call stacks, and profile function performance.

Learn more →

Async/Await

Thread pool concurrency with async functions, futures, all(), race(), timeouts, and cancellation.

Learn more →

C Interoperability

Embed C code with __C__ blocks, create shared libraries, and interface with C APIs.

Learn more →

Libraries Guide

Create and use reusable libraries with import_lib (dynamic) and import_object (static).

Learn more →

Perl Integration

Embed Perl in Strada programs or call Strada from Perl. Access CPAN modules.

Learn more →

Reference

Built-in Functions

Complete reference for all built-in functions organized by category.

View reference →

Cannoli Web Framework

Build web applications with routing, file uploads, SSL, and more.

Read docs →

Documentation Tools

Document your code with POD and generate HTML with stradadoc.

Read docs →

Compilation

Strada compiles to C, which is then compiled to native executables:

# One-step compilation (recommended)
./strada program.strada           # Creates ./program executable
./strada -r program.strada        # Compile and run
./strada -c program.strada        # Keep generated .c file
./strada -g program.strada        # Include debug symbols
./strada --shared lib.strada      # Create shared library (.so)

# Two-step compilation (manual)
./stradac input.strada output.c
gcc -o output output.c runtime/strada_runtime.c -Iruntime -ldl -lm
./output

Project Structure

Directory Description
compiler/ Self-hosting compiler source (Lexer, Parser, AST, CodeGen)
runtime/ C runtime library (StradaValue, reference counting, built-ins)
bootstrap/ Bootstrap compiler in C (used only to build self-hosting compiler)
interpreter/ Tree-walking interpreter driver (REPL and file execution)
examples/ Example programs demonstrating language features
cannoli/ Web framework source and examples
lib/ Standard library modules (ssl, etc.)
t/ Test suite (124 tests)

Testing

# Run all tests
make test-suite

# Verbose output
make test-suite V=1

# TAP format for CI/CD
make test-suite TAP=1

# Run specific tests
./t/run_tests.sh string     # Tests matching "string"
./t/run_tests.sh -v oop     # Verbose OOP tests