All Projects → titzer → wizard-engine

titzer / wizard-engine

Licence: other
Research WebAssembly Engine

Programming Languages

WebAssembly
147 projects
shell
77523 projects

Projects that are alternatives of or similar to wizard-engine

Tagha
Minimal, low-level, fast, and self-contained register-based bytecode virtual machine/runtime environment.
Stars: ✭ 79 (-51.83%)
Mutual labels:  interpreter, virtual-machine
Tagha
Minimal, low-level, fast, and self-contained register-based bytecode virtual machine/runtime environment.
Stars: ✭ 101 (-38.41%)
Mutual labels:  interpreter, virtual-machine
Libforth
libforth: A small Forth interpreter that can be used as a library written in c99
Stars: ✭ 107 (-34.76%)
Mutual labels:  interpreter, virtual-machine
clox
A virtual machine and a tree-walk interpreter for the Lox programming language in C89 🌀
Stars: ✭ 38 (-76.83%)
Mutual labels:  interpreter, virtual-machine
Cub
The Cub Programming Language
Stars: ✭ 198 (+20.73%)
Mutual labels:  interpreter, virtual-machine
Seax
A VM-based runtime environment for functional programming languages
Stars: ✭ 36 (-78.05%)
Mutual labels:  interpreter, virtual-machine
Simple
The Simple Intelligent and Modular Programming Language and Environment
Stars: ✭ 120 (-26.83%)
Mutual labels:  interpreter, virtual-machine
Neko
The Neko Virtual Machine
Stars: ✭ 447 (+172.56%)
Mutual labels:  interpreter, virtual-machine
Go.vm
A simple virtual machine - compiler & interpreter - written in golang
Stars: ✭ 178 (+8.54%)
Mutual labels:  interpreter, virtual-machine
Lioness
The Lioness Programming Language
Stars: ✭ 155 (-5.49%)
Mutual labels:  interpreter, virtual-machine
LLVM-JVM
[W.I.P] A Just-In-Time Java Virtual Machine written in Haskell
Stars: ✭ 22 (-86.59%)
Mutual labels:  interpreter, virtual-machine
Arturo
Simple, expressive & portable programming language for efficient scripting
Stars: ✭ 225 (+37.2%)
Mutual labels:  interpreter, virtual-machine
Esta
Interpreted language and bytecode VM of my own design written in Rust [Unmaintained]
Stars: ✭ 28 (-82.93%)
Mutual labels:  interpreter, virtual-machine
Cymbal
Yet another Rust implementation of the Monkey language from "Writing an Interpreter in Go" and "Writing a Compiler in Go"
Stars: ✭ 49 (-70.12%)
Mutual labels:  interpreter, virtual-machine
Hashlink
A virtual machine for Haxe
Stars: ✭ 523 (+218.9%)
Mutual labels:  interpreter, virtual-machine
Quickjs
The official repo is at bellard/quickjs.
Stars: ✭ 1,429 (+771.34%)
Mutual labels:  interpreter, virtual-machine
Gravity
Gravity Programming Language
Stars: ✭ 3,968 (+2319.51%)
Mutual labels:  interpreter, virtual-machine
Ph7
An Embedded Implementation of PHP (C Library)
Stars: ✭ 422 (+157.32%)
Mutual labels:  interpreter, virtual-machine
Kivm
🌟This is a pure C++ implementation of Java Virtual Machine (only Java 8 is supported). Inspired by Hotspot In Action.
Stars: ✭ 137 (-16.46%)
Mutual labels:  interpreter, virtual-machine
Swift Lispkit
Interpreter framework for Lisp-based extension and scripting languages on macOS and iOS. LispKit is based on the R7RS standard for Scheme. Its compiler generates bytecode for a virtual machine. LispKit is fully implemented in Swift 5.
Stars: ✭ 228 (+39.02%)
Mutual labels:  interpreter, virtual-machine

Wizard: An advanced WebAssembly Engine for Research

The Wizard Engine is a lightweight WebAssembly virtual machine designed for teaching and research. Its implementation is designed to be flexible and easy to grasp, ideal for experimentation and modification. Built with the future in mind, it is written in a fast and lightweight safe, garbage-collected programming language, Virgil.

Features

Wizard supports Wasm standard features, including:

  • Wasm MVP features
  • Multi-values
  • Reference types
  • Bulk-memory operations
  • SIMD (wip)

Wizard fully supports these Wasm proposals:

  • Tail-call
  • GC
  • Multi-memory
  • Function References
  • Relaxed section order

Other features under development:

  • Type imports
  • Threads
  • Exception handling

Wizard can run testcases specified in the .bin.wast format, like the specification tests that are part of the Wasm spec repo and proposal repos. Wizard supports a small embedding environment suitable for running simple programs. WASI support in Wizard is a work in progress.

Supported Targets

Because Wizard is written in Virgil, it runs on all the targets that Virgil currently supports, including:

  • x86-darwin : 32-bit Darwin kernels (MacOS)
  • x86-linux : 32-bit Linux kernels
  • x86-64-linux : 64-bit Linux kernels
  • jar : JAR files for the Java Virtual Machine
  • wasm : WebAssembly module for any Wasm engine (!)

In fact, because Wizard can itself be compiled to Wasm, it fully self-hosts. This means that Wizard can run a copy of itself compiled to Wasm!

Wizard has special support on the x86-64-linux target, with a fast, hand-written interpreter, nearly 40x faster than the simple interpreter, and as fast as interpreter tiers in other engines.

Design and Implementation

Wizard is simple! As opposed to engines focused on performance, Wizard is just a few thousand lines of code. Instead, its architecture is focused on flexibility and readability, making it suitable for language and VM research.

Wizard is implemented in Virgil, a fast and lightweight programming language. Learning Virgil is easy; you can pick it up in no time! Using Virgil allows Wizard to compile to a single native binary of just a few hundred kilobytes. Development with Wizard is very quick turnaround, as a full production build takes less than a second. Virgil is garbage-collected, thus Wasm proposals such as GC reuse the collector of the underlying language, which keeps Wizard small and easy to understand.

Wizard is the first Wasm engine to do fast in-place interpretation of Wasm bytecode. Wizard currently has two interpreters:

  • an easy-to-read, straightforward interpreter which runs on all the supported targets
  • a fast interpreter in hand-written x86-64 assembly, which only runs on x86-64-linux

Both interpreters execute bytecode in-place (no code rewriting) for simplicity and low memory overhead. Later, Wizard will have a baseline compiler and optimization compiler, to match production engines' performance.

Documentation

The most up-to-date documentation is, as always, the implementation in this repository!

See the Design for a closer look at Wizard's internals.

Read how to Build and Test Wizard.

Read how to use tracing options in Wizard.

Research Projects

Currently, Wizard supports three closely related research projects:

  • Generalized import system: a Wasm extension for expressing source-level constructs in Wasm
  • Jawa: a Java virtual machine runtime system implementation using the generalized import sytsem
  • Fast-int: the fast, in-place interpreter for Wasm

License

Licensed under the Apache License, Version 2.0. (rt/LICENSE or https://www.apache.org/licenses/LICENSE-2.0)

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].