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 (JIT)
- [LuaJIT] (5.1) - A just-in-time (JIT) compiler for Lua 5.1 (32-bit x86 only right now). Lua VM interprets Lua bytecodes, translating dynamically to x86 instructions. Version 1.0 of VM interprets standard Lua bytecodes. Version 2.0 uses its own bytecodes. Implemented in C / x86 assembly. Fast VM execution.
- Llvm (JIT)
- LlvmLua (5.1) - Converts Lua bytecode to LLVM IR code. Supports both JIT and static compiling. Not limited to x86 (in contrast to LuaJIT). 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.
- Java
- [Kahlua][20] (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[1]. [Differences] Compiler forked from LuaJ.
- [Mochalua] (5.1) - Lua virtual machine, libraries and API ported to Java J2ME CLDC 1.1 [21]. 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. [2]. Implemented in Lua.
- [Lua2IL] - (5.0) Translates Lua 5.0 bytecodes to .NET CLR (IL instructions). This is the precursor of LuaCLR. [3] (FIX:what is the translator implemented in?)
- [Nua] (5.1) - Compiles Lua source to the .NET Dynamic Languages Runtime (DLR). Implemented in C#. [4]
- [XNua] - (5.1). Compiles Lua source to .NET bytecodes (particularly Xbox 360). Implemented in C#. Uses .NET's garbage collection[5] and has other differences/limitations[6].
- [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[7]. [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 (or ActionScript in Flash)
- [Lua2js] - Initial work[8][22][23] (5.1) - Translates Lua subset to Java
Script. Implemented in Lua.
- [flua] (5.0) - Lua 5.0 VM in Action
Script (Flash variant of JavaScript). VM interprets standard Lua bytecodes. Implemented in ActionScript.
- [lua-alchemy][Lua under Alchemy][24] (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[9][10], which is a backend to LLVM[11]. (So, this is not a manual reimplementation but rather an interesting machine translation.)
- See also [12][25]
- 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):
Other languages implemented in Lua:
- Lisp: [LuaLisp] (5.0?); [Mun] (5.1) Lisp on Lua (sorta)
- Forth: see "Chapter 6: Boostraping a Forth in 40 lines of Lua code" by EduardoOchs in Lua Programming Gems (see LuaBooks) [13] (5.1)
- ANSI C: [Clue] (5.1) - Translates C to Lua source code. Implemented in C, using sparse[14], 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 December 10, 2009 7:47 pm GMT (diff)