Lua2IL, a Lua to CIL compiler


Lua2IL compiles scripts written in the Lua language to Common Language Infrastructure (CLI) assemblies. The compiler generates pure managed Common Intermediate Language (CIL) code. Besides compiling scripts to CIL, Lua2IL also lets them interface with CLI objects written in other languages.

For an interpreted language, Lua2IL generates efficient code, with the code being about three times faster than similar JScript code compiled by the Microsoft JScript.NET compiler bundled with .NET Framework 1.1 (without type optimizations).

A paper about the Lua2IL compiler was published in a special edition of the Journal of Universal Computer Science. You can read the paper here.

Lua2IL is designed and implemented by Fabio Mascarenhas.


The compiler is a prototype. It compiles the full Lua 5.0 language, but doesn't include most of the Lua standard library. You can download Lua2IL here.


Please send questions or comments to Fabio Mascarenhas.