FakeLua is a superset of Lua, it compiles Lua to native code at runtime.
- compile with C++23
- build on Linux && Mingw
- support Lua 5.4 grammar
- lexing and parsing by Flex && Bison
- compile to native code by GCC JIT
- support GDB Lua source code
- no global variable, only global constant
- no GC, use memory pool
- no coroutine/thread/userdata/metatable
- table are always hash table, no array table
- string concat support all type
- no closure, it's slow and complex to implement
- include header file
- src source code
- test test code
- benchmark benchmark code
- cmd command line tool
- cmake cmake toolchain
- Dependent: install gcc-13 with jit, cmake, flex, bison. install Lua for test.
- Build:
mkdir build
cd build
cmake ..
make
- Dependent: install MSYS2. install mingw-w64-x86_64-libgccjit, mingw-w64-x86_64-lua. install CLion.
- open project with CLion, set mingw toolchains. and build.