Compile Perl 5 scripts and modules into standalone native binaries. No perl interpreter required at runtime.
Perla parses real Perl, lowers it to Strada, and Strada compiles it to C. You get a single binary you can ship — no CPAN install, no DynaLoader, no libperl dependency.
Real Perl is wonderful for scripting and prototyping. Perla is for the moments where you'd rather ship a compiled artifact than a script that depends on a runtime.
One statically-linked executable. No perl to install on the target, no version skew, no CPAN bootstrap, no cpanm on boot. Drop it on a server or into a container and run.
No perl interpreter warm-up. For short-lived scripts and CLI tools that get invoked constantly, the difference between 40ms perl startup and a sub-millisecond native exec matters.
Tight inner loops compile to real machine code. Perla's backend is Strada — which consistently outruns Perl, Python, and Ruby on CPU-bound work. You choose the tradeoff: -O0 for fast compiles, -O3 for release.
__C__ { ... } drops inline C into a Perl sub. FFI to libc, libcurl, zstd, or a custom .so — without writing XS. All of Perl's value for rapid development, all of C's value for the 5% that needs it.
Runs well under Cannoli, Strada's preforking web server. Perla-compiled handlers load as .so's — see the cannoli_perla bridge for how large-scale apps serve HTTP.
Sigils, regex, map/grep/sort, bless, AUTOLOAD, Moose-style has/extends/with, Try::Tiny, DBI, JSON — the idioms you know from Perl work here. Native implementations of the most-used XS modules built in.
perla -M lib/ builds every module in a tree to .pm.o once. Subsequent compiles of scripts that use them skip re-parsing the source — a big speedup on programs with deep use trees.
No GC pauses, no global interpreter lock, no mysterious memory growth. Reference counting with escape-analyzed tagged integers — allocation patterns are explicit and debuggable with valgrind.
eval STRING at runtime, or very baroque overload dispatch.use chains can take a minute or two. Use make precompile / -M DIR/ to warm the cache.__C__.--keep preserves the generated .c for inspection, but you won't have perl -d.Compile, run, ship. No preamble, no type annotations, no IDE setup.
# hello.pl use strict; use warnings; use JSON; sub greet { my ($name) = @_; return encode_json({ hello => $name, time => time() }); } print greet("world"), "\n";
$ perla -O2 -o hello hello.pl $ ./hello {"hello":"world","time":1755123456} $ file hello hello: ELF 64-bit LSB pie executable, x86-64, statically linked
That's the entire workflow. perla reads your .pl, resolves its use tree, lowers it to Strada, compiles to C, and links a binary. No cpanm install JSON, no Carton bundling, no fatpack. The JSON encoder is wired into Perla's runtime as a native module.
Perla ships with the Strada repo. Build once, then compile any Perl file.
$ git clone https://github.com/strada-lang/strada-lang $ cd strada && make && make -C perla $ echo 'print "hi\n"' > hi.pl $ ./perla/perla hi.pl hi