Strada Documentation
Everything you need to master Strada programming.
Getting Started
Language Guide
Types & Variables
Understand Strada's type system: int, num, str, array, hash, and sigils.
Advanced
Memory Management
Automatic reference counting, object destruction, and performance optimization.
Debugging
Inspect variables with dumper, trace call stacks, and profile function performance.
C Interoperability
Embed C code with __C__ blocks, create shared libraries, and interface with C APIs.
Libraries Guide
Create and use reusable libraries with import_lib (dynamic) and import_object (static).
Perl Integration
Embed Perl in Strada programs or call Strada from Perl. Access CPAN modules.
Reference
Built-in Functions
Complete reference for all built-in functions organized by category.
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) |
examples/ |
Example programs demonstrating language features |
cannoli/ |
Web framework source and examples |
lib/ |
Standard library modules (ssl, etc.) |
t/ |
Test suite (93 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