rakudo/rakudo
{ "createdAt": "2009-01-29T15:30:05Z", "defaultBranch": "main", "description": "š¦ Rakudo ā Raku on MoarVM, JVM, and JS", "fullName": "rakudo/rakudo", "homepage": "https://rakudo.org/", "language": "Raku", "name": "rakudo", "pushedAt": "2025-11-23T16:42:29Z", "stargazersCount": 1821, "topics": [ "hacktoberfest", "moarvm", "nqp", "raku", "rakudo" ], "updatedAt": "2025-11-23T19:51:06Z", "url": "https://github.com/rakudo/rakudo"}This is Rakudo, a Raku Programming Language compiler for the MoarVM, JVM and Javascript virtual machines.
Rakudo is Copyright Ā© 2008-2025, The Raku Foundation. Rakudo is distributed under the terms of the Artistic License 2.0. For more details, see the full text of the license in the file LICENSE.
This directory contains only the Rakudo compiler itself; it does not contain any of the modules, documentation, or other items that would normally come with a full Raku distribution. If youāre after more than just the bare compiler, please download the latest Rakudo Star package.
Rakudo is currently the primary implementation of the Raku
language. The Rakudo compiler has moar, jvm and js backends. Note
that each backend has a different set of features.
Recent changes and feature additions are documented in the docs/ChangeLog
text file.
Building and Installing Rakudo
Section titled āBuilding and Installing RakudoāSee the INSTALL.md file for detailed prerequisites and build and
installation instructions. Check CAVEATS.md for platform specific notes.
The general process for building is running perl Configure.pl with
the desired configuration options (common options listed below), and
then running make or make install. Optionally, you may run
make spectest to test your build on Roast,
the Official Raku test suite. To update the test suite, run
make spectest_update.
Installation of Rakudo simply requires building and running make install.
Note that this step is necessary for running Rakudo from outside the build
directory. But donāt worry, it installs locally by default, so you donāt need
any administrator privileges for carrying out this step.
Configuring Rakudo to run on MoarVM
Section titled āConfiguring Rakudo to run on MoarVMāTo automatically download, build, and install a fresh MoarVM and NQP, run:
$ perl Configure.pl --gen-moar --gen-nqp --backends=moarPlease be aware, that this will install MoarVM and NQP into your given
--prefix before Configure.pl exits.
Alternatively, feel free to git clone https://github.com/Raku/nqp and https://github.com/MoarVM/MoarVM manually and install them individually.
Configuration flags can be passed to MoarVMās Configure.pl using the
--moar-option flag. For example, if you wish to use Clang when GCC is the
default compiler selected for your OS, use the --compiler flag:
$ perl Configure.pl --gen-moar --moar-option='--compiler=clang' \ --gen-nqp --backends=moarIf the compiler you want to use isnāt known by MoarVM or you have multiple
versions of the same compiler installed, the --cc flag can be used to pass its
exact binary:
$ perl Configure.pl --gen-moar --moar-option='--cc=egcc' \ --gen-nqp --backends=moarCustom optimization and debugging levels may also be passed through:
$ perl Configure.pl --gen-moar --moar-option='--optimize=0 --debug=3' \ --gen-nqp --backends=moarFor more information on how MoarVM can be configured, view MoarVMās Configure.pl.
Configuring Rakudo to run on the JVM
Section titled āConfiguring Rakudo to run on the JVMāNote that to run Rakudo on JVM, JDK 1.9 or higher must be installed. To automatically download, build, and install a fresh NQP, run:
$ perl Configure.pl --gen-nqp --backends=jvmIf you get a java.lang.OutOfMemoryError: Java heap space error building
rakudo on the JVM, you may need to modify your NQP runner to limit memory
use. e.g. edit the nqp-j / nqp-j.bat executable (found wherever you installed to, or in the
install/bin directory) to include -Xms500m -Xmx3g as options passed to java.
Alternatively, you can set JAVA_OPTS env var; e.g.
export JAVA_OPTS="-Xmx51200000000"
Please be aware, that this will install NQP into your given --prefix
before Configure.pl exits.
Alternatively, feel free to git clone https://github.com/Raku/nqp manually and install it individually.
Multiple backends at the same time
Section titled āMultiple backends at the same timeāBy supplying combinations of backends to the --backends flag, you
can get two or three backends built in the same prefix. The first
backend you supply in the list is the one that gets the rakudo name
as a symlink, and all backends are installed separately as
rakudo-m or rakudo-j for Rakudo on
MoarVM, or JVM respectively.
The format for the --backends flag is:
$ perl Configure.pl --backends=moar,jvm --gen-moar --relocatable$ perl Configure.pl --backends=ALL --gen-moar --relocatableALL refers to moar, jvm and javascript backends.
Testing
Section titled āTestingāEnsure the test suite is installed
Section titled āEnsure the test suite is installedāThe roast test suite is installed as the t/spec directory
under your rakudo directory. If your installed rakudo
source directory doesnāt have t/spec installed, then
you can clone it like this:
cd $YOUR_RAKUDO_SRCDIRgit clone https://github.com/Raku/roast.git t/specNote the rakudo code includes an entry in its .gitignore file
so git will ignore any content under t/spec.
Now you can run tests in the rakudo directory.
Running tests
Section titled āRunning testsāRun the full spectest:
$ make spectest # <== takes a LONG time!!To run a single test, one must use make because of the tooling required to
run the spectests. For example:
$ make t/spec/S03-operators/comparison.tRun all tests in one S* directory with a sh script. One example:
$ cat run-tests.sh#!/bin/sh
# specify the desired directory:D='t/spec/S26-documentation'
# collect the individual filesF=$(ls $D/*t)
# and run themfor f in $Fdo echo "Testing file '$f'" make $fdoneecho "All tests in dir '$D' have been run."That can be written as a one-liner:
for f in $(ls t/spec/S26-documentation/*t); do make "$f"; doneWhere to get help or answers to questions
Section titled āWhere to get help or answers to questionsāThere are several mailing lists, IRC channels, and wikis available with help for the Raku Programming Language and Rakudo. Figuring out the right one to use is often the biggest battle. Here are some rough guidelines:
The central hub for Raku information is raku.org. This is always a good starting point.
If you have a question about Raku syntax or the right way to approach a problem using Raku, you probably want the āperl6-users@perl.orgā mailing list or the irc.libera.chat/#raku IRC channel. The mailing list is primarily for the people who want to use Raku to write programs, so newbie questions are welcomed there. Newbie questions are also welcome on the #raku channel; the Rakudo development teams tend to hang out there and are generally glad to help. You can follow @raku_news and on Twitter, thereās a Raku news aggregator at Planet Raku.
Questions about NQP can also be posted to the #raku IRC channel. For questions about MoarVM, you can join #moarvm on Libera.
Code of Conduct
Section titled āCode of ConductāThe Raku community is committed to providing a welcoming, inclusive, safe, and enjoyable environment for everyone. Programming should be -Ofun. The Raku Community therefore has adopted a Code of Conduct. Please report any violations of the Code of Conduct by emailing the Raku community affairs team at CAT@raku.org.
Reporting bugs
Section titled āReporting bugsāSee https://github.com/rakudo/rakudo/issues/new
Submitting patches
Section titled āSubmitting patchesāIf you have a patch that fixes a bug or adds a new feature, please create a pull request using githubās pull request infrastructure.
See our contribution guidelines for more information.
Line editing and tab completion
Section titled āLine editing and tab completionāIf you would like simple history and tab completion in the rakudo executable,
you need to install the Linenoise module. The recommended way to install
Linenoise is via zef:
$ zef install LinenoiseAn alternative is to use a third-party program such as rlwrap. Documentation on rlwrap can be found here.
See [CREDITS]!(CREDITS) for the many people that have contributed to the development of the Rakudo compiler, some of which have [left this existence way too early]!(IN-MEMORIAM.md).