Nlua
NLua is the bind between Lua world and the .NET world.
NLua is a fork of project LuaInterface (from Fábio Mascarenhas/Craig Presti).
Example: using NLua from command line.
NLua allow use Lua from C#, using Windows, Linux, Mac, iOS , Android, Windows Phone 7 and Windows Phone 8.
Windows: We don‘t have a CI Server for Windows. You can build NLua , you will need (msysgit, CMake, NUnit) http://screencast.com/t/rYuDtCdFG7
string script = @"
local s = Scriptable (""My String Parameter"")
s:DoSomething ()
print (s.Param1)
local ret = s:SumOfLengths (""Name"", 10);
print (tostring(ret))
Scriptable.Print(""Hello NLua"")
s.Param3 = 0.5;
local p2 = tostring(s.Param3)
print (p2)
";
using (Lua lua = new Lua ()) {
lua.LoadCLRPackage ();
lua.DoString (@" import (‘NLuaSample‘) ");
lua ["gValue"] = "This is a global value"; // You can set a global value.
var returns = lua.DoString (script);
Console.WriteLine (returns);
}