In development

LuaTier

A modern Lua runtime with tiered execution

Built from scratch in C++17 with Lua 5.3+ support. Bytecode interpretation, offline AOT and optional tracing JIT, independently developed from LuaJIT.

Lua 5.3+
Language version
C++17
Built from scratch
Three tiers
Interpreter / AOT / JIT
MIT
Open-source license

Execution architecture

Tiered execution: interpretation by default, offline AOT for hot paths, and provision for tracing JIT.

📜

Bytecode interpreter

The frontend handles lexing, parsing, semantic analysis and LBC lowering. The VM executes custom bytecode and exposes a Lua-compatible C API.

🛠️

Offline AOT

Compile hot functions ahead of time to reduce interpretation overhead and optimize performance paths before release.

🔥

Tracing JIT

Hotness tracking, inline caches and baseline / opt / deopt scaffolding are in place. JIT is optional.

🧪

Differential testing

Alongside unit tests, compare against Lua 5.3.6 with an oracle and stress switches for GC, deoptimization and inline caches.

🧱

Runtime & GC

Custom TValue, string, table, closure and upvalue implementations, with incremental mark-sweep GC.

🌱

An independent implementation

Built independently of the historical LuaJIT codebase with modern C++17 and frozen architecture contracts.

Repository structure

Architecture contracts are frozen in docs/spec, with implementation organized by module.

Path
Module
Description
src/frontend/
Frontend
lexer、parser、AST、sema、LBC lowering
src/vm/
Virtual machine
Bytecode, interpreter, state, built-ins
src/runtime/
Runtime
TValue、string、table、closure、upvalue
src/gc/
GC
Incremental mark-sweep
src/jit/
JIT
Hotness, IC, baseline / opt / deopt
src/api/
API
Lua-compatible C API

Project status

In active development. Build and run the CLI locally, with differential tests and benchmarks against Lua 5.3.6.

CMake + CTestBenchmarks vs Lua 5.3.6docs/spec architecture contractsMIT

Follow LuaTier

Build from source, or follow the roadmap and benchmark reports on GitHub.