[ obsolete ]
KeraLua - has been replaced on new LunaRoad !
Use master branch if you need modifications for KeraLua
LunaRoad represents a fully new flexible platform to work with Lua. Works via powerful Conari engine !
Easy to start:
using(var l = new Lua<ILua51>("Lua.dll")) {
// ...
// ILua51, ILua52, ILua53, ...
}Flexible binding with any exported function of library:
- Dynamic features / DLR:
It does not require API level at all, we will generate all this automatically at runtime ! Easy and works well.
// all this will be generated at runtime, i.e. you can use all of what you need from Lua as you like:
dlr.pushcclosure(L, onProc, 0);
dlr.setglobal(L, "onKeyDown");
...
LuaNumber num = dlr.tonumber<LuaNumber>(L, 7);- Lambda expressions:
// custom binding:
using(ILua l = new Lua("Lua52.dll"))
{
l.bind<Action<LuaState, LuaCFunction, int>>("pushcclosure")(L, onProc, 0);
l.bind<Action<LuaState, string>>("setglobal")(L, "onKeyDown");
//or any exported function like: bindFunc<...>("_full_name_")
...
LuaNumber num = l.bind<Func<LuaState, int, LuaNumber>>("tonumber")(L, 7);
}
// API layer:
using(var l = new Lua<ILua53>("Lua53.dll"))
{
l.API.pushcclosure(L, onProc, 0); // ILua53 lua = l.API
l.API.setglobal(L, "onKeyDown");
}Since the LunaRoad works over Conari, it also does not require the creation of any additional delegate. We'll do it automatically instead of you. [?]
Enjoy.