Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 609 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 609 Bytes

mochi

build

Lua runtime implemented in Rust

Features

  • Bytecode VM compatible with PUC-Rio Lua 5.4
  • Lexer and parser
  • AST to bytecode compiler
  • Incremental mark-and-sweep garbage collection
  • Standard library implementation

Usage

# run script
cargo run foo.lua bar baz

# launch REPL
cargo run

# compile source code with mochi
cargo run compile foo.lua -o luac.out
# and run bytecode with PUC-Rio Lua
lua luac.out

# and vice versa
luac -o luac.out foo.lua
cargo run luac.out