Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

76 lines (54 sloc) 2.763 kb


MoarVM (short for Metamodel On A Runtime Virtual Machine) is a runtime built for the 6model object system. It is primarily aimed at running NQP and Rakudo Perl 6, but should be able to serve as a backend for any compilers built using the NQP compiler toolchain.

Build It

Building the VM itself takes just:


(Or nmake on Windows). Currently it is known to build on Windows with MSVC, with gcc and clang on Linux & MacOS X. We're expanding this with time.

Type perl --help to see the configure-time options, as well as some descriptions of the make-time options/targets.

Building an NQP with MoarVM

After installing MoarVM, you can clone the NQP repository or grab a source tarball and use the script in it like so:

perl --backend=moar --prefix=where_your_moarvm_install_lives

Alternatively, the same script in NQP is able to clone, build and install a copy of MoarVM on its own if you supply the --gen-moar flag.

Building a Rakudo with MoarVM

When pointing the script in rakudo's repository at a --prefix that has an nqp-m installed in it, it will automatically detect and configure the MoarVM backend. Alternatively, --backend=moar,parrot can be used to force it to build the MoarVM and Parrot backends, for example. Just like in the NQP script, you have the option to supply a --gen-moar flag that will do all the work for you, including creating an nqp-m.


MoarVM is currently in development. It can run all of the NQP test suite, all of the Rakudo sanity tests, and >99% of the spectests that the current leading Rakudo backend (the JVM) can.

Unlike the JVM backend of NQP, the MoarVM repo is not currently planned to be integrated into the main NQP source repo but instead can be pulled in by --gen-moar configure script in the NQP repo, same as it can --gen-parrot.

Feature overview

Some key features provided by MoarVM include:

  • Meta-object programming, using the 6model design
  • Precise, generational GC
  • Unicode support
  • First-class code objects, lexical variables and closures
  • Exceptions
  • Continuations
  • Bounded serialization
  • Code generation from MAST (MoarVM AST)
  • Runtime loading of code
  • Big integers
  • A range of IO and process support
  • Basic threads


Contributions by pull request are accepted. If you are interested in commit access so you can contribute more easily, drop by the #moarvm channel on, or email if you're averse to IRC.

See the LICENSE file in the root directory for information on the license of the source code in the MoarVM repository.

Jump to Line
Something went wrong with that request. Please try again.