Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 1.03 KB

README.md

File metadata and controls

18 lines (16 loc) · 1.03 KB

Luar — an attempt to make an optimizing lua compiler

The project consists of several crates:

  • lex houses the lexer and lexing constructs, such as StringLiteral, NumberLiteral and Ident
  • syn contains the parser and language constructs definition as rust structs
  • error a hierarchy of error types common in different lua runtimes
  • ast_vm a runtime that executes AST coming directly from the parser (syn)
  • reggie a register based VM and an optimizing compiler
  • non_empty a Vec that cannot be empty
  • test_util just a few helper structs/functions for testing
  • tests integration tests and benchmarks

Running the thing

  • cargo run --bin reggie to launch REPL of register based VM (relevant version)
  • cargo run --bin reggie <filename> to execute file in register based VM
  • cargo run --bin reggiec will compile lua module from stdin and display internal bytecode and metadata
  • cargo run --bin ast_vm to launch REPL of AST interpretor
  • cargo run --bin ast_vm <filename to execute file in AST interpretor