Virtual Machines differ from platforms in that a virtual machine may form the core of a platform. Virtual machines typically provide an environment for executing code (either a bytecode set unique to the VM or, in rare cases, compiled machine code) and often provide a set of services to that executing code, such as code-loading, execution access control and security, garbage collection, metadata access, and so on.
VM Implementation Reading
Crafting Interpreters
"A Virtual Machine for Functional Logic Computation"
Bytecode
See http://www.complang.tuwien.ac.at/forth/threaded-code.html for an introduction to threading techniques, including a performance comparison at http://www.complang.tuwien.ac.at/forth/threading/
Stack-based vs Register-based
This is often abstract variations of the register-vs-stack debate that CPUs engage in; generally a VM will either be entirely stack-based (using a virtual stack that may or may not correspond to the real stack), or entirely register-based (though often a stack is still present in a register VM, for other purposes).
Garbage collection
Much of this is going to be found in the reading on memory management. VMs typically offer some form of automatic memory management, since they can slightly intervene around raw pointer references and add either additional bookkeeping or indirection or "pointer fixups" to allow for objects to move around in memory w/o programmer awareness/knowledge.
Tutorials
Creating a VM/Compiler
Building a toy JVM
Virtual machine in C ("felix.engineer"): six-register and stack
Terrence Parr: Simple Virtual Machine: Video and slides
Basic cpu: a register-based virtual machine in c | How to build a virtual machine from scratch | Create your own stack machine | Build your own virtual machine - Lexer | Build your own virtual machine - assembler | Build your own virtual machine - Finish the assembler | Build your own virtual machine - Finish up --all by Philip Bohun who has some additional videos
Simple Object Machine: A minimal Smalltalk for teaching of and research on Virtual Machines. Implementations:
Sites
Awesome Open Source: Top 137 Virtual Machine Open Source Projects
Awesome WASM runtimes
GitHub search for "virtual machine":
Detail Pages:
- 3BC-Lang Low-level language, tiny virtual machine, intermediate representation, embeddable, easy for beginners.
- aamachine A virtual machine for delivering interactive stories.
- ActionScript VM Actionscript virtual machine.
- Afnix A multi-threaded functional writing system with dynamic symbol bindings that support the object oriented paradigm. The system features a state of the art runtime engine that supports both 32 and 64 bits platforms.
- AIR A cross-platform framework used by a wide range of applications and games.
- Apache.org The Apache site is a collection of numerous open-source projects, in all stages of life (incubating, maintained, archived).
- AquaVM Executes compiled Aqua, i.e., Aqua Intermediate Representation (AIR) scripts, and plays an integral role in the implementation of the Fluence peer-to-peer compute protocol; specifically, AquaVM allows expressing network choreography in scripts and composing distributed, peer-to-peer hosted services.
- ArkScript A small, fast, functional and scripting language for C++ projects.
- ART (Android RunTime) The VM engine for the Android platform that replaced Dalvik around Android 5/6.
- Arturo A "no-syntax" language running on top of a bytecode-VM.
- Atom A programmable, register based virtual machine for Win32 computers.
- Avian A lightweight virtual machine and class library designed to provide a useful subset of Java's features, suitable for building self-contained applications.
- aWsm A compiler and runtime for compiling WebAssembly into LLVM, then into sandboxed binaries.
- BEAM VM Erlang virtual machine low-level details
- BIPLAN (Byte coded Interpreted Programming LANguage) An experimental compact programming language and virtual machinethat fits in less than 12KB of program memory and is implemented in less than 2000 lines of code.
- Bochs A portable IA-32 and x86-64 IBM PC compatible emulator and debugger mostly written in C++; it supports emulation of the processor, memory, disks, display, Ethernet, BIOS and common hardware peripherals of PCs.
- Build-Your-Own-X A collection of links on how to build various things as a learning exercise.
- Bytecode Alliance A nonprofit organization dedicated to creating secure new software foundations, building on standards such as WebAssembly and WebAssembly System Interface (WASI).
- C4 (C in Four Functions) C implementation, in four functions.
- Charly Fully parallel dynamically typed programming language.
- Chicory Native JVM WebAssembly runtime.
- CLR A stack-based bytecode virtual machine.
- CLR FFI A collection of notes and links on .NET/CLR platform interop and native bindings.
- CLR Interoperability Links for the interoperability between the Common Language Runtime (CLR) and other platforms.
- CLR Specifications Specification links for the Common Language Runtime (CLR).
- CLR virtual machine/execution engine specifications A collection of the specifications for the runtime of the CLR platform.
- CMM of WASM A compiler from WebAssembly to native code, via the OCaml backend.
- CoCo A virtual machine based on the Python virtual machine.
- Common Language Runtime (CLR) The execution engine and supporting structure for .NET programs.
- CoreCLR The VM implementation of .NET Core
- Core War A reproduction of the Core War game. Assembly compiler, Virtual Machine and GUI.
- CPython The original, "standard", C-based implementation of the Python language/platform.
- CPython VM The CPython virtual machine.
- Dalvik The virtual machine created for execution on Android devices.
- Dart An open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
- Dg A (technically) simple language that compiles to CPython bytecode.
- Dis The virtual machine behind the Limbo programming language for the Inferno operating system.
- Dolphin Smalltalk Dolphin Smalltalk language, vm, etc.
- DolphinVM Dolphin Smalltalk virtual machine.
- Dotnet Core CLR Open-source implementation of the CLR.
- Ecstasy (XTC) An object-ish language designed to be cloud native from the ground up.
- Emulators written in JavaScript A list of emulators written in the JavaScript programming language.
- Event Processing Language (EPL) A language, compiler, and runtime for complex event processing (CEP) and streaming analytics.
- Extism Goal is to make all software programmable, and is a flexible, embedded runtime to make it easy to extend your software with WebAssembly.
- FDVM WASM runtime to develop server-side WebAssembly applications.
- Fizzy Aims to be a fast, deterministic, and pedantic WebAssembly interpreter written in C++.
- Free Programming Books A collection of free learning resources (books).
- Game Boy (Emulator/VM) A collection of links and articles on the Game Boy handheld game device.
- Glulx An interpreter for interactive fiction games written in Inform7.
- GNU MIX Development Kit (MDK) MIX is Donald Knuth's mythical computer as described in his monumental work The Art Of Computer Programming. As any of its real counterparts, the MIX features registers, memory cells, an overflow toggle, comparison flags, input-output devices, and a set of binary instructions executable by its virtual CPU.
- GNU Smalltalk The FSF implementation of the Smalltalk language/platform.
- GraalVM Polyglot VM from Oracle with support for a number of languages/platforms.
- Happy New Moon with Report An open-source implementation of WebAssembly written entirely in Java. It is used to run or test Web Assembly Modules (*.wasm) in Java.
- HashLink Virtual machine target for the Haxe programming language.
- Hercules An open source software implementation of the mainframe System/370 and ESA/390 architectures, in addition to the latest 64-bit z/Architecture.
- Hermes A Javascript engine specifically for use by React Native.
- HHVM A virtual machine for executing programs written in Hack.
- HiggsJS VM Higgs JavaScript Virtual Machine. A JIT compiler for JavaScript targetting x86-64 platforms.
- HLVM High-Level Virtual Machine for statically-typed functional languages.
- HVM A pure functional compile target that is lazy, non-garbage-collected and massively parallel. It is also beta-optimal, meaning that, in several cases, it can be exponentially faster than most functional runtimes, including Haskell's GHC.
- IKVM A Java Virtual Machine and Bytecode-to-IL Converter for .NET.
- inNative An AOT (ahead-of-time) compiler for WebAssembly that creates C compatible binaries, either as sandboxed plugins you can dynamically load, or as stand-alone executables that interface directly with the operating system.
- Java/JVM Platform The platform originally built by Sun for the Java programming experience, now expanded to include a number of languages, a ton of enterprise specifications, and hundreds if not thousands of popular libraries.
- Java Concurrency in Practice Goetz's seminal work on how concurrency works and operates on the JVM.
- Java Virtual Machine (JVM) The execution engine and supporting structure for Java programs.
- Jikes RVM A flexible open testbed to prototype virtual machine technologies and experiment with a large variety of design alternatives. Jikes RVM runs on many platforms and advances the state-of-the-art of virtual machine technologies for dynamic compilation, adaptive optimization, garbage collection, thread scheduling, and synchronization. It is self-hosted, i.e. its Java code runs on itself without requiring a second virtual machine. Most other virtual machines for the Java platform are written in native code (typically C or C++). A Java implementation provides ease of portability and a seamless integration of virtual machine and application resources such as objects, threads, and operating-system interfaces.
- JPC (Java PC) JPC is a fast modern x86 PC emulator capable of booting Windows up to Windows 95 (and windows 98 in safe mode) and some graphical linuxes; it has a full featured graphical debugger with time travel mode along with standard features like break and watch points.
- JVM FFI A collection of links and notes around JVM foreign function interface and native bindings.
- JVM Specifications Specification links for the Java Virtual Machine (JVM).
- Jython Python implementation on the JVM.
- liblg Minimal stack-based VM.
- liblg Minimal stack-based VM.
- Life A secure & fast WebAssembly VM built for decentralized applications.
- LLJVM (Low Level Java Virtual Machine) A set of tools and libraries for running comparatively low level languages (such as C) on the JVM.
- LLVM A compiler and back-end native compilation/linking toolchain.
- Lua VM Implementation docs and notes for the Lua virtual machine.
- Lucet A native WebAssembly compiler and runtime designed to safely execute untrusted WebAssembly programs inside your application.
- Magpie A small dynamically-typed programming language built around patterns, classes, and multimethods. It has a prototype interpreter that runs on the JVM and an in-progress bytecode VM written in C++.
- Mako A simple virtual game console
- MAME A multi-purpose "vintage" software emulation framework.
- Maxine-VM A meta-circular research VM; a next generation, highly productive platform for virtual machine research..
- MedusaVM Aims at running pre-existing Python code without any or minimal modification at a much faster rates compared to the usual implementations by leveraging Dart and the DartiumVM.
- Memory Management and Garbage Collection (reading and references) Papers, books, and thoughts around manual and automatic memory management (GC).
- miniVM A small and fast cross-language Virtual Machine (VM) written in good ol' C, meaning it can compile and run just about anywhere.
- MLIR A hybrid IR which can support multiple different requirements in a unified infrastructure.
- MoarVM A VM with adaptive optimization and JIT compilation, built for Rakudo
- Motor A WebAssembly runtime which aims for secure and efficient execution of WebAssembly programs.
- MRI (Matz's Ruby Interpreter) The original fully-interpreted Ruby VM.
- Mun A programming language empowering creation through iteration.
- NanoVM A java virtual machine for the Atmel AVR ATmega8 CPU, the member of the AVR CPU family used e.g. in the DLR Asuro robot, manufactured by AREXX engineering.
- NanoVM A really tiny Java Virtual Machine.
- Neko (Language) A high-level dynamically typed programming language and virtual machine.
- Neko (VM) The NekoVM is a target for several compilers, including Haxe.
- Newspeak A language in the tradition of Self and Smalltalk, dynamic and reflective, but designed to support modularity and security.
- OMR Reliable components for building language runtimes.
- OpenJDK JVM A collection of links and reading specific to the OpenJDK.
- Open Smalltalk Cross-platform virtual machine for Squeak, Pharo, Cuis, and Newspeak.
- Papers We Love A collection of academic papers gathered by a popular "user group" dedicated to reading through them.
- Parrot Virtual machine implementation for Perl and other dynamic languages.
- Passerine A small, concise, extensible functional scripting language, powered by a VM written in Rust.
- Pawn A curly-brace language with a small-footprint VM. Represents data as 4/8-byte "cells". Compiles to CPU-specific bytecode.
- PearPC An architecture-independent PowerPC platform emulator capable of running many PowerPC operating systems, including pre-Intel versions of Mac OS X, Darwin and Linux.
- Pharo A dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
- Pixie A small, fast, native lisp with "magical" powers.
- PL/0 Language Tools An implementation of PL/0 including a tree-based interpreter and virtual machine.
- PLZoo (Programming Languages Zoo) The Programming Languages Zoo is a collection of miniature programming languages which demonstrates various concepts and techniques used in programming language design and implementation.
- Pocketlang A lightweight, fast, embeddable scripting language.
- Potion An object- and mixin-oriented (traits) language by _why the lucky stiff.
- Programming Dojo This site was designed to improve the awareness of different programming languages.
- Puter Cloud-hosted OS-like platform.
- PyPy A replacement for CPython, built using the RPython language that was co-developed with it.
- Python VMs Overview of different Python virtual machines/interpreters.
- py-wasm A python implementation of the WebAssembly interpreter.
- Q (Scripting Language) Q is a scripting engine that implements C-like language, compiler, and bytecode interpreter.
- q3vm Single file (vm.c) bytecode virtual machine/interpreter for C-language input.
- Reactive Streams An initiative to provide a standard for asynchronous stream processing with non-blocking back pressure. This encompasses efforts aimed at runtime environments (JVM and JavaScript) as well as network protocols.
- Reading about Virtual Machines A collection of interesting links and reading on VM-related topics.
- Reading in software A collection of links and articles on software and development.
- Redline Smalltalk Smalltalk implementation for the JVM.
- RPython A translation and support framework for producing implementations of dynamic languages, emphasizing a clean separation between language specification and implementation aspects.
- Rubinius A modern language vm that supports a number of programming languages.
- S4 A minimal and extendable stack machine VM/CPU
- SaberVM A VM intended to be openly targeted by functional language compilers.
- Salt Compilation target that functional programmers always wanted.
- Scratch VM Virtual Machine used to represent, run, and maintain the state of programs for Scratch 3.0.
- ScummVM Classic VM environment for running graphical point-and-click adventure games and RPGs.
- Seax A VM-based runtime environment for functional programming languages.
- SECD machine A highly influential virtual machine and abstract machine intended as a target for functional programming language compilers.
- Self An object-oriented programming language based on the concept of prototypes.
- Simple Object Machine A minimal Smalltalk for teaching of and research on Virtual Machines.
- Smalltalk The original object-oriented programming language, emphasizing multiple inheritance and message-passing.
- SmallVM A small, simulated virtual machine with a 32-bit instruction set. It also comes with a simple programming langauge called G, which has a modern Go language-like syntax (almost a strict subset), and a C-like semantics and runtime.
- SPIM An assembly language MIPS32 simulator.
- Squeak Open-source Smalltalk system.
- Squeak VM The VM for the Squeak implementation of Smalltalk.
- SSCLI Essentials by Stutz, Shilling, Pobar and myself on the Shared Source CLI, the predecessor to the .NET Core CLR.
- STABLE An extreme small an fast FORTH-VM
- Strongtalk A bytecode-based virtual machine that formed the core of the modern JVM.
- SushiVM A JIT-enabled virtual machine and scripting interpreter.
- Swam WebAssembly engine in Scala.
- TADS Authoring system for writing Interactive Fiction.
- TeaVM Compiles Java bytecode to JavaScript, WebAssembly and C
- TopazRuby A high performance Ruby, written in RPython
- TornadoVM A practical and efficient heterogeneous programming framework for managed languages; an open-source software technology that automatically accelerates Java programs on multi-core CPUs, GPUs, and FPGAs.
- Tovie An Advanced Programming Language (Compiler + Interpreter + Transpiler ).
- Turing Imperative possibly object-oriented language and environment.
- TWVM A tiny and efficient WebAssembly virtual machine.
- Typhon A virtual machine for the Monte programming language.
- V8 Bytecode virtual machine for Javascript.
- vm86 A x86 script instruction virtual machine.
- VMIR (Virtual Machine for Intermediate Representation) A standalone library written in C that can parse and execute WebAssembly (.wasm) files and LLVM Bitcode (.bc) files; optionally it can generate machine code (JIT) to speed up execution significantly.
- Waba (JVM) A small, efficient and reliable Java Virtual Machine (VM) aimed at portable devices (but also runnable on desktop computers), written by Rick Wild of Wabasoft.
- WAC A Minimal WebAssembly interpreter written in C.
- Wagon A WebAssembly-based interpreter in Go, for Go.
- WaKit A WebAssembly runtime written in Swift.
- WAMR (WebAssembly Micro-Runtime) a lightweight standalone WebAssembly (WASM) runtime with small footprint, high performance and highly configurable features.
- Warpy WebAssembly interpreter in RPython.
- WASM3 A high performance WebAssembly interpreter.
- WasmEdge A lightweight, high-performance, and extensible WebAssembly runtime for cloud native, edge, and decentralized applications.
- Wasmer A standalone WebAssembly runtime for running WebAssembly outside of the browser, supporting WASI and Emscripten.
- Wasmi A Wasm interpreter.
- Wasmo
- WasmRT A runtime built for native execution of WebAssembly modules (virtualized at first, eventually JIT).
- Wasmtime A standalone wasm-only runtime for WebAssembly, using the Cranelift JIT.
- wasmvm WebAssembly Virtual Machine, which aim to fit embedded systems.
- WasmVM An unofficial standalone WebAssembly process virtual machine.
- Wasp Lisp A member of the Lisp-1 family, borrowing principles from R5RS Scheme, Python and Erlang. It is a pragmatic language, designed to provide developers with tools to rapidly build network applications that require sophisticated logic and quick turnarounds between prototype and production.
- Wazero A WebAssembly 1.0 and 2.0 spec compliant runtime written in Go, with zero platform dependencies.
- webassembly An experimental, minimal toolkit and runtime on top of node to produce and run WebAssembly modules.
- WebAssembly Virtual Machine WebAssembly virtual machine designed for use in non-web applications.
- Wizard Research WebAssembly Engine.
- YARV (Yet Another Ruby VM) The successor to the original Ruby VM (MRI).
- YASL (Yet Another Scripting Language) A scripting language implementation.
- Zetavm Multi-Language Platform for Dynamic Programming Languages.
- Z-machine A specification and numerous engines for Infocom interactive fiction.
Last modified 22 November 2024