Rakudo

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.

Rakudo is a compiler that implements the Raku programming language. Rakudo targets Raku's native virtual machine MoarVM as well as the Java and JavaScript virtual machines.

Installation

Note
While installation and uninstallation of Rakudo is reliable, reinstallation can occasionally fail. If that happens just uninstall dev-lang/rakudo and install it again. This issue is being tracked via bug #584394.

USE flags

USE flags for dev-lang/rakudo A compiler for the Raku programming language

clang Use Clang to compile the MoarVM backend
java Add support for Java
moar Use the MoarVM as backend
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)

Emerge

Emerge the package base

root #emerge --ask dev-lang/rakudo

Configuration

Environment variables

Module loading

  • RAKUDOLIB (str) a comma-delimited path list for Raku modules.
  • RAKUDO_MODULE_DEBUG (bool) If true, extra debugging information is sent to STDERR.

Error handling

  • RAKU_EXCEPTIONS_HANDLER (str) define the exception handling class, defaults to Exceptions::JSON if undefined.
  • RAKUDO_NO_DEPRECATIONS (bool) If true, suppresses warnings when deprecated language features are used.
  • RAKUDO_DEPRECATIONS_FATAL (bool) If true, use of deprecated language features become fatal errors.
  • RAKUDO_VERBOSE_STACKFRAME (int) If true, provides stack frame information for debugging purposes out to a maximum specified number of lines of context.
  • RAKUDO_BACKTRACE_SETTING (bool) If true, .setting files are included in stack traces.

Precompilation

  • RAKUDO_PREFIX (str) When set, this will cause Raku to look for module repositories in a specified alternative location.
  • RAKUDO_LOG_PRECOMP (bool) If true, diagnostic information is emitted regarding Raku's precompilation process.

Line editor

  • RAKUDO_LINE_EDITOR (str) When set, this specifies the default line editor for Raku to use. When set to none Raku will not complain about the absence of a line editor. Currently, either Readline or Linenoise are expected values.
  • RAKUDO_DISABLE_MULTILINE (bool) disable multi-line input when Raku is in interactive mode.
  • RAKUDO_HIST (str) specifies the location of Raku's line editor history.

Miscellaneous

  • RAKUDO_OPT (str) set default command line options.
  • RAKUDO_DEFAULT_READ_ELEMS (int) When set, this defines the number of characters read by an IO::Handle.
  • RAKUDO_ERROR_COLOR (bool) Controls whether compiler error output is color coded or not; defaults to true in POSIX environments.
  • RAKUDO_MAX_THREADS (int) Controls the maximum number of threads created by ThreadPoolScheduler; default 64.
  • TMPDIR (str) When set IO::Spec::Unix.tmpdir uses the specified alternative temporary directory; defaults to /tmp.
  • RAKUDO_SNAPPER (float) Specifies the interval between virtual machine state snapshots created locally by the Rakudo compiler's telemetry class. This defaults to 0.1 or 10 snapshots per second.
  • RAKUDO_HOME (str) override Raku's installation path.
  • NQP_HOME (str) override NQP's installation path.

Files

  • ~/.raku/rakudo-history Raku's history file used by the line editor when Raku is run interactively.

Removal

Unmerge

root #emerge --ask --depclean --verbose dev-lang/rakudo

See Also

  • Raku — a high-level, general-purpose, and gradually typed programming language.
  • NQP — a lightweight Raku-like environment for MoarVM, JVM, and other virtual machines.
  • MoarVMRakudo compiler's virtual machine for the Raku Programming Language.
  • Zef
  • Perl — a general purpose interpreted programming language with a powerful regular expression engine.

External Resources