LuaDirectory > LuaAddons > Lua
There are quite a few reimplementations of Lua. The simplicity of Lua is a factor in this.
Reimplementations of Lua compilers and interpreters: (sorted by target/host platform)
- ANSI C / Lua Bytecodes
- [Lua] (5.1) - Compiles Lua source to standard Lua bytecodes. Lua VM interprets Lua bytecodes. Implemented in ANSI C. This is the standard reference implementation of Lua. Highly robust.
- x86, x64, ARM, PPC, MIPS
- [LuaJIT] (5.1) - A just-in-time (JIT) compiler for Lua 5.1. Much better performance .
- [LJX] (5.1/5.2/5.3) - Experimental fork of LuaJIT 2.1-beta2, adds native language semantics of Lua 5.2 (such as __gc for tables, _ENV) and 5.3 (bitwise operators). Includes cross-compatibility between versions.
- LLVM (JIT)
- LlvmLua (5.1) - Converts Lua bytecode to LLVM IR code. Supports both JIT and static compiling. Limited to the CPUs LLVM supports. Implemented in C/C++.
- [Yueliang] (5.1/5.0) - Compiles Lua source to standard Lua byte codes. Implemented in Lua. This is a no-brainer port, but it also includes an optional more native style port of the parser/lexer.
- [LuLu] (5.1) - Lua 5.1 VM implemented in Lua. Implements a VM interpreter and coroutine library, but reuses the host Lua environment for data types and standard library functions.
- [Metalua] (5.1) - Compiles a superset of Lua, supporting Lisp-style macros and syntax extensions, to standard Lua bytecodes. Implemented in Lua (with some C). Parser (source -> AST translator), which is reusable separately, implemented in Lua via the gg parser translator (implemented in Lua), which is partially based on Yueliang.
- See also LuaCompilerInLua, LuaInterpreterInLua, StringLibraryInLua
- [Kahlua] (5.1) - Virtual Machine and compiler for (a subset of) Lua in Java J2ME (CLDC 1.1). Implemented in Java, runs on J2SE and J2EE too. VM interprets standard Lua bytecodes. Uses Java's garbage collection. [Differences] Compiler forked from LuaJ.
- [Mochalua] (5.1) - Lua virtual machine, libraries and API ported to Java J2ME CLDC 1.1 . VM interprets standard Lua bytecodes.
- [LuaJ] (5.1, 5.2) - Lightweight, fast Java-centric Lua interpreter written for both J2ME and J2SE, including libraries for basic, string, table, package, math, coroutine packages, an optional compiler, luajava bindings, and [JSR-223] pluggable scripting engine bindings. [LuaJ home page]
- [Rembulan] (5.3) - Clean-room implementation of Lua 5.3 for the JVM with minimal dependencies (requires JDK 7+). Compiles to Java bytecode. Implements lightweight coroutines, allows execution time limiting.
- [LuaJava] (5.1) - LuaJava? is a scripting tool for Java, based on JNI (using Lua 5.1.1 binaries).
- [JNLua] (5.1, 5.2) - The Lua C code is integrated into Java using the Java Native API (JNI). [JSR-223] pluggable scripting engine bindings.
- [Jill] (5.1) - Java Implementation of Lua Language. Originally produced under a commercial contract, now open source. VM, compiler, API, and libraries running on JME CLDC 1.1. VM interprets standard Lua bytecodes. The libraries exist to the extent that CLDC supports them (no io.*, and math.* is reduced). Runs on JSE as well. 33 classes.
- Older: [JLua] [jua]
- [LuaCLR] - (5.1) Compiles Lua source to .NET CLR. Implemented in Lua.
- [Lua2IL] Note: Link dead 14/10/13- (5.0) Translates Lua 5.0 bytecodes to .NET CLR (IL instructions). This is the precursor of LuaCLR.  (FIX:what is the translator implemented in?)
- [Nua] (5.1) - Compiles Lua source to the .NET Dynamic Languages Runtime (DLR). Implemented in C#. 
- [XNua] NOTE: link dead 14/10/13 - (5.1). Compiles Lua source to .NET bytecodes (particularly Xbox 360). Implemented in C#. Uses .NET's garbage collection and has other differences/limitations.
- [Kopi Lua] - (5.1) A line-for-line port of the Lua source code (compiler, VM, GC, libraries etc.) to C#. Byte-code compatible with the C version.
- [SharpLua] - A Lua implementation in C# based off of Lua 5.1.5.
- [AluminumLua] - "A fast, lightweight Lua scripting engine written entirely in C#."
- [Quorra] - Aims to provide full functionality and compatibility with Lua in .NET / Mono
- [UniLua] - (5.2) A pure C# implementation of Lua 5.2 focus on compatibility with Unity3D.
- [NLua] - (5.1.5/5.2.2) A mix of C# implementation with native binding, compatible with .NET/iOS/Android/WinPhone?.
- [NeoLua] - NeoLua?, A Lua 5.2 implementation for the Dynamic Language Runtime (DLR).
- [Moon#] - Moon#, a Lua 5.2 implementation written entirely in C# for .NET 3.5/Mono 2.6 and later versions.
- [LunaRoad] - Lua C API (v5.1, 5.2, 5.3, ...) for .NET / represents a flexible platform to work with Lua. Provides Lua interfaces, Lambda expressions, Dynamic features that can be used to generate new API-Layer automatically at runtime, etc. Active as of 2016.
- Parrot VM
- [Parrot VM] (5.1) - Compiles Lua source to Parrot VM byte codes (PMC). Implemented in Perl. Standard libraries implemented in PIR. [SVN]
- C API
- LuaToCee (5.1) - Translates Lua source to C API calls. Implemented in Lua (based on Metalua's parser implemented in Lua).
- [luac2c] (5.1) - Translates Lua byte codes to C API calls. Implemented in Lua.
Script - variant of Java
Script included in Flash.
- [flua] (5.0) NOTE: link dead 14/10/13 - Lua 5.0 VM in Action
Script. VM interprets standard Lua bytecodes. Implemented in Action
- [lua-alchemy][Lua under Alchemy] (5.1) - Standard Lua 5.1 compiler and VM implemented in Action
Script (Flash variant of Java
Script) with inline AVM2 bytecodes in an .swc file. This .swc was machine translated from the standard Lua sources using Alchemy, which is a backend to LLVM. (So, this is not a manual reimplementation but rather an interesting machine translation.) [example:Phyzios]
- [lua.js] - converts Lua code directly to ECMAscript or Action
- Leonardo VM
- [Lua-ML] (2.5) - Lua 2.5 interpreter. Implemented in Objective Caml.
- [luerl] - Lua implemented in Erlang, by Robert Virding, one of the creators of Erlang. 
- [goluago] - port of the Lua 5.1 interpreter to the Go Language Toolchain (first 8c/6c/5c, ultimately maybe pure Go) -- preliminary 
Reimplementations only of the Lua lexer or parser (no code generator or VM):
Bindings to Standard Lua:
Other languages implemented in Lua:
- [LuaLisp] (5.0?)
- [Mun] (5.1) Lisp on Lua (sorta)
- Related: [lcl] (Lhf);
- [ClojureScript/Lua] NOTE: link dead 14/10/13- backend for Clojure
Script that targets Lua. Still requires Java for the compiler.
- Forth: see "Chapter 6: Boostraping a Forth in 40 lines of Lua code" by EduardoOchs in Lua Programming Gems (see LuaBooks)  (5.1)
- ANSI C: [Clue] (5.1) - Translates C to Lua source code. Implemented in C, using sparse, which is also implemented in C.
- Lua: see Yueliang above (5.1)
- [MoonScript] - Language inspired by [CoffeeScript]. Compiles to Lua source.
- [number-lua] Number
- [Gaia] (5.1) - Gaia aims to provide a parser and bytecode generator for the Lua VM to aid in targetting the Lua VM as a runtime for other dynamic languages. At this stage only Lua 5.1 is supported.
- [Lupa] (Luajit) - Lupa - multi-paradigm object oriented, dynamic language.
- [Nyanga] (Luajit) - Nyanga - Object Oriented Lua Dialect.
- [:Firth] (Luajit, 5.2) - :Firth - A simple Forth-like language intended for DSL creation. Early alpha stages.
Languages based on Lua
These languages are based on the Lua implementation (e.g. adapted VM).
- Agena - based on Lua C source, but has significant syntax differences
- [LuaPlus] - based on 5.0work, no longer appears maintained
- Bright - more C like syntax, based on Lua 4.0, no longer appears maintained
- [SquiLu] - A mix between Squirrel and Lua, trying to get the best of both.
- Objective Lua
- Python: [tinypy] - a small subset of Python written in the style of Lua (but not based on Lua code).
- MetaLua - brings compile-time metaprogramming to Lua. Compiles to standard Lua 5.1 bytecodes.
- [Ravi] - a modified version of Lua 5.3 with optional static types and LLVM JIT compilation
Lua test suites
For test suites to check the correctness of Lua implementations, see UnitTesting.
- LuaDistributions / LuaBinaries - These are compilations or adaptations of Lua to different platforms. These differ from the above in that they are not complete reimplementations of Lua but rather have minor or no changes to the Lua source code.
RecentChanges · preferences
edit · history
Last edited September 21, 2017 3:37 pm GMT (diff)