All Projects → eatonphil → lust

eatonphil / lust

Licence: other
A parser, compiler, and virtual machine evaluator for a minimal subset of Lua; written from scratch in Rust.

Programming Languages

rust
11053 projects
lua
6591 projects

Projects that are alternatives of or similar to lust

X11Basic
X11-Basic BASIC programming language.
Stars: ✭ 42 (-65%)
Mutual labels:  interpreter, virtual-machine
minima
A fast, byte-code interpreted language
Stars: ✭ 43 (-64.17%)
Mutual labels:  interpreter, virtual-machine
openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,973 (+2377.5%)
Mutual labels:  interpreter, virtual-machine
Laythe
A gradually typed language originally based on the crafting interpreters series
Stars: ✭ 58 (-51.67%)
Mutual labels:  interpreter, virtual-machine
Arduino-FVM
Byte Token Threaded Forth Virtual Machine (FVM) for Arduino
Stars: ✭ 35 (-70.83%)
Mutual labels:  interpreter, virtual-machine
embed
An embeddable, tiny Forth interpreter with metacompiler.
Stars: ✭ 80 (-33.33%)
Mutual labels:  interpreter, virtual-machine
jaws
Jaws is an invisible programming language! Inject invisible code into other languages and files! Created for security research -- see blog post
Stars: ✭ 204 (+70%)
Mutual labels:  interpreter, virtual-machine
wizard-engine
Research WebAssembly Engine
Stars: ✭ 164 (+36.67%)
Mutual labels:  interpreter, virtual-machine
ol
Otus Lisp (Ol in short) is a purely* functional dialect of Lisp.
Stars: ✭ 157 (+30.83%)
Mutual labels:  interpreter, virtual-machine
RSqueak
A Squeak/Smalltalk VM written in RPython.
Stars: ✭ 78 (-35%)
Mutual labels:  interpreter, virtual-machine
hematita
A memory safe Lua interpreter
Stars: ✭ 118 (-1.67%)
Mutual labels:  interpreter, virtual-machine
jingle
🔔 Jingle is a dynamically-typed, multi-paradigm programming language designed for humans and machines.
Stars: ✭ 34 (-71.67%)
Mutual labels:  interpreter, virtual-machine
ciao
Ciao is a modern Prolog implementation that builds up from a logic-based simple kernel designed to be portable, extensible, and modular.
Stars: ✭ 190 (+58.33%)
Mutual labels:  interpreter, virtual-machine
lunatic
lunatic: a toy lua interpreter
Stars: ✭ 16 (-86.67%)
Mutual labels:  interpreter, virtual-machine
Freeze-OS
An Operating System that runs on top of an interpreter.
Stars: ✭ 24 (-80%)
Mutual labels:  interpreter, virtual-machine
thislang
A subset of javascript implemented in that subset of javascript. Yes, it can run itself.
Stars: ✭ 31 (-74.17%)
Mutual labels:  interpreter, virtual-machine
LLVM-JVM
[W.I.P] A Just-In-Time Java Virtual Machine written in Haskell
Stars: ✭ 22 (-81.67%)
Mutual labels:  interpreter, virtual-machine
Tagha
Minimal, low-level, fast, and self-contained register-based bytecode virtual machine/runtime environment.
Stars: ✭ 101 (-15.83%)
Mutual labels:  interpreter, virtual-machine
clover2
Clover2 can be used as shell. The completion is powerfull like IDE. Also clover2 is a Ruby-like compiler language with static type like Java. This is high performnace. Please see the wiki for details
Stars: ✭ 100 (-16.67%)
Mutual labels:  interpreter, virtual-machine
Animach
Scheme语言实现和运行时环境 / A Scheme runtime & implementation
Stars: ✭ 45 (-62.5%)
Mutual labels:  interpreter, virtual-machine

lust: Lua in Rust

This project implements a parser, compiler, and virtual machine evaluator for a minimal subset of Lua. It is written from scratch in Rust.

See the companion blog post, Writing a minimal Lua implementation with a virtual machine from scratch in Rust , for a guided walkthrough of the code.

Example

$ cargo build --release
$ cat test/fib.lua
function fib(n)
   if n < 2 then
      return n;
   end

   local n1 = fib(n-1);
   local n2 = fib(n-2);
   return n1 + n2;
end

print(fib(30));
$ time ./target/release/lust test/fib.lua
832040
./target/release/lust test/fib.lua  0.29s user 0.00s system 99% cpu 0.293 total
$ time lua test/fib.lua
832040
lua test/fib.lua  0.06s user 0.00s system 99% cpu 0.063 total

More examples

See the test directory.

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