Skip to content

Future Direction

Core Philosophy

"The lightweight nature of Lua + Modern Syntax + Observable GC/Coroutine Runtime"

A safe, predictable scripting layer optimized for game engine embedding.

Performance Targets

We continuously measure against our lua_baseline (which represents standard Lua 5.4 performance) to ensure our VM architecture remains competitive for real-time applications.

Metriclua_baselineCurrent ZephyrTarget
arithmetic (ns/op)3~5~84~5
coroutine resume200~400 ns593 ns300~400 ns
host resolve641 ns< 300 ns

Roadmap

Short-term

#TaskNotes
1AOT compilationbytecode → native object file, LLVM or QBE backend
2JIT (hot path)opcode_count threshold → ORC JIT, excluding coroutines
3LSP inlay hintstextDocument/inlayHint — variable type hints
4Regression testsSplit zephyr_parser.cpp / zephyr_gc_impl.cpp for TU unit tests

Mid-term

#TaskNotes
5Package managerpackage.toml fetch / lock / publish
6Standard library expansionstd/net, std/async, std/test
7Enhanced REPLmultiline, history, tab completion

Long-term

#TaskNotes
8Self-hosting compilerCompile Zephyr with Zephyr
9WASM targetEmscripten or wasm32-unknown-unknown

AOT/JIT Backend Comparison

BackendJITAOTC++ IntegrationNotes
LLVM✅ ORCC++ nativeHeavy build (~50MB)
CraneliftRust FFI neededLightweight, Rust toolchain
QBEC libExtremely lightweight (~200KB)
MIR/libmirC APIRed Hat, Lightweight JIT only

Conclusion: Pure game scripting VMs like Gravity/Lua are highly practical even without JIT. We recommend adding it only when actual bottlenecks mandate it.

Non-Goals

  • Borrow checking / lifetime annotations
  • Async/await paradigm (replaced entirely by coroutines)
  • Metaprogramming beyond Reflection / dynamic dispatch