DynamicLua is a wrapper for NLua heavily using the .NET 4 dynamic
Feature. (NLua is a Lua/C# Bridge)
It makes it easier and more idiomatic to use Lua in C# Code. DynamicLua is written in C# and includes unit tests for nearly everything. Most of the tests are converted from the LuaInterface/NLua project.
Code Example:
// Start a new Lua interpreter
dynamic lua = new DynamicLua.DynamicLua(); //Namespace and class name are the same!
// Run Lua chunks
lua("num = 2"); //no DoString()!
lua("str = ’a string’");
// Read global variables ’num’ and ’str’
double num = lua.num; //No explicit casting, no index operator!
string str = lua.str;
// Write to global variable ’str’
lua.str = "another string"; //No index operator
//Increase a global value
lua.num += 10; //A LOT cleaner
There a more features witch makes it much easier to use Lua in C#. All features are explained on the Features site.
A lot of the work is done. Some of the implemented features a shown in the Examples above. There is still some polishing to be done, and some problems to be solved. Detailed information on every feature's status is available on the Features site.
This project is currently developed only by me. I appreciate any help, just have a look on the issue tracker. You can contact me in German or English.
DynamicLua is licensed under the Apache License 2.0. It includes NLua, KeraLua and Lua itself (all included in the binary), these are licensed under the MIT License.
(Logo based on Story Bridge by Cyron under CC-BY-2.0)