Rakudobrew has been renamed to Rakubrew. Head over to rakubrew.org for the current version.
Rakudobrew helps to build one or more versions of Rakudo and quickly switch between them. It's a perlbrew and plenv look alike and supports both flavours of commands.
Rakudobrew can work by modifying $PATH in place (which is a more down to the metal) as well as with shims (which enables advanced features, such as local versions).
- On *nix do:
git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew export PATH=~/.rakudobrew/bin:$PATH # or fish shell: set -U fish_user_paths ~/.rakudobrew/bin/ $fish_user_paths rakudobrew init # Instructions for permanent installation.
- On Windows CMD do:
git clone https://github.com/tadzik/rakudobrew %USERPROFILE%\rakudobrew SET PATH=%USERPROFILE%\rakudobrew\bin;%PATH% rakudobrew init # Instructions for permanent installation.
- On Windows PowerShell do:
git clone https://github.com/tadzik/rakudobrew $Env:USERPROFILE\rakudobrew $Env:PATH = "$Env:USERPROFILE\rakudobrew\bin;$Env:PATH" rakudobrew init # Instructions for permanent installation.
Rakudobrew requires Perl 5 and Git to be installed. You can download and install these from
If you want to use the Microsoft compiler
cl, you have to make sure the compiler is on
PATH and you have the environment variables
cl requires set.
This happens automatically when using the Native Tools Command Prompt but has to be done
manually when using a normal terminal (or PowerShell). The script
vcvars32.bat (which is in the same
cl) can set these variables up automatically for you.
On PowerShell this requires some additional trickery as described on StackOverflow: http://stackoverflow.com/q/6140864
It might be necessary to use an Administrative console to work around a problem with permissions that go wrong during the build process.
Bootstrapping a Perl 6 implementation
- Run something like:
$ rakudobrew build moar
- Once that's build switch to it (substitute the version rakudobrew just built):
$ rakudobrew switch moar-2019.03.1
- To install zef (the Perl 6 module manager), do:
$ rakudobrew build-zef
global vs shell vs local
global version is the one that is active when none of the overrides of
local are triggered.
shell version changes the active Rakudo version just in the current shell.
Closing the current shell also looses the
local version is specific to a folder. When CWD is in that folder or a sub folder
that version of Rakudo is used. Only works in
shim mode. To unset a local version
one must delete the
.PL6ENV_VERSION file in the respective folder.
Rakudo brew has two modes of operation:
env mode rakudobrew modifies the
$PATH variable as needed when switching between
versions. This is neat because one then runs the executables directly. This is the default mode
shim mode rakudobrew generates wrapper scripts called shims for all
executables it can find in all the different Rakudo installations. These
shims forward to the actual executable when called. This mechanism allows for
some advanced features, such as local versions. When installing a module that
adds scripts one must make rakudobrew aware of these new scripts. This is done
$ rakudobrew rehash
env mode this is not necessary.
Registering external versions
To add a Rakudo installation to rakudobrew that was created without rakudobrew one should do:
$ rakudobrew register name-of-version /path/to/rakudo/install/directory
Upgrading your Perl 6 implementation
$ rakudobrew build moar
Upgrading rakudobrew itself
$ rakudobrew self-upgrade
Uninstall rakudobrew and its Perl 6(s)
To remove rakudobrew and any Perl 6 implementations it's installed on your system,
just remove or rename the
Specifying custom git path
In case git is not in any standard
PATH on your system, you can specify a custom path
to the git binary using a
GIT_BINARY environment variable:
$ GIT_BINARY="%USERPROFILE%\Local Settings\Application Data\GitHub\PORTAB~1\bin\git.exe" rakudobrew build all
Specifying a git protocol
By default, rakudobrew will use the git protocol when it clones repositories.
To override this setting, use the
GIT_PROTOCOL environment variable.
$ GIT_PROTOCOL=ssh rakudobrew list-available # uses firstname.lastname@example.org:/rakudo/rakudo.git $ GIT_PROTOCOL=https rakudobrew list-available # uses https://github.com/rakudo/rakudo.git
Show the currently active Rakudo version.
List all installed Rakudo installations.
global [version] or
Show or set the globally configured Rakudo version.
Show, set or unset the shell version.
Show or set the local version.
nuke [version] or
Removes an installed or registered version. Versions built by rakudobrew are actually deleted, registered versions are only unregistered but not deleted.
Regenerate all shims. Newly installed scripts will not work unless this is
called. This is only necessary in
List all Rakudo versions that can be installed.
build [jvm|moar|moar-blead|all] [tag|branch|sha-1] [--configure-opts=]
Build a Rakudo version. The arguments are:
- The backend.
moar-bleadis the moar and nqp backends at the master branch.
allwill build all backends.
- The version to build. Call
list-availableto see a list of available versions. When left empty the latest release is built. It is also possible to specify a commit sha or branch to build.
- Configure options.
triple [rakudo-ver [nqp-ver [moar-ver]]]
Build a specific set of Rakudo, NQP and MoarVM commits.
register <name> <path>
Register an externaly built / installed Rakudo version with Rakudobrew.
Install Zef into the current Rakudo version.
exec <command> [command-args]
Explicitly call an executable. You normally shouldn't need to do this.
rakudobrew which <command>
Show the full path to the executable.
whence [--path] <command>
List all versions that contain the given command. when
--path is given the
path of the executables is given instead.
Show or set the mode of operation.
Upgrade Rakudobrew itself.
Show installation instructions.
Run Rakudo tests in the current or given version.