← the front page · Raku++ 2.0.0
Install it
Raku++ is one native binary with no runtime to install beside it and no third-party libraries underneath it. Pick whichever line below matches your machine — or skip all of this and use the browser version, which installs nothing at all.
macOS
Homebrew
brew tap ash/rakupp
brew install rakupp
brew install --HEAD rakupp # or: the latest main branch
Apple Silicon installs a prebuilt binary and compiles nothing; Intel builds
from source. Homebrew itself needs the Xcode Command Line Tools — if
brew install asks for them, run xcode-select --install
first.
Every platform, and how it is served
Supported platforms
Five prebuilt archives ship with every release, each self-contained and each
with a .sha256 beside it on the
releases page.
Nothing in them needs installing — they only need unpacking. Every one is
built and smoke-tested in CI on the platform it targets.
| Platform | Archive | Notes |
|---|---|---|
| macOS 11+, Apple Silicon and Intel | rakupp-macos-universal.tar.gz |
one universal binary for both architectures — or Homebrew |
| Linux, x86-64 | rakupp-linux-x86_64.tar.gz |
static libstdc++ — no dependencies to satisfy |
| Windows, x64 | rakupp-windows-x64.zip |
built with MSVC, static CRT — no redistributable |
| Windows, x64 (MinGW) | rakupp-windows-x64-mingw.zip |
for a MinGW-w64 / MSYS2 toolchain |
| OpenBSD, x86-64 | rakupp-openbsd-x86_64.tar.gz |
base clang; built in a CI virtual machine each release |
| The browser | rakujs-*.zip |
the WebAssembly build — or just use the playground |
Unpack keeping the bin/ lib/ include/ layout together — that is
what --exe links against — and put bin/ on your
PATH. rakupp finds its runtime library relative to
its own binary, so it works from any directory; if you copy the executable
somewhere on its own, point it back with
RAKUPP_HOME=<prefix>.
Anywhere else — Linux on ARM, another BSD, a distribution older than the archive expects — build from source. It needs CMake and a C++17 compiler and nothing else: there are no third-party libraries to find first, which is what makes the list above short rather than a matrix. Two cases have their own route rather than an archive: NixOS, which cannot run the generic Linux binary at all (it has no global ELF interpreter), and Guix, which has a channel.
Anywhere with a C++17 compiler
From source
There are no third-party dependencies to fetch first — CMake and a compiler is the whole list.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build # → build/rakupp
# install the binary and the runtime --exe links against
cmake --install build --prefix ~/.local # → ~/.local/{bin,lib,include/rakupp}
On Windows, build from a Developer Command Prompt and pass the configuration
to the build step — the Visual Studio generator is multi-config, so
-DCMAKE_BUILD_TYPE alone is not enough:
cmake -S . -B build
cmake --build build --config Release # → build\Release\rakupp.exe
Linux
GNU Guix
The repository is also a Guix channel, contributed by @4zv4l. From a checkout:
guix build -f .guix/modules/rakupp-package.scm
Or add the channel to ~/.config/guix/channels.scm:
(channel
(name 'rakupp)
(url "https://github.com/ash/rakupp")
(branch "main"))
guix pull && guix install rakupp
Linux · NixOS
Nix
nix run github:ash/rakupp -- -e 'say 42'
nix profile install github:ash/rakupp
From a checkout, nix build produces
./result/bin/rakupp.
First run
Check that it works
rakupp --version
rakupp -e 'say "hello, world"'
rakupp -e 'say (1..100).grep(*.is-prime).sum' # → 1060
echo 'say 42' | rakupp
rakupp program.raku
Cold start is about two milliseconds, so one-liners and shell glue feel like any other native tool. The same program in your browser, with nothing installed, is the playground.
The command line
The options worth knowing
| Option | What it does |
|---|---|
FILE · -e 'CODE' · stdin | Run a program from a file, a one-liner, or standard input |
-I <path> · -M <module> | Add a module search directory, or load a module first (both repeatable) |
-n -p -a -F<sep> | The perl one-liner family: line loop, autoprint, autosplit into @F — and they cluster, as in -lane |
-i[.ext] | With -n/-p: edit the argument files in place (-pi.bak keeps backups) |
--exe SRC -o OUT | Compile to a standalone native binary (also --bundle, --aot) |
--lint SRC | Static analysis without running: unused variables, unreachable code and more |
--profile[=FILE] | Routine-level wall-time profile after the run (.json for machine-readable) |
--highlight [SRC] | Syntax-highlight Raku to HTML (--html) or to the terminal (--ansi) |
-c · --ast SRC | Syntax-check only, or print the parsed AST |
--cpp SRC [-O] | Print the C++ that --exe transpiles to |
Flags are position-independent and cluster like perl's, so
rakupp -pi.bak -e '$_ = $_.subst("a", "b")' *.txt works as you
would hope. RAKUPP_PARALLEL=1 opts into true CPU parallelism for
start and worker threads. The full reference is
CLI.md.
The ecosystem
Modules
Raku++ reads the same store zef
populates, so a distribution installed once is picked up by use
with no further setup.
use JSON::Fast; # installed with `zef install JSON::Fast`
say to-json({ name => 'Ada' }, :!pretty); # {"name":"Ada"}
Your own files under lib/ are found too, as are
-I, RAKULIB and use lib paths. A
use that cannot be found, or fails to compile, is fatal — the
program stops rather than carrying on without the module. Fifty of the
fifty-nine distributions in the sample pass their own install-time test
suites; the guide is
MODULES.md.