JUCS - Journal of Universal Computer Science 10(7): 892-909, doi: 10.3217/jucs-010-07-0892
LuaInterface: Scripting the .NET CLR with Lua
expand article infoFabio Mascarenhas, Roberto Ierusalimschy§
‡ Pontifical Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil§ PUC-Rio, Rio de Janeiro, Brazil
Open Access
Abstract
We present LuaInterface in this paper, a library for scripting the .NET CLR with Lua. The .NET Common Language Runtime (CLR) aims to provide interoperability among objects written in several different languages. LuaInterface gives Lua the capabilities of a full CLS consumer. The Common Language Specification (CLS) is a subset of the CLR specification, with rules for language interoperability, and CLS consumers are languages that can use CLS_compliant libraries. LuaInterface lets Lua scripts instantiate and use CLR objects, and even create new CLR types. CLR applications may also use LuaInterface to embed a Lua interpreter, using Lua scripts to extend the application. LuaInterface is implemented as a bridge between the Lua interpreter and the CLR. The implementation required no changes to the interpreter, and the level of integration is the same that a Lua compiler would have.
Keywords
scripting, language interoperability, reflection