LuaDirectory > LuaAddons > LuaImplementations
There are quite a few reimplementations of Lua. The simplicity of the Lua language 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 (JIT)
- [LuaJIT] (5.1) - A just-in-time (JIT) compiler for Lua 5.1 (x86 or x64 only). Lua VM interprets Lua bytecodes, translating dynamically to machine instructions. Version 1.x interprets standard Lua bytecodes. Version 2.0 uses its own bytecodes. Implemented in C and x86/x64 assembly. Much better performance [1].
- 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++.
- Lua
- [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
- Java
- [Kahlua][23] (5.1) - Virtual Machine and compiler for (a subset of) Lua in Java J2ME (CLDC 1.1). Implemented in Java. VM interprets standard Lua bytecodes. Uses Java's garbage collection[2]. [Differences] Compiler forked from LuaJ.
- [Mochalua] (5.1) - Lua virtual machine, libraries and API ported to Java J2ME CLDC 1.1 [24]. VM interprets standard Lua bytecodes.
- [luaj] (5.1) - 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-233 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]
- .NET
- [LuaCLR] - (5.1) Compiles Lua source to .NET CLR. [3]. Implemented in Lua.
- [Lua2IL] - (5.0) Translates Lua 5.0 bytecodes to .NET CLR (IL instructions). This is the precursor of LuaCLR. [4] (FIX:what is the translator implemented in?)
- [Nua] (5.1) - Compiles Lua source to the .NET Dynamic Languages Runtime (DLR). Implemented in C#. [5]
- [XNua] - (5.1). Compiles Lua source to .NET bytecodes (particularly Xbox 360). Implemented in C#. Uses .NET's garbage collection[6] and has other differences/limitations[7].
- [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.
- Parrot VM
- [Parrot VM] (5.1) - Compiles Lua source to Parrot VM byte codes (PMC). Implemented in Perl. Standard libraries implemented in PIR[8]. [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.
- Java
Script
- Action
Script - variant of JavaScript included in Flash.
- [flua] (5.0) - Lua 5.0 VM in Action
Script. VM interprets standard Lua bytecodes. Implemented in ActionScript.
- [lua-alchemy][Lua under Alchemy][27] (5.1) - Standard Lua 5.1 compiler and VM implemented in Action
Script (Flash variant of JavaScript) with inline AVM2 bytecodes in an .swc file. This .swc was machine translated from the standard Lua sources using Alchemy[11][12], which is a backend to LLVM[13]. (So, this is not a manual reimplementation but rather an interesting machine translation.) [example:Phyzios]
- Leonardo VM
- OCaml
- [Lua-ML] (2.5) - Lua 2.5 interpreter. Implemented in Objective Caml.
Reimplementations only of the Lua lexer or parser (no code generator or VM):
Bindings to Standard Lua:
Other languages implemented in Lua:
- Lisp: [LuaLisp] (5.0?); [Mun] (5.1) Lisp on Lua (sorta); Related: [lcl] (Lhf)
- Forth: see "Chapter 6: Boostraping a Forth in 40 lines of Lua code" by EduardoOchs in Lua Programming Gems (see LuaBooks) [14] (5.1)
- ANSI C: [Clue] (5.1) - Translates C to Lua source code. Implemented in C, using sparse[15], which is also implemented in C.
- Lua: see Yueliang above (5.1)
Languages based on Lua
These languages are based on the Lua implementation (e.g. adapted VM).
See Also
- LuaDistributions / LuaBinaries - These are compilations or adaptions 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.
FindPage · RecentChanges · preferences
edit · history
Last edited August 10, 2010 2:10 am GMT (diff)