raku
The Raku programming language interpreter
TLDR
SYNOPSIS
raku [switches] [--] [programfile] [arguments]
DESCRIPTION
raku is the interpreter for the Raku programming language (formerly known as Perl 6). Raku is a multi-paradigm language supporting procedural, object-oriented, functional, and concurrent programming. It features gradual typing, powerful pattern matching with grammars, built-in concurrency primitives, and Unicode support throughout.When invoked without arguments, raku starts an interactive REPL (Read-Eval-Print Loop). With a program file or the -e option, it compiles and executes the given code. The -n and -p flags provide awk/sed-like one-liner capabilities for processing input line by line.The interpreter is implemented by Rakudo, the primary Raku compiler, which targets the MoarVM virtual machine (and optionally JVM). Raku scripts conventionally use the .raku file extension (previously .p6 or .pl6).
PARAMETERS
-c
Check syntax only (runs BEGIN and CHECK blocks but does not execute the program).-e program
Execute one line of program. Strict mode is enabled by default.-n
Run the program once for each line of input.-p
Same as -n, but also prints $_ at the end of each line.-I path
Add path to the module search path.-M module
Load module before running the program.-o, --output name
Specify the name of the output file for compilation.-h, --help
Display help text.-v, --version
Display version information.-V
Print configuration summary.--doc[=module]
Extract inline Pod documentation and print as text. Optionally use Pod::To::module to render (e.g. --doc=HTML).--target stage
Specify the compilation stage to emit (parse, ast, mast, mbc).--optimize level
Set optimization level (0 to 3).--rakudo-home path
Override the path to Rakudo runtime files.--stagestats
Display time spent in each compilation stage.--ll-exception
Display a low-level backtrace on errors.--profile[=name]
Write profile information to a file. Format determined by extension (.json, .sql, or .html).--profile-compile[=name]
Write compile-time profile information to a file.--full-cleanup
Try to free all memory and exit cleanly.--debug-port port
Listen for incoming debugger connections on port.--debug-suspend
Pause execution at the entry point.
CAVEATS
Startup time can be noticeably slower than Perl 5 or Python due to compilation overhead. The -c flag runs BEGIN and CHECK blocks, so syntax checking is not entirely side-effect-free. Module ecosystem is smaller than Perl 5's CPAN. The --profile option can generate very large output files for long-running programs.
HISTORY
Raku began as Perl 6, announced by Larry Wall in 2000 as a complete redesign of the Perl language. After nearly two decades of development, the first stable release (Rakudo Star 2015.12) shipped in December 2015. In October 2019, the language was officially renamed from Perl 6 to Raku to establish its own identity separate from Perl 5. The primary implementation is Rakudo, running on the MoarVM virtual machine.
