rakudo(1)
π
rakudo(1) β the manual page but make it a group chat
okay so bestie, this is rakudo, straight out of the Rakudo Manual. it's the manual page for the Raku compiler and it is lowkey a whole vibe. hydrate, sit down, we're doing this π«Ά
β¨ NAME β¨
raku β Rakudo Raku Compiler. that's the whole name. short, iconic, no notes. π
πΈ SYNOPSIS πΈ
raku [switches] [--] [programfile] [arguments]
π DESCRIPTION π
here's the tea: run it with no arguments and it drops you into a REPL (yes, the interactive prompt, main character energy β¨). but if you hand it a [programfile] or you use the -e option, it compiles the program you gave it and, by default, also executes the compiled code. compile and execute, she does both, periodt. π
and now, every single switch, no skips, all facts:
-cβ check syntax only (and yes, it runsBEGINandCHECKblocks)--docβ extract documentation and print it as text-eprogram β one line of program;strictis enabled by default-h,--helpβ display this help text-nβ run program once for each line of input-pβ same as-n, but also print$_at the end of lines-Ipath β adds the path to the module search path-Mmodule β loads the module prior to running the program--target=[stage]β specify compilation stage to emit--optimize=[level]β use the given level of optimization (0..3)--encoding=[mode]β specify string encoding mode-o,--output=[name]β specify name of output file-v,--versionβ display version information--stagestatsβ display time spent in the compilation stages--ll-exceptionβ display a low level backtrace on errors--profileβ write profile information as HTML file (MoarVM)--profile-filenameβ provide a different filename (also allows.json)--doc=[module]β usePod::To::[module]to render inline documentation.--full-cleanupβ try to free all memory and exit cleanly (MoarVM)--debug-port=portβ listen for incoming debugger connections (MoarVM)--debug-suspendβ pause execution at the entry point (MoarVM)--tracingβ output a line to stderr on every interpreter instr (only if enabled in MoarVM)
π¨ tiny but important: only boolean single-letter options may be bundled. don't get cute with it, iykyk.
the supported values for --target are giving:
parseβ backendallβ a representation of the parse treeastβ backendallβ an abstract syntax tree (before optimizations)optimizeβ backendallβ an abstract syntax tree (after optimizations)mbcβ backendMoarVMβ MoarVM byte codejarβ backendJVMβ JVM archive
and for --profile-filename: specifying a name ending in .json will write a raw JSON profile dump. if you omit it, the default is profile-[timestamp].html. π
π ENVIRONMENT VARIABLES π
Rakudo's behavior can be tweaked by a (growing) number of environment variables; this section attempts to document all those currently in use. they are interpreter specific in all cases, except where some use conventional names such as PATH.
the underlying virtual machine is also sensitive to a series of environment variables; they are listed in this wiki page https://github.com/rakudo/rakudo/wiki/dev-env-vars#moarvm.
π§ Module loading π§
RAKUDOLIB,RAKULIB(Str;src/core/Inc.pm) β these two append a comma-delimited list of paths to the search list for modules.RAKUDOLIBis evaluated first. NOTE: these env vars were added in the Rakudo compiler in version2020.05. the deprecated older env varPERL6LIBis still available. πRAKUDO_MODULE_DEBUG(Bool;src/Perl6/ModuleLoader.nqp) β if true, causes the module loader to print debugging information to standard error.
π Error message verbosity and strictness π
RAKU_EXCEPTIONS_HANDLERβ if present, theprint_exceptionroutine will use a class of that name to process the exception for output. Rakudo currently ships withExceptions::JSON(invoked by setting this variable toJSON), to override the default output. NOTE: this env var was added in version6.e. early implementation has been available in the Rakudo compiler as of version2019.12, and before that it was available asPERL6_EXCEPTIONS_HANDLER.RAKUDO_NO_DEPRECATIONS(Bool;src/core.c/Deprecations.pm6) β if true, it suppresses deprecation warnings triggered by theis DEPRECATEDtrait.RAKUDO_DEPRECATIONS_FATAL(Bool;src/core.c/Deprecations.pm6) β if true, deprecation warnings become thrown exceptions. no more soft launches bestie πRAKUDO_VERBOSE_STACKFRAME(UInt;src/core.c/Backtrace.pm6) β displays source code in stack frames surrounded by the specified number of lines of context; for instanceRAKUDO_VERBOSE_STACKFRAME = 1will use one context line.RAKUDO_BACKTRACE_SETTING(Bool;src/core.c/Backtrace.pm6) β controls whether.settingfiles are included in backtraces.
β¨ Affecting precompilation β¨
RAKUDO_PREFIX(Str;src/core.c/CompUnit/RepositoryRegistry.pm6) β when this is set, Rakudo will look for the standard repositories (perl,vendor,site) in the specified directory. this is intended as an escape hatch for build-time bootstrapping issues, where Rakudo may be built as an unprivileged user without write access to the runtime paths in NQP's config.RAKUDO_PRECOMP_DIST,RAKUDO_PRECOMP_LOADING,RAKUDO_PRECOMP_WITH(src/core.c/CompUnit/PrecompilationRepository.pm6) β these are internal variables for passing serialized state to precompilation jobs in child processes. please do not set them manually. πRAKUDO_LOG_PRECOMPβ if set to1, diagnostic information about the precompilation process is emitted.
π Line editor π
RAKUDO_LINE_EDITORβ specifies the preferred line editor to use; valid values areReadline,Linenoise,LineEditor, andnone. a value ofnoneis useful if you want to avoid the recommendation message upon REPL startup.RAKUDO_DISABLE_MULTILINEβ if set to1, it disables multiline input for the REPL.RAKUDO_HISTβ specifies the location of the history file used by the line editor; the default is~/.raku/rakudo-history. before Rakudo version2020.02the default was~/.perl6/rakudo-history. if the older default file exists and the newer one does not, it will be automatically migrated. glow up β¨
π¦ Other π¦
RAKUDO_DEFAULT_READ_ELEMSβ specifies the default number of characters to read on anLΒ«"IO::Handle"|/type/IO::HandleΒ»by setting theLΒ«"$*DEFAULT-READ-ELEMS"|/language/variables#$*DEFAULT-READ-ELEMSΒ»dynamic variable.RAKUDO_ERROR_COLOR(Bool;src/core.c/Exception.pm6) β controls whether to emit ANSI codes for error highlighting. defaults to true if unset, except on Windows.RAKUDO_MAX_THREADS(UInt;src/core.c/ThreadPoolScheduler.pm6) β indicates the maximum number of threads used by default when creating aThreadPoolScheduler. defaults to64.TMPDIR,TEMP,TMP(Str;src/core.c/IO/Spec/) β theIO::Spec::Unix.tmpdirmethod will return$TMPDIRif it points to a directory with full access permissions for the current user, with a fallback default of/tmp.IO::Spec::CygwinandIO::Spec::Win32use more Windows-appropriate lists which also include the%TEMP%and%TMP%environment variables.PATH,Path(Str;src/core.c/IO/Spec/) β theIO::Spec::Unix.pathmethod splits$PATHas a shell would; i.e. as a colon-separated list.IO::Spec::Cygwininherits this fromIO::Spec::Unix.IO::Spec::Win32.pathwill read the first defined of either%PATH%or%Path%as a semicolon-delimited list.RAKUDO_SNAPPERβ indicates the period in which the telemetry snapper will take a snapshot. defaults to.1for 10 snapshots per second.RAKUDO_HOMEβ allows one to override the Raku installation path. defaults to[rakudo_executable_dir]/../share/perl6in relocatable builds and the absolute path to that folder in non-relocatable builds.NQP_HOMEβ allows one to override the NQP installation path. defaults to[rakudo_executable_dir]/../share/nqpin relocatable builds and the absolute path to that folder in non-relocatable builds.
π WINDOWS PECULIARITIES π
Non-console applications
okay so on Windows, programs are compiled to either be console applications or non-console applications. console applications always open a console window, and there is no straightforward way to suppress this window. that's just the situation π
Rakudo provides a separate set of executables suffixed with a w (rakuw.exe, rakudow.exe, ...) that are compiled as non-console applications. these do not spawn this console window. π
WARNING β by default these non-console applications will silently swallow everything that is printed toSTDOUTandSTDERR. π
to receive the output of the program it suffices to redirect it externally:
rakuw.exe script.raku >stdout.txt 2>stderr.txt
π AUTHORS π
written by the Rakudo contributors, see the CREDITS file.
this manual page was written by Reini Urban, Moritz Lenz and the Rakudo contributors.
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
and that's the whole page, bestie! this one comes from the Raku manual, dated 2026-06-27, and it's page rakudo(1). go forth and compile something iconic πβ¨π¦
π¦ where this page comes from
- fedora 43: rakudo 2026.06-1.fc43 Β· Artistic-2.0
- fedora 44: rakudo 2026.06-1.fc44 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms