Self-hosting · Memory-safe · Zero runtime deps

Perl's soul.
Native speed.

Strada is a strongly-typed language inspired by Perl that compiles straight to native executables via C — familiar sigils, optional types, and up to 95× the speed.

hello.strada
func greet($name) {
    say("Hello, " . $name . "!");
}

func sum_all {
    my $total = 0;
    foreach (@_) { $total += $_; }
    return $total;
}

greet("Strada");
say(sum_all(1, 2, 3, 4, 5));  # 15
95×
faster than Perl on compute
Self-hosting
compiler written in Strada
Memory-safe
refcount + cycle collector
Perl 5
runs unmodified via perla
0
runtime deps beyond libc
// why strada

Expressiveness you know,
performance you didn't expect.

Perl's idioms with optional type annotations, compiled to native machine code. No VM, no interpreter overhead in production.

🚀

Native Performance

Compiles to portable C, then to native machine code via GCC. Function calls become a single call instruction; integer arithmetic uses zero heap allocation. No VM overhead in production.

.strada → .c → native binary

🔒

Optional Type Annotations

Add types when you want clarity (int, num, str, array, hash), or omit them for quick scripting. The sigil tells the compiler the rest.

Perl-Inspired Syntax

Familiar sigils ($, @, %), expressive string handling, and powerful regex support — the idioms you already reach for.

🔄

Self-Hosting Compiler

The Strada compiler is written in Strada itself — proof the language can carry real, serious work.

🧹

Automatic Memory Management

Refcounting with a built-in cycle collector and request arena (default-on). Reclaims cycles with no manual weaken(). Designed valgrind-clean.

🧩

Moose-Style OOP

Declarative OOP with has, extends, with, and before/after/around modifiers. Auto-generated constructors and accessors.

🌐

Web Framework

Ships with Cannoli — routing, file uploads, chunked responses, and SSL/TLS, built in.

🔗

C Interop & Separate Compilation

Embed C with __C__ blocks. Precompile with strada -M; consumers just use Foo; and the .o links automatically.

Async / Await

First-class async/await on a thread pool. async::all(), async::race(), timeouts, and cancellation.

Exception Handling

Modern try/catch/throw for robust error handling with clean propagation.

📦

Closures & First-Class Functions

Anonymous functions with automatic variable capture. Pass functions around as values.

💻

JIT REPL & Scripting

Interactive REPL via strada-jit — real native compilation through tcc or gcc + dlopen. strada --script runs files whole-file.

📊

Profiling Built In

Function profiler (-p) and line-level profiler (--full-profile) with text and HTML report tools.

🔧

Map, Grep, Sort

Perl-style array transforms with $_ and blocks. Build lookup hashes with map { $_ => 1 }.

// for perl developers

If you know Perl,
you already know Strada.

Strada draws heavily from Perl — sigils, regex, hashes, Moose-style OOP — and compiles it all to a single native binary with no interpreter, no VM, and no runtime dependencies.

Familiar syntax

Sigils ($, @, %), regex (=~, s///), foreach, map, grep, push/pop — the idioms you know, with optional types for clarity.

Compile Perl directly with perla

Rather keep writing Perl? perla is a Perl 5 compiler built on Strada — Perl source straight to native code, no rewriting.

Up to 95× faster

No interpreter dispatch loop, no symbol-table lookups, no bytecode overhead. Function calls compile to a single call; integer math allocates nothing.

Single-binary deployment

Compile once, ship a standalone native executable. No language runtime required on the target machine.

Coming from Perl? See the Perl integration guide →

// benchmarks

Faster than every language we tested.

Strada compiles to native machine code via GCC. Here's how it stacks up against Perl 5.38.

Compute
95× faster
Functions
82× faster
OOP
30× faster
Array/Hash
6.9× faster
Strings
2.5× faster
95×
faster than Perl
on compute benchmarks
// type system

Optional types, Perl-style sigils.

Annotate when you want the clarity. Omit them when you want to move fast.

int

64-bit integers (tagged, zero alloc)

num

Floating-point numbers

str

UTF-8 strings

array

Dynamic arrays

hash

Key-value maps

scalar

Generic type

$var

Scalar sigil

@arr

Array sigil

%hash

Hash sigil

// code examples

See Strada in action.

Real syntax, real programs — from hello world to a web server.

Hello World
func main() int {
    say("Hello, World!");
    return 0;
}
Variables & Types
my int $count = 42;
my num $price = 19.99;
my str $name = "Strada";
my array @items = [1, 2, 3];
my hash %config = {
    "host" => "localhost",
    "port" => 8080
};
Functions
func factorial(int $n) int {
    if ($n <= 1) {
        return 1;
    }
    return $n * factorial($n - 1);
}

say(factorial(10)); # 3628800
Variadic Functions
# Accept variable number of args
func sum(int ...@nums) int {
    my int $total = 0;
    foreach my int $n (@nums) {
        $total = $total + $n;
    }
    return $total;
}

sum(1, 2, 3, 4, 5);   # 15

# Spread operator unpacks arrays
my array @vals = [10, 20, 30];
sum(...@vals);            # 60
sum(1, ...@vals, 99);    # 160
Moose-Style OOP
package Animal;
has ro str $species (required);
has rw int $energy = 100;

package Dog;
extends Animal;
has ro str $name (required);

before "bark" func(scalar $self) void {
    say("[get ready]");
}
func bark(scalar $self) void {
    say($self->name() . " barks!");
}

my scalar $d = Dog::new("name", "Rex",
    "species", "dog");
$d->bark();  # [get ready] / Rex barks!
Closures
func make_counter() scalar {
    my int $count = 0;
    return func () {
        $count++;
        return $count;
    };
}

my scalar $counter = make_counter();
say($counter->());  # 1
say($counter->());  # 2
Exception Handling
func divide(int $a, int $b) int {
    if ($b == 0) {
        throw "Division by zero";
    }
    return $a / $b;
}

try {
    my int $result = divide(10, 0);
} catch ($e) {
    say("Error: " . $e);
}
Web Server (Cannoli)
func handle(scalar $c) hash {
    my str $path = $c->path();

    if ($path eq "/") {
        return $c->json({
            "message" => "Welcome to Strada!"
        });
    }

    return $c->not_found();
}
Command-Line Arguments
func main(int $argc, array @argv) int {
    if ($argc < 2) {
        say("Usage: " . $argv[0] . " <name>");
        return 1;
    }
    say("Hello, " . $argv[1] . "!");
    return 0;
}
C Interop (__C__ Blocks)
__C__ {
    #include <math.h>
}

func fast_sqrt(num $x) num {
    __C__ {
        double val = strada_to_num(x);
        return strada_new_num(sqrt(val));
    }
}

say(fast_sqrt(16.0)); # 4.0
// compilation pipeline

Source to native, in three steps.

📝
Strada Source
.strada
⚙️
C Code
.c
🚀
Native Binary
executable

The self-hosting compiler is written in Strada and compiles to portable C, which GCC turns into fast native executables with no runtime dependencies beyond libc.

For interactive use, strada --repl opens a JIT-backed REPL (tcc or gcc + dlopen) supporting the full language. A standalone tree-walking / bytecode VM interpreter is also available as an opt-in build for embedding.

// getting started

Up and running in minutes.

1

Clone the repository

Get the source code from GitHub.

git clone https://github.com/strada-lang/strada-lang.git && cd strada-lang
2

Configure and build

Detect dependencies and build the compiler.

./configure && make
3

Write your first program

Create hello.strada with your favorite editor.

func main() int { say("Hello, Strada!"); return 0; }
4

Compile and run

Use the Strada compiler to build and execute.

./strada -r hello.strada

Ready to write Perl that flies?

Clone the repo, build the compiler, and ship your first native binary in minutes.