All Projects → MoarVM → Moarvm

MoarVM / Moarvm

Licence: other
A VM with adaptive optimization and JIT compilation, built for Rakudo

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Moarvm

neos
Language agnostic scripting engine with a custom bytecode JIT
Stars: ✭ 36 (-93.3%)
Mutual labels:  vm, jit
Suravi
Suravi is a small distribution of Ravi/Lua 5.3 with batteries such as cjson, lpeglabel, luasocket, penlight, torch7, luv, luaossl
Stars: ✭ 56 (-89.57%)
Mutual labels:  jit, libuv
Zetavm
Multi-Language Platform for Dynamic Programming Languages
Stars: ✭ 592 (+10.24%)
Mutual labels:  jit, vm
go-jdk
Run JVM-based code in Go efficiently
Stars: ✭ 61 (-88.64%)
Mutual labels:  vm, jit
qemujs
Qemu.js source code with proof-of-concept machine-code-to-WASM JIT.
Stars: ✭ 101 (-81.19%)
Mutual labels:  vm, jit
wazero
wazero: the zero dependency WebAssembly runtime for Go developers
Stars: ✭ 2,065 (+284.54%)
Mutual labels:  vm, jit
Avr Vm
VM with JIT-compiler for ATMega32 written in Rust
Stars: ✭ 106 (-80.26%)
Mutual labels:  jit, vm
RSqueak
A Squeak/Smalltalk VM written in RPython.
Stars: ✭ 78 (-85.47%)
Mutual labels:  vm, jit
kcs
Scripting in C with JIT(x64)/VM.
Stars: ✭ 25 (-95.34%)
Mutual labels:  vm, jit
Opensmalltalk Vm
Cross-platform virtual machine for Squeak, Pharo, Cuis, and Newspeak.
Stars: ✭ 345 (-35.75%)
Mutual labels:  jit, vm
Ilgpu
ILGPU JIT Compiler for high-performance .Net GPU programs
Stars: ✭ 374 (-30.35%)
Mutual labels:  jit
Deep Into Node
深入理解Node.js:核心思想与源码分析
Stars: ✭ 4,005 (+645.81%)
Mutual labels:  libuv
Luv
Bare libuv bindings for lua
Stars: ✭ 466 (-13.22%)
Mutual labels:  libuv
Luago Book
《自己动手实现Lua》随书源代码
Stars: ✭ 514 (-4.28%)
Mutual labels:  vm
Firebird
Third-party multi-platform emulator of the ARM-based TI-Nspire calculators
Stars: ✭ 374 (-30.35%)
Mutual labels:  jit
Tinyrb
A tiny subset of Ruby with a Lua'esc VM
Stars: ✭ 452 (-15.83%)
Mutual labels:  vm
Dora
Dora VM
Stars: ✭ 371 (-30.91%)
Mutual labels:  jit
Codegen
Experimental wrapper over LLVM for generating and compiling code at run-time.
Stars: ✭ 362 (-32.59%)
Mutual labels:  jit
Easy Just In Time
LLVM Optimization to extract a function, embedded in its intermediate representation in the binary, and execute it using the LLVM Just-In-Time compiler.
Stars: ✭ 361 (-32.77%)
Mutual labels:  jit
Wasmtime
Standalone JIT-style runtime for WebAssembly, using Cranelift
Stars: ✭ 6,413 (+1094.23%)
Mutual labels:  jit

MoarVM

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, but should be able to serve as a backend for any compilers built using the NQP compiler toolchain.

Get It

Either download it from the MoarVM site or clone it from GitHub:

git clone https://github.com/MoarVM/MoarVM.git

If you use the automatically generated release tarballs or zip files please note that they don't contain the third party libraries needed to successfully build MoarVM.

Build It

Build Status Build Status Build Status

Building and installing the VM itself takes just:

perl Configure.pl
make install

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

Type perl Configure.pl --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 Configure.pl script in it like so:

perl Configure.pl --backend=moar --prefix=where_your_moarvm_install_lives

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

Please bear in mind that this will be the prefix to the /bin, /lib and other directories where the moar executable and other files are going to be installed, so you'll have to use /usr if you want moar to be copied to /usr/bin.

Building a Rakudo with MoarVM

When pointing the Configure.pl 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,jvm can be used to force it to build the MoarVM and JVM backends, for example. Just like in the NQP Configure.pl script, you have the option to supply a --gen-moar flag that will do all the work for you, including creating an nqp-m.

Status

MoarVM is currently in development. It can run all of the NQP test suite, all of the Rakudo sanity tests, and passes more spectests than any other Rakudo backend (though some backends pass tests that it does not).

Unlike the JVM backend of NQP, the MoarVM repo is not currently planned to be integrated into the main NQP source repo http://github.com/perl6/nqp but instead can be pulled in by Configure.pl --gen-moar configure script in the NQP repo.

Feature overview

Some key features provided by MoarVM include:

  • Meta-object programming, using the 6model design
  • Precise, generational, and parallel GC
  • Unicode 13.1 support (Unicode Character Database, encodings, normalization)
  • First-class code objects, lexical variables and closures
  • Exceptions
  • Continuations
  • Bounded serialization
  • Runtime loading of code
  • Big integers
  • A range of IO and process support, including asynchronous sockets, signals, timers, and processes
  • Native calling and native pointer manipulation
  • Threads, mutexes, condition variables, semaphores, and blocking queues
  • Bytecode specialization by type, and numerous optimizations (including resolution of method calls and multiple dispatch, dead code elimination, inlining, on stack replacement, scalar replacement, and partial escape analysis)
  • JIT compilation
  • Instrumentation-based profiling of call frames and allocations
  • Heap snapshotting
  • Remote Debugging with single stepping and variable/object introspection

Contributing

Contributions by pull request are accepted. Commit bits are given to those who contribute quality work. If you are interested in contributing, drop by the #moarvm channel on freenode.org, or email [email protected] 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.

Troubleshooting

Linker can't find appropriate symbols on macOS

If MoarVM fails to build, and the error looks something like this:

ld: symbol(s) not found for architecture x86_64

you likely have an incompatible mix of build and bin utils.

While it is common to have toolchains installed from third party repositories in macOS, they aren't all compatible. In the event you run into this issue, please try these steps.

  1. Unlink your tools in homebrew: brew unlink binutils
  2. Destroy and re-clone MoarVM or rakudobrew
  3. Attempt the build again from scratch

If you want to use a GNU toolchain, and you get an error telling you to see this file, simply supply the --toolchain=gnu flag and this package will configure and build with a GNU toolchain.

Please note: If you use mixed Xcode and non-Xcode tools, you are likely to run into trouble. As such, this configuration is unsupported.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].